-
Notifications
You must be signed in to change notification settings - Fork 3
497 lines (412 loc) · 14.6 KB
/
hext-releases.yml
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
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
name: Hext Releases
on: [push]
env:
HEXT_BOOST_VERSION: "1.86.0"
HEXT_BOOST_SHA256: "2575e74ffc3ef1cd0babac2c1ee8bdb5782a0ee672b1912da40e5b4b591ca01f"
HEXT_BOOST_INSTALL_PATH: "${{ github.workspace }}/boost_root"
HEXT_GUMBO_VERSION: "0.10.1"
HEXT_GUMBO_SHA256: "28463053d44a5dfbc4b77bcf49c8cee119338ffa636cc17fc3378421d714efad"
HEXT_GUMBO_INSTALL_PATH: "${{ github.workspace }}/gumbo_root"
# NOTE: when changing HEXT_MANYLINUX_VERSION, also change the container images.
# See `image: quay.io/pypa/manylinux_*_x86_64`.
HEXT_MANYLINUX_VERSION: "manylinux_2_28"
HEXT_PYTHON_VERSION1: "3.13"
HEXT_PYTHON_VERSION2: "3.12"
HEXT_PYTHON_VERSION3: "3.11"
HEXT_PYTHON_VERSION4: "3.10"
# NOTE: HEXT_PYTHON_VERSION5 is currently not built/tested for macos_arm_releases
HEXT_PYTHON_VERSION5: "3.9"
HEXT_NODE_VERSION1: "23"
HEXT_NODE_VERSION2: "22"
HEXT_NODE_VERSION3: "20"
HEXT_NODE_VERSION4: "18"
HEXT_NODE_API_VERSION1: "23.0.0"
HEXT_NODE_API_VERSION2: "22.0.0"
HEXT_NODE_API_VERSION3: "20.0.0"
HEXT_NODE_API_VERSION4: "18.0.0"
jobs:
###
### Macos Releases (Node, Python)
###
macos_releases:
name: Macos Releases (Node, Python)
runs-on: macos-12
env:
# 2021-12-16: Using MACOSX_DEPLOYMENT_TARGET="10.11" triggers the
# following notice when building the python hext wheel:
# Warning: MACOSX_DEPLOYMENT_TARGET is set to a lower value (10.11)
# than the version on which the Python interpreter was compiled (10.14),
# and will be ignored.
MACOSX_DEPLOYMENT_TARGET: "10.11"
HEXT_ARCH: "x86_64"
WHEEL_OUT: scripts/github-actions/macos/wheel-output
NODE_OUT: scripts/github-actions/macos/node-output
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/cache@v4
id: boost_cache
with:
path: ${{ env.HEXT_BOOST_INSTALL_PATH }}
key: macos-boost-${{ env.HEXT_BOOST_VERSION }}
- uses: actions/cache@v4
id: gumbo_cache
with:
path: ${{ env.HEXT_GUMBO_INSTALL_PATH }}
key: macos-gumbo-${{ env.HEXT_GUMBO_VERSION }}
- name: Install build dependencies
run: brew install rapidjson googletest automake
- name: Install gumbo
if: steps.gumbo_cache.outputs.cache-hit != 'true'
run: ./scripts/github-actions/macos/install-gumbo.sh
- name: Install boost
if: steps.boost_cache.outputs.cache-hit != 'true'
run: ./scripts/github-actions/macos/install-boost.sh
- name: Install hext
run: ./scripts/github-actions/macos/install-hext.sh
- name: Build node modules
run: ./scripts/github-actions/macos/build-hext-node-macos.sh
- uses: actions/upload-artifact@v4
with:
name: hext-node-macos-${{ env.HEXT_ARCH }}-${{ github.sha }}
path: ${{ env.NODE_OUT }}
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION5 }} wheel
uses: ./.github/actions/build-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION5 }}
arch: ${{ env.HEXT_ARCH }}
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION4 }} wheel
uses: ./.github/actions/build-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION4 }}
arch: ${{ env.HEXT_ARCH }}
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION3 }} wheel
uses: ./.github/actions/build-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION3 }}
arch: ${{ env.HEXT_ARCH }}
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION2 }} wheel
uses: ./.github/actions/build-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION2 }}
arch: ${{ env.HEXT_ARCH }}
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION1 }} wheel
uses: ./.github/actions/build-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION1 }}
arch: ${{ env.HEXT_ARCH }}
###
### Macos Tests (Python)
###
macos_python_test:
name: Macos Tests (Python)
needs: macos_releases
runs-on: macos-12
env:
HEXT_ARCH: "x86_64"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Test python${{ env.HEXT_PYTHON_VERSION1 }} wheel
uses: ./.github/actions/test-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION1 }}
arch: ${{ env.HEXT_ARCH }}
- name: Test python${{ env.HEXT_PYTHON_VERSION2 }} wheel
uses: ./.github/actions/test-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION2 }}
arch: ${{ env.HEXT_ARCH }}
- name: Test python${{ env.HEXT_PYTHON_VERSION3 }} wheel
uses: ./.github/actions/test-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION3 }}
arch: ${{ env.HEXT_ARCH }}
- name: Test python${{ env.HEXT_PYTHON_VERSION4 }} wheel
uses: ./.github/actions/test-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION4 }}
arch: ${{ env.HEXT_ARCH }}
- name: Test python${{ env.HEXT_PYTHON_VERSION5 }} wheel
uses: ./.github/actions/test-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION5 }}
arch: ${{ env.HEXT_ARCH }}
###
### Macos ARM64 Releases (Node, Python)
###
macos_arm_releases:
name: Macos ARM64 Releases (Node, Python)
runs-on: macos-13-xlarge
env:
# Mac OS 11 was the first version for ARM64
MACOSX_DEPLOYMENT_TARGET: "11.0"
HEXT_ARCH: "arm64"
WHEEL_OUT: scripts/github-actions/macos/wheel-output
NODE_OUT: scripts/github-actions/macos/node-output
steps:
- name: Print architecture
run: uname -m
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/cache@v4
id: boost_cache
with:
path: ${{ env.HEXT_BOOST_INSTALL_PATH }}
key: macos-arm-boost-${{ env.HEXT_BOOST_VERSION }}
- uses: actions/cache@v4
id: gumbo_cache
with:
path: ${{ env.HEXT_GUMBO_INSTALL_PATH }}
key: macos-arm-gumbo-${{ env.HEXT_GUMBO_VERSION }}
- name: Install build dependencies
run: brew install rapidjson googletest autoconf automake libtool swig
- name: Install gumbo
if: steps.gumbo_cache.outputs.cache-hit != 'true'
run: ./scripts/github-actions/macos/install-gumbo.sh
- name: Install boost
if: steps.boost_cache.outputs.cache-hit != 'true'
run: ./scripts/github-actions/macos/install-boost.sh
- name: Install hext
run: ./scripts/github-actions/macos/install-hext.sh
- name: Build node modules
run: ./scripts/github-actions/macos/build-hext-node-macos.sh
- uses: actions/upload-artifact@v4
with:
name: hext-node-macos-${{ env.HEXT_ARCH }}-${{ github.sha }}
path: ${{ env.NODE_OUT }}
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION4 }} wheel
uses: ./.github/actions/build-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION4 }}
arch: ${{ env.HEXT_ARCH }}
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION3 }} wheel
uses: ./.github/actions/build-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION3 }}
arch: ${{ env.HEXT_ARCH }}
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION2 }} wheel
uses: ./.github/actions/build-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION2 }}
arch: ${{ env.HEXT_ARCH }}
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION1 }} wheel
uses: ./.github/actions/build-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION1 }}
arch: ${{ env.HEXT_ARCH }}
###
### Linux Releases (Python)
###
linux_python_releases:
name: Linux Releases (Python)
runs-on: ubuntu-latest
container:
# NOTE:
# This container image must be the same version as described in the
# env var "HEXT_MANYLINUX_VERSION".
# Unfortunately, env vars cannot be referenced when specifying the
# name of the container image.
image: quay.io/pypa/manylinux_2_28_x86_64
env:
WHEEL_OUT: scripts/github-actions/linux/wheel-output
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/cache@v4
id: boost_cache
with:
path: ${{ env.HEXT_BOOST_INSTALL_PATH }}
key: ${{ env.HEXT_MANYLINUX_VERSION }}-boost-${{ env.HEXT_BOOST_VERSION }}
- uses: actions/cache@v4
id: gumbo_cache
with:
path: ${{ env.HEXT_GUMBO_INSTALL_PATH }}
key: ${{ env.HEXT_MANYLINUX_VERSION }}-gumbo-${{ env.HEXT_GUMBO_VERSION }}
- name: Install build dependencies
run: >
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
&& yum install -y swig rapidjson-devel gtest-devel
- name: Install gumbo
if: steps.gumbo_cache.outputs.cache-hit != 'true'
run: ./scripts/github-actions/linux/install-gumbo.sh
- name: Install boost
if: steps.boost_cache.outputs.cache-hit != 'true'
run: ./scripts/github-actions/linux/install-boost.sh
- name: Build
run: ./scripts/github-actions/linux/build-hext-python-manylinux.sh
- name: Remove .gitignore
run: rm ${{ env.WHEEL_OUT }}/.gitignore
- uses: actions/upload-artifact@v4
with:
name: hext-python-linux-${{ github.sha }}
path: ${{ env.WHEEL_OUT }}
- name: Prepare upload
run: |
mkdir upload
cp /usr/local/bin/htmlext upload/
strip --strip-unneeded upload/htmlext
- uses: actions/upload-artifact@v4
with:
name: htmlext-static-linux-x86_64-${{ github.sha }}
path: upload
###
### Linux Tests (Python)
###
linux_python_test:
name: Linux Tests (Python)
needs: linux_python_releases
runs-on: ubuntu-latest
env:
WHEEL_OUT: scripts/github-actions/linux/wheel-output
container:
# NOTE:
# This container image must be the same version as described in the
# env var "HEXT_MANYLINUX_VERSION".
# Unfortunately, env vars cannot be referenced when specifying the
# name of the container image.
image: quay.io/pypa/manylinux_2_28_x86_64
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/download-artifact@v4
with:
name: hext-python-linux-${{ github.sha }}
path: ${{ env.WHEEL_OUT }}
- name: Pip install and test
run: ./scripts/github-actions/linux/test-hext-python-manylinux.sh
###
### Linux Releases (Node)
###
linux_node_releases:
name: Linux Releases (Node)
runs-on: ubuntu-20.04
env:
NODE_OUT: scripts/github-actions/linux/node-output
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/cache@v4
id: boost_cache
with:
path: ${{ env.HEXT_BOOST_INSTALL_PATH }}
key: linux-boost-${{ env.HEXT_BOOST_VERSION }}
- uses: actions/cache@v4
id: gumbo_cache
with:
path: ${{ env.HEXT_GUMBO_INSTALL_PATH }}
key: linux-gumbo-${{ env.HEXT_GUMBO_VERSION }}
- name: Install build dependencies
run: >
sudo apt-get update > /dev/null
&& sudo apt-get upgrade -y > /dev/null
&& sudo apt-get install -y git curl libtool automake libicu-dev googletest libgtest-dev rapidjson-dev
- name: Install gumbo
if: steps.gumbo_cache.outputs.cache-hit != 'true'
run: ./scripts/github-actions/linux/install-gumbo.sh
- name: Install boost
if: steps.boost_cache.outputs.cache-hit != 'true'
run: ./scripts/github-actions/linux/install-boost.sh
- name: Build
run: ./scripts/github-actions/linux/build-hext-node-linux.sh
- uses: actions/upload-artifact@v4
with:
name: hext-node-linux-${{ github.sha }}
path: ${{ env.NODE_OUT }}
###
### Create NPM Package
###
create_npm_package:
needs: [macos_releases, macos_arm_releases, linux_node_releases]
runs-on: ubuntu-latest
name: Create NPM Package
env:
NODE_MODULES: scripts/github-actions/npm/node-modules/
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/download-artifact@v4
with:
name: hext-node-macos-arm64-${{ github.sha }}
path: ${{ env.NODE_MODULES }}
- uses: actions/download-artifact@v4
with:
name: hext-node-macos-x86_64-${{ github.sha }}
path: ${{ env.NODE_MODULES }}
- uses: actions/download-artifact@v4
with:
name: hext-node-linux-${{ github.sha }}
path: ${{ env.NODE_MODULES }}
- run: >
./scripts/github-actions/npm/create-npm-package.sh
scripts/github-actions/npm/package
"$NODE_MODULES"/*node
- uses: actions/upload-artifact@v4
with:
name: hext-npm-package-${{ github.sha }}
path: ./scripts/github-actions/npm/package
###
### Linux Tests (Node)
###
linux_node_test:
needs: create_npm_package
runs-on: ubuntu-latest
name: Linux Tests (Node)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/test-hext-npm
###
### Macos Tests (Node)
###
macos_node_test:
needs: create_npm_package
runs-on: macos-12
name: Macos Tests (Node)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/test-hext-npm
###
### Macos ARM64 Tests (Python, Node)
###
macos_arm_test:
name: Macos ARM64 Tests (Python, Node)
needs: [macos_arm_releases, create_npm_package]
runs-on: macos-13-xlarge
env:
HEXT_ARCH: "arm64"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Test python${{ env.HEXT_PYTHON_VERSION1 }} wheel
uses: ./.github/actions/test-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION1 }}
arch: ${{ env.HEXT_ARCH }}
- name: Test python${{ env.HEXT_PYTHON_VERSION2 }} wheel
uses: ./.github/actions/test-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION2 }}
arch: ${{ env.HEXT_ARCH }}
- name: Test python${{ env.HEXT_PYTHON_VERSION3 }} wheel
uses: ./.github/actions/test-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION3 }}
arch: ${{ env.HEXT_ARCH }}
- name: Test python${{ env.HEXT_PYTHON_VERSION4 }} wheel
uses: ./.github/actions/test-hext-python-macos-version
with:
version: ${{ env.HEXT_PYTHON_VERSION4 }}
arch: ${{ env.HEXT_ARCH }}
- uses: ./.github/actions/test-hext-npm