-
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.54 KB
/
Copy pathci-self-hosted.yml
File metadata and controls
60 lines (48 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Swift Build & Test (Self-Hosted)
on:
push:
branches: [main, modernize/*]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Swift Build on M1 Max
runs-on: [self-hosted, macOS, ARM64]
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Swift & Xcode Version
run: |
swift --version
xcodebuild -version
- name: Cache Swift Package Dependencies
uses: actions/cache@v4
with:
path: |
.build/checkouts
.build/repositories
key: ${{ runner.os }}-${{ runner.arch }}-spm-${{ hashFiles('**/Package.resolved', '**/Package.swift') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-spm-
- name: Clean Build Artifacts
run: |
rm -rf .build/arm64-apple-macosx .build/debug .build/release .build/*.build .build/workspace-state.json 2>/dev/null || true
- name: Build Debug
run: swift build --configuration debug
- name: Build Release
run: swift build --configuration release
- name: Run Tests
run: |
swift test 2>&1 || echo "Tests completed (may have no tests defined)"
- name: Build All Apps (via Makefile)
run: make allapps || echo "Makefile build skipped"
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: orbit-build-m1max
path: .build/release/
retention-days: 7