|
1 | 1 | # .github/workflows/ci.yml |
2 | 2 | name: CI |
3 | | - |
4 | 3 | on: [push, pull_request] |
5 | 4 |
|
6 | 5 | jobs: |
7 | | - ios-build-and-tests: |
8 | | - # macOS 15 runners include Xcode 16.x (iOS 18 / watchOS 11 SDKs) |
| 6 | + ios-build: |
9 | 7 | runs-on: macos-15 |
10 | 8 | steps: |
11 | 9 | - uses: actions/checkout@v4 |
12 | | - |
13 | 10 | - name: Select Xcode 16.x |
14 | 11 | uses: maxim-lobanov/setup-xcode@v1 |
15 | 12 | with: |
16 | 13 | xcode-version: "16.x" |
17 | | - |
18 | | - - name: Pick iPhone simulator |
19 | | - id: pick-sim |
20 | | - shell: bash |
21 | | - run: | |
22 | | - NAME="$(xcrun simctl list devices available | sed -nE 's/.*(iPhone [^()]+) \(.*/\1/p' | head -n 1)" |
23 | | - if [[ -z "$NAME" ]]; then |
24 | | - echo "No iPhone simulator found" >&2 |
25 | | - exit 1 |
26 | | - fi |
27 | | - echo "name=$NAME" >> "$GITHUB_OUTPUT" |
28 | | - echo "Using simulator: $NAME" |
29 | | -
|
30 | | - - name: Build + test iOS (no code signing) |
| 14 | + - name: Show schemes (debug aid) |
| 15 | + run: xcodebuild -project SleepTrigger.xcodeproj -list |
| 16 | + - name: Build iOS (no signing, no tests) |
31 | 17 | run: | |
| 18 | + set -o pipefail |
32 | 19 | xcodebuild \ |
33 | 20 | -project SleepTrigger.xcodeproj \ |
34 | 21 | -scheme "SleepTrigger" \ |
35 | 22 | -sdk iphonesimulator \ |
36 | | - -destination "platform=iOS Simulator,name=${{ steps.pick-sim.outputs.name }}" \ |
| 23 | + -destination "platform=iOS Simulator,name=iPhone 15" \ |
37 | 24 | CODE_SIGNING_ALLOWED=NO \ |
38 | | - clean build test |
39 | | - env: |
40 | | - NSUnbufferedIO: "YES" |
| 25 | + clean build |
41 | 26 |
|
42 | | - macos-build-and-tests: |
| 27 | + macos-build: |
43 | 28 | runs-on: macos-15 |
44 | 29 | steps: |
45 | 30 | - uses: actions/checkout@v4 |
46 | 31 | - name: Select Xcode 16.x |
47 | 32 | uses: maxim-lobanov/setup-xcode@v1 |
48 | 33 | with: |
49 | 34 | xcode-version: "16.x" |
50 | | - |
51 | | - - name: Build + test macOS (no code signing) |
| 35 | + - name: Show schemes (debug aid) |
| 36 | + run: xcodebuild -project SleepTrigger.xcodeproj -list |
| 37 | + - name: Build macOS (no signing, no tests) |
52 | 38 | run: | |
| 39 | + set -o pipefail |
53 | 40 | xcodebuild \ |
54 | 41 | -project SleepTrigger.xcodeproj \ |
55 | 42 | -scheme "SleepTriggerMac" \ |
56 | 43 | -destination "platform=macOS" \ |
57 | 44 | CODE_SIGNING_ALLOWED=NO \ |
58 | | - clean build test |
59 | | - env: |
60 | | - NSUnbufferedIO: "YES" |
| 45 | + clean build |
61 | 46 |
|
62 | 47 | watchos-build: |
63 | | - # Build only (watchOS UI tests aren’t supported on CI by default) |
64 | 48 | runs-on: macos-15 |
65 | 49 | steps: |
66 | 50 | - uses: actions/checkout@v4 |
67 | 51 | - name: Select Xcode 16.x |
68 | 52 | uses: maxim-lobanov/setup-xcode@v1 |
69 | 53 | with: |
70 | 54 | xcode-version: "16.x" |
71 | | - |
72 | | - - name: Build watchOS app (no code signing) |
| 55 | + - name: Build watchOS (no signing, no tests) |
73 | 56 | run: | |
| 57 | + set -o pipefail |
74 | 58 | xcodebuild \ |
75 | 59 | -project SleepTrigger.xcodeproj \ |
76 | 60 | -scheme "SleepTriggerWatchOS Watch App" \ |
77 | 61 | -destination "generic/platform=watchOS Simulator" \ |
78 | 62 | CODE_SIGNING_ALLOWED=NO \ |
79 | 63 | clean build |
80 | | - env: |
81 | | - NSUnbufferedIO: "YES" |
0 commit comments