Skip to content

Commit 95ab1b5

Browse files
committed
Updated GitHub CI
1 parent db9f6c3 commit 95ab1b5

File tree

1 file changed

+38
-18
lines changed

1 file changed

+38
-18
lines changed

.github/workflows/build.yml

+38-18
Original file line numberDiff line numberDiff line change
@@ -23,65 +23,85 @@ on:
2323
- cron: '50 11 * * *' # once a day @ 11:50am UTC (4:50am PST)
2424

2525
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
2929
steps:
3030
- uses: actions/checkout@main
31+
- uses: maxim-lobanov/setup-xcode@v1
32+
with:
33+
xcode-version: '15.4.0'
3134
- 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]}
3336
- 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]}
3538

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
3942
steps:
4043
- 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
4147
- 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]}
4349
- 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]}
4551

4652
macCatalyst:
4753
name: macCatalyst
4854
runs-on: macos-latest
4955
steps:
5056
- 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
5160
- 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]}
5362
- 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]}
5564

5665
iOS:
5766
name: iOS
5867
runs-on: macos-latest # this must be macos, GitHub does not offer iOS directly but we can use xcodebuild
5968
steps:
6069
- 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
6173
- 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]}
6375
- 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]}
6577

6678
tvOS:
6779
name: tvOS
6880
runs-on: macos-latest # this must be macos, GitHub does not offer tvOS directly but we can use xcodebuild
6981
steps:
7082
- 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
7186
- 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]}
7388
- 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]}
7590

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"
7693
watchOS:
7794
name: watchOS
7895
runs-on: macos-latest # this must be macos, GitHub does not offer watchOS directly but we can use xcodebuild
7996
steps:
8097
- 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
81101
- 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]}
83103
- 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]}
85105

86106

87107
# xcodebuild test reference:

0 commit comments

Comments
 (0)