-
Notifications
You must be signed in to change notification settings - Fork 35
308 lines (308 loc) · 11 KB
/
release-branch.yml
File metadata and controls
308 lines (308 loc) · 11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# Generated from Workflow.pkl. DO NOT EDIT.
name: Build (release branch)
'on':
push:
branches:
- release/*
tags-ignore:
- '**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test-pkl-0-25-3:
name: Test Pkl 0.25.3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Setup Pkl
id: setup-pkl
env:
PKL_VERSION: 0.25.3
PKL_FILENAME: pkl
PKL_DOWNLOAD_URL: https://github.com/apple/pkl/releases/download/0.25.3/pkl-linux-amd64
shell: bash
run: |-
DIR="$(mktemp -d /tmp/pkl-$PKL_VERSION-XXXXXX)"
PKL_EXEC="$DIR/$PKL_FILENAME"
curl -sfL -o $PKL_EXEC "$PKL_DOWNLOAD_URL"
chmod +x $PKL_EXEC
echo "$DIR" >> "$GITHUB_PATH"
echo "pkl_exec=$PKL_EXEC" >> "$GITHUB_OUTPUT"
- name: swift test
run: |-
mkdir -p .out/test-results/
swift test -vv --parallel --num-workers 1 --xunit-output .out/test-results/xunit.xml -Xswiftc -warnings-as-errors
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: test-results-xml-test-pkl-0-25-3
path: .out/test-results/**/*.xml
container:
image: swift:6.1-rhel-ubi9
test-pkl-0-31-0:
name: Test Pkl 0.31.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Setup Pkl
id: setup-pkl
env:
PKL_VERSION: 0.31.0
PKL_FILENAME: pkl
PKL_DOWNLOAD_URL: https://github.com/apple/pkl/releases/download/0.31.0/pkl-linux-amd64
shell: bash
run: |-
DIR="$(mktemp -d /tmp/pkl-$PKL_VERSION-XXXXXX)"
PKL_EXEC="$DIR/$PKL_FILENAME"
curl -sfL -o $PKL_EXEC "$PKL_DOWNLOAD_URL"
chmod +x $PKL_EXEC
echo "$DIR" >> "$GITHUB_PATH"
echo "pkl_exec=$PKL_EXEC" >> "$GITHUB_OUTPUT"
- name: swift test
run: |-
mkdir -p .out/test-results/
swift test -vv --parallel --num-workers 1 --xunit-output .out/test-results/xunit.xml -Xswiftc -warnings-as-errors
- run: git config --global --add safe.directory $(pwd)
- run: make test-snippets
- run: make test-pkl
- run: make generate-fixtures
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: test-results-xml-test-pkl-0-31-0
path: .out/test-results/**/*.xml
container:
image: swift:6.1-rhel-ubi9
test-sim-ios-simulator:
if: github.repository_owner == 'apple'
runs-on:
- self-hosted
- macos
env:
XCODE_VERSION: '26.1'
DEVELOPER_DIR: /Applications/Xcode_26.1.app
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- run: brew install gmp libyaml
- uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1
with:
ruby-version: '3.4'
- run: gem install xcpretty
- name: xcodebuild test
env:
LC_CTYPE: en_US.UTF-8
run: |-
xcodebuild -scheme pkl-swift-Package -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 17' ONLY_ACTIVE_ARCH=YES CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=YES COMPILER_INDEX_STORE_ENABLE=NO test \
| xcpretty --report junit --output .out/test-results/test-sim-ios-simulator.xml
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: test-results-xml-test-sim-ios-simulator
path: .out/test-results/**/*.xml
test-sim-watchos-simulator:
if: github.repository_owner == 'apple'
runs-on:
- self-hosted
- macos
env:
XCODE_VERSION: '26.1'
DEVELOPER_DIR: /Applications/Xcode_26.1.app
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- run: brew install gmp libyaml
- uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1
with:
ruby-version: '3.4'
- run: gem install xcpretty
- name: xcodebuild test
env:
LC_CTYPE: en_US.UTF-8
run: |-
xcodebuild -scheme pkl-swift-Package -sdk watchsimulator -destination 'platform=watchOS Simulator,name=Apple Watch Series 11 (42mm)' ONLY_ACTIVE_ARCH=YES CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=YES COMPILER_INDEX_STORE_ENABLE=NO test \
| xcpretty --report junit --output .out/test-results/test-sim-watchos-simulator.xml
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: test-results-xml-test-sim-watchos-simulator
path: .out/test-results/**/*.xml
test-sim-tvos-simulator:
if: github.repository_owner == 'apple'
runs-on:
- self-hosted
- macos
env:
XCODE_VERSION: '26.1'
DEVELOPER_DIR: /Applications/Xcode_26.1.app
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- run: brew install gmp libyaml
- uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1
with:
ruby-version: '3.4'
- run: gem install xcpretty
- name: xcodebuild test
env:
LC_CTYPE: en_US.UTF-8
run: |-
xcodebuild -scheme pkl-swift-Package -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV 4K (3rd generation)' ONLY_ACTIVE_ARCH=YES CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=YES COMPILER_INDEX_STORE_ENABLE=NO test \
| xcpretty --report junit --output .out/test-results/test-sim-tvos-simulator.xml
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: test-results-xml-test-sim-tvos-simulator
path: .out/test-results/**/*.xml
test-sim-mac-catalyst:
if: github.repository_owner == 'apple'
runs-on:
- self-hosted
- macos
env:
XCODE_VERSION: '26.1'
DEVELOPER_DIR: /Applications/Xcode_26.1.app
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- run: brew install gmp libyaml
- uses: ruby/setup-ruby@319994f95fa847cf3fb3cd3dbe89f6dcde9f178f # v1
with:
ruby-version: '3.4'
- run: gem install xcpretty
- name: xcodebuild test
env:
LC_CTYPE: en_US.UTF-8
run: |-
xcodebuild -scheme pkl-swift-Package -sdk macosx -destination 'platform=macOS,variant=Mac Catalyst,arch=arm64' ONLY_ACTIVE_ARCH=YES CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO ARCH=arm64 VALID_ARCHS=arm64 SUPPORTS_MACCATALYST=YES TARGETED_DEVICE_FAMILY=2 CODE_SIGN_IDENTITY=- test \
| xcpretty --report junit --output .out/test-results/test-sim-mac-catalyst.xml
- name: Upload Test Result XML
if: '!cancelled()'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: test-results-xml-test-sim-mac-catalyst
path: .out/test-results/**/*.xml
test-format-license-headers:
name: hawkeye-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || '' }}
persist-credentials: false
fetch-depth: 0
- run: git config --global --add safe.directory $(pwd)
- run: hawkeye check --config licenserc.toml --fail-if-unknown
container:
image: ghcr.io/korandoru/hawkeye@sha256:e0abf8dbfaeeeba1249679d662d9fb404b1dcdb041c6093ea1f7a6edb7d89319
test-format-swift:
name: test-format-swift
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- run: make swiftformat-lint
container:
image: swift:6.1-rhel-ubi9
test-format-pkl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Setup Pkl
id: setup-pkl
env:
PKL_VERSION: 0.31.0
PKL_FILENAME: pkl
PKL_DOWNLOAD_URL: https://github.com/apple/pkl/releases/download/0.31.0/pkl-linux-amd64
shell: bash
run: |-
DIR="$(mktemp -d /tmp/pkl-$PKL_VERSION-XXXXXX)"
PKL_EXEC="$DIR/$PKL_FILENAME"
curl -sfL -o $PKL_EXEC "$PKL_DOWNLOAD_URL"
chmod +x $PKL_EXEC
echo "$DIR" >> "$GITHUB_PATH"
echo "pkl_exec=$PKL_EXEC" >> "$GITHUB_OUTPUT"
- run: make pkl-format-lint
publish-test-results:
if: '!cancelled()'
needs:
- test-pkl-0-25-3
- test-pkl-0-31-0
- test-sim-ios-simulator
- test-sim-watchos-simulator
- test-sim-tvos-simulator
- test-sim-mac-catalyst
permissions:
checks: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
pattern: test-results-xml-*
- name: Publish test results
if: '!cancelled()'
uses: EnricoMi/publish-unit-test-result-action@c950f6fb443cb5af20a377fd0dfaa78838901040 # v2
with:
comment_mode: 'off'
files: test-results-xml-*/**/*.xml
trigger-downstream-builds:
if: github.repository_owner == 'apple'
needs:
- test-pkl-0-25-3
- test-pkl-0-31-0
- test-sim-ios-simulator
- test-sim-watchos-simulator
- test-sim-tvos-simulator
- test-sim-mac-catalyst
- test-format-license-headers
- test-format-swift
- test-format-pkl
- publish-test-results
runs-on: ubuntu-latest
steps:
- name: Create app token
id: app-token
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ secrets.PKL_CI_CLIENT_ID }}
private-key: ${{ secrets.PKL_CI }}
owner: ${{ github.repository_owner }}
- name: Trigger pkl-lang.org build
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
SOURCE_RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |-
gh workflow run \
--repo apple/pkl-lang.org \
--ref main \
--field source_run="${SOURCE_RUN}" \
main.yml
- name: Trigger pkl-package-docs build
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
SOURCE_RUN: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |-
gh workflow run \
--repo apple/pkl-package-docs \
--ref main \
--field source_run="${SOURCE_RUN}" \
main.yml