|
23 | 23 | - cron: '50 11 * * *' # once a day @ 11:50am UTC (4:50am PST) |
24 | 24 |
|
25 | 25 | jobs: |
26 | | - macOS-11: |
27 | | - name: macOS 11 Big Sur |
28 | | - runs-on: macos-11 |
| 26 | + macOS-14: |
| 27 | + name: macOS 14 Sonoma (Xcode 15.4) |
| 28 | + runs-on: macos-14 |
29 | 29 | steps: |
30 | 30 | - uses: actions/checkout@main |
| 31 | + - uses: maxim-lobanov/setup-xcode@v1 |
| 32 | + with: |
| 33 | + xcode-version: '15.4.0' |
31 | 34 | - name: Build |
32 | | - run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "generic/platform=macOS,name=Any Mac" |
| 35 | + run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "generic/platform=macOS,name=Any Mac" | xcpretty && exit ${PIPESTATUS[0]} |
33 | 36 | - name: Unit Tests |
34 | | - run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=macOS" |
| 37 | + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=macOS" | xcpretty && exit ${PIPESTATUS[0]} |
35 | 38 |
|
36 | | - macOS-12: |
37 | | - name: macOS 12 Monterey |
38 | | - runs-on: macos-12 |
| 39 | + macOS: |
| 40 | + name: macOS Latest (Latest Stable Xcode) |
| 41 | + runs-on: macos-latest |
39 | 42 | steps: |
40 | 43 | - uses: actions/checkout@main |
| 44 | + - uses: maxim-lobanov/setup-xcode@v1 |
| 45 | + with: |
| 46 | + xcode-version: latest-stable # Sometimes a newer version of Xcode is available but isn't yet made default |
41 | 47 | - name: Build |
42 | | - run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "generic/platform=macOS,name=Any Mac" |
| 48 | + run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "generic/platform=macOS,name=Any Mac" | xcpretty && exit ${PIPESTATUS[0]} |
43 | 49 | - name: Unit Tests |
44 | | - run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=macOS" |
| 50 | + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=macOS" | xcpretty && exit ${PIPESTATUS[0]} |
45 | 51 |
|
46 | 52 | macCatalyst: |
47 | 53 | name: macCatalyst |
48 | 54 | runs-on: macos-latest |
49 | 55 | steps: |
50 | 56 | - uses: actions/checkout@main |
| 57 | + - uses: maxim-lobanov/setup-xcode@v1 |
| 58 | + with: |
| 59 | + xcode-version: latest-stable # Sometimes a newer version of Xcode is available but isn't yet made default |
51 | 60 | - name: Build |
52 | | - run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "generic/platform=macOS,variant=Mac Catalyst,name=Any Mac" |
| 61 | + run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "generic/platform=macOS,variant=Mac Catalyst,name=Any Mac" | xcpretty && exit ${PIPESTATUS[0]} |
53 | 62 | - name: Unit Tests |
54 | | - run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=macOS,variant=Mac Catalyst" |
| 63 | + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=macOS,variant=Mac Catalyst" | xcpretty && exit ${PIPESTATUS[0]} |
55 | 64 |
|
56 | 65 | iOS: |
57 | 66 | name: iOS |
58 | 67 | runs-on: macos-latest # this must be macos, GitHub does not offer iOS directly but we can use xcodebuild |
59 | 68 | steps: |
60 | 69 | - uses: actions/checkout@main |
| 70 | + - uses: maxim-lobanov/setup-xcode@v1 |
| 71 | + with: |
| 72 | + xcode-version: latest-stable # Sometimes a newer version of Xcode is available but isn't yet made default |
61 | 73 | - name: iPhone 12 Simulator - Build |
62 | | - run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "generic/platform=iOS Simulator,name=Any iOS Device" |
| 74 | + run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "generic/platform=iOS Simulator,name=Any iOS Device" | xcpretty && exit ${PIPESTATUS[0]} |
63 | 75 | - name: iPhone 12 Simulator - Unit Tests |
64 | | - run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=iOS Simulator,name=iPhone 12" |
| 76 | + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=iOS Simulator,name=iPhone 15" | xcpretty && exit ${PIPESTATUS[0]} |
65 | 77 |
|
66 | 78 | tvOS: |
67 | 79 | name: tvOS |
68 | 80 | runs-on: macos-latest # this must be macos, GitHub does not offer tvOS directly but we can use xcodebuild |
69 | 81 | steps: |
70 | 82 | - uses: actions/checkout@main |
| 83 | + - uses: maxim-lobanov/setup-xcode@v1 |
| 84 | + with: |
| 85 | + xcode-version: latest-stable # Sometimes a newer version of Xcode is available but isn't yet made default |
71 | 86 | - name: Apple TV - Build |
72 | | - run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "generic/platform=tvOS Simulator,name=Any tvOS Simulator Device" |
| 87 | + run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "generic/platform=tvOS Simulator,name=Any tvOS Simulator Device" | xcpretty && exit ${PIPESTATUS[0]} |
73 | 88 | - name: Apple TV - Unit Tests |
74 | | - run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=tvOS Simulator,name=Apple TV 4K (2nd generation)" |
| 89 | + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)" | xcpretty && exit ${PIPESTATUS[0]} |
75 | 90 |
|
| 91 | + # NOTES: Xcode 15 seems to have a transient bug where compiling for watchOS Simulator fails, so we have to compile for watchOS Device instead. |
| 92 | + # Old destination that used to work prior to Xcode 15: "generic/platform=watchOS Simulator,name=Any watchOS Device" |
76 | 93 | watchOS: |
77 | 94 | name: watchOS |
78 | 95 | runs-on: macos-latest # this must be macos, GitHub does not offer watchOS directly but we can use xcodebuild |
79 | 96 | steps: |
80 | 97 | - uses: actions/checkout@main |
| 98 | + - uses: maxim-lobanov/setup-xcode@v1 |
| 99 | + with: |
| 100 | + xcode-version: latest-stable # Sometimes a newer version of Xcode is available but isn't yet made default |
81 | 101 | - name: Apple Watch - Build |
82 | | - run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "generic/platform=watchOS Simulator,name=Any watchOS Simulator Device" |
| 102 | + run: xcodebuild build -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "generic/platform=watchOS,name=Any watchOS Device" | xcpretty && exit ${PIPESTATUS[0]} |
83 | 103 | - name: Apple Watch - Unit Tests |
84 | | - run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm)" |
| 104 | + run: xcodebuild test -workspace ".swiftpm/xcode/package.xcworkspace" -scheme "SwiftASCII-CI" -destination "platform=watchOS Simulator,name=Apple Watch Series 10 (46mm)" | xcpretty && exit ${PIPESTATUS[0]} |
85 | 105 |
|
86 | 106 |
|
87 | 107 | # xcodebuild test reference: |
|
0 commit comments