Skip to content

Commit d96e6bf

Browse files
committed
[chore]: attempt to fix & slightly streamline CI config
1 parent 15d7d29 commit d96e6bf

File tree

2 files changed

+50
-14
lines changed

2 files changed

+50
-14
lines changed

.github/workflows/env.properties

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
xcode_version=15.1

.github/workflows/swift.yaml

+49-14
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v3
2828

29+
- name: Read env
30+
run: cat .github/workflows/env.properties >> $GITHUB_ENV
31+
2932
- name: Cache gems
3033
uses: actions/cache@v3
3134
with:
@@ -40,36 +43,65 @@ jobs:
4043
run: |
4144
bundle exec pod gen Development.podspec
4245
43-
- name: Switch Xcode
44-
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
46+
- name: Switch to Xcode ${{ env.xcode_version }}
47+
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app
4548

4649
- name: Build & Test
4750
run: |
48-
set -o pipefail && xcodebuild -workspace gen/Development/Development.xcworkspace -scheme ${{ matrix.scheme }} -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty
51+
set -o pipefail && xcodebuild -workspace gen/Development/Development.xcworkspace -scheme ${{ matrix.scheme }} -destination platform\=iOS\ Simulator,OS\=17.2,name\=iPad\ Mini\ \(6th\ generation\) build test | xcpretty
4952
5053
spm:
5154
runs-on: macos-latest
5255

56+
matrix:
57+
include:
58+
- sdk: "15.4"
59+
destination: platform=iOS Simulator,OS=15.4,name=iPhone SE (3rd generation)
60+
installation_required: true
61+
62+
- sdk: "16.2"
63+
destination: platform=iOS Simulator,OS=16.2,name=iPhone SE (3rd generation)
64+
installation_required: true
65+
66+
- sdk: "17.2"
67+
destination: platform=iOS Simulator,OS=17.2,name=iPhone SE (3rd generation)
68+
# The iOS 17.2 SDK is pre-installed on the macOS 13 image.
69+
# Attempting to install it will fail with an error.
70+
installation_required: false
71+
5372
steps:
5473
- uses: actions/checkout@v3
5574

56-
- name: Switch Xcode
57-
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
75+
- name: Read env
76+
run: cat .github/workflows/env.properties >> $GITHUB_ENV
77+
78+
- name: Switch to Xcode ${{ env.xcode_version }}
79+
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app
5880

59-
- name: Swift Package Manager - iOS
81+
- name: Install xcodes
82+
run: brew install aria2 xcodesorg/made/xcodes
83+
84+
- name: Install iOS ${{ matrix.sdk }}
85+
if: ${{ matrix.installation_required }}
86+
run: sudo xcodes runtimes install "iOS ${{ matrix.sdk }}"
87+
88+
- name: Swift Package Manager - Build & Test - iOS
6089
run: |
61-
xcodebuild -scheme "Workflow-Package" test -destination "name=iPhone 11"
90+
xcodebuild -scheme "Workflow-Package" -destination "${{ matrix.destination }}" build test
6291
63-
- name: Swift Package Manager - macOS
92+
- name: Swift Package Manager - Build & Test - macOS
6493
run: |
65-
xcodebuild -scheme "Workflow-Package" test -destination "platform=macOS"
94+
xcodebuild -scheme "Workflow-Package" -destination "platform=macOS" build test
6695
6796
tutorial:
6897
runs-on: macos-latest
6998

7099
steps:
71100
- uses: actions/checkout@v3
72101

102+
- name: Read env
103+
run: cat .github/workflows/env.properties >> $GITHUB_ENV
104+
73105
- name: Cache gems
74106
uses: actions/cache@v3
75107
with:
@@ -80,21 +112,24 @@ jobs:
80112
run: |
81113
bundle check || bundle install --path .bundle
82114
83-
- name: Switch Xcode
84-
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
115+
- name: Switch to Xcode ${{ env.xcode_version }}
116+
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app
85117

86118
- name: Tutorial App
87119
run: |
88120
cd Samples/Tutorial
89121
bundle exec pod install
90-
set -o pipefail && xcodebuild -workspace Tutorial.xcworkspace -scheme Tutorial -destination platform\=iOS\ Simulator,OS\=16.2,name\=iPad\ Pro\ \(9.7-inch\) build test | xcpretty
122+
set -o pipefail && xcodebuild -workspace Tutorial.xcworkspace -scheme Tutorial -destination platform\=iOS\ Simulator,OS\=17.2,name\=iPhone\ SE\ \(3rd\ generation\) build test | xcpretty
91123
92124
documentation-lint:
93125
runs-on: macos-latest
94126

95127
steps:
96128
- uses: actions/checkout@v3
97129

130+
- name: Read env
131+
run: cat .github/workflows/env.properties >> $GITHUB_ENV
132+
98133
- name: Cache gems
99134
uses: actions/cache@v3
100135
with:
@@ -106,8 +141,8 @@ jobs:
106141
bundle check || bundle install --path .bundle
107142
brew install sourcedocs
108143
109-
- name: Switch Xcode
110-
run: sudo xcode-select -s /Applications/Xcode_14.2.0.app
144+
- name: Switch to Xcode ${{ env.xcode_version }}
145+
run: sudo xcode-select -s /Applications/Xcode_${{ env.xcode_version }}.app
111146

112147
- name: Swiftdocs
113148
run: |

0 commit comments

Comments
 (0)