26
26
steps :
27
27
- uses : actions/checkout@v3
28
28
29
+ - name : Read env
30
+ run : cat .github/workflows/env.properties >> $GITHUB_ENV
31
+
29
32
- name : Cache gems
30
33
uses : actions/cache@v3
31
34
with :
@@ -40,36 +43,65 @@ jobs:
40
43
run : |
41
44
bundle exec pod gen Development.podspec
42
45
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
45
48
46
49
- name : Build & Test
47
50
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
49
52
50
53
spm :
51
54
runs-on : macos-latest
52
55
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
+
53
72
steps :
54
73
- uses : actions/checkout@v3
55
74
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
58
80
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
60
89
run : |
61
- xcodebuild -scheme "Workflow-Package" test -destination "name=iPhone 11"
90
+ xcodebuild -scheme "Workflow-Package" -destination "${{ matrix.destination }}" build test
62
91
63
- - name : Swift Package Manager - macOS
92
+ - name : Swift Package Manager - Build & Test - macOS
64
93
run : |
65
- xcodebuild -scheme "Workflow-Package" test -destination "platform=macOS"
94
+ xcodebuild -scheme "Workflow-Package" -destination "platform=macOS" build test
66
95
67
96
tutorial :
68
97
runs-on : macos-latest
69
98
70
99
steps :
71
100
- uses : actions/checkout@v3
72
101
102
+ - name : Read env
103
+ run : cat .github/workflows/env.properties >> $GITHUB_ENV
104
+
73
105
- name : Cache gems
74
106
uses : actions/cache@v3
75
107
with :
@@ -80,21 +112,24 @@ jobs:
80
112
run : |
81
113
bundle check || bundle install --path .bundle
82
114
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
85
117
86
118
- name : Tutorial App
87
119
run : |
88
120
cd Samples/Tutorial
89
121
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
91
123
92
124
documentation-lint :
93
125
runs-on : macos-latest
94
126
95
127
steps :
96
128
- uses : actions/checkout@v3
97
129
130
+ - name : Read env
131
+ run : cat .github/workflows/env.properties >> $GITHUB_ENV
132
+
98
133
- name : Cache gems
99
134
uses : actions/cache@v3
100
135
with :
@@ -106,8 +141,8 @@ jobs:
106
141
bundle check || bundle install --path .bundle
107
142
brew install sourcedocs
108
143
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
111
146
112
147
- name : Swiftdocs
113
148
run : |
0 commit comments