Skip to content

Commit e3fddd3

Browse files
committed
.github/workflows/hext-releases: refactor releases and tests
changes: * move building/testing into sub actions * remove code duplication in macos github actions * use macos-13 as build host for x86_64 macos releases * use ubuntu-22.04 for node linux releases * update rapidjson dependency on cent os * use free macos arm64 runner * add release linux node aarch64 * add release linux python aarch64 closes #42
1 parent 7538b79 commit e3fddd3

File tree

5 files changed

+360
-319
lines changed

5 files changed

+360
-319
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build node modules for linux
2+
runs:
3+
using: composite
4+
steps:
5+
- uses: actions/cache@v4
6+
id: boost_cache
7+
with:
8+
path: ${{ env.HEXT_BOOST_INSTALL_PATH }}
9+
key: linux-${{ env.HEXT_ARCH }}-boost-${{ env.HEXT_BOOST_VERSION }}
10+
11+
- uses: actions/cache@v4
12+
id: gumbo_cache
13+
with:
14+
path: ${{ env.HEXT_GUMBO_INSTALL_PATH }}
15+
key: linux-${{ env.HEXT_ARCH }}-gumbo-${{ env.HEXT_GUMBO_VERSION }}
16+
17+
- name: Install build dependencies
18+
shell: bash
19+
run: >
20+
sudo apt-get update > /dev/null
21+
&& sudo apt-get upgrade -y > /dev/null
22+
&& sudo apt-get install -y git curl libtool automake libicu-dev googletest libgtest-dev rapidjson-dev
23+
24+
- name: Install gumbo
25+
shell: bash
26+
if: steps.gumbo_cache.outputs.cache-hit != 'true'
27+
run: ./scripts/github-actions/linux/install-gumbo.sh
28+
29+
- name: Install boost
30+
shell: bash
31+
if: steps.boost_cache.outputs.cache-hit != 'true'
32+
run: ./scripts/github-actions/linux/install-boost.sh
33+
34+
- name: Build
35+
shell: bash
36+
run: ./scripts/github-actions/linux/build-hext-node-linux.sh
37+
38+
- uses: actions/upload-artifact@v4
39+
with:
40+
name: hext-node-linux-${{ env.HEXT_ARCH }}-${{ github.sha }}
41+
path: ${{ env.NODE_OUT }}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Build node modules and python wheels for macos
2+
inputs:
3+
build_python_version5:
4+
required: false
5+
default: 'true'
6+
runs:
7+
using: composite
8+
steps:
9+
- uses: actions/cache@v4
10+
id: boost_cache
11+
with:
12+
path: ${{ env.HEXT_BOOST_INSTALL_PATH }}
13+
key: macos-${{ env.HEXT_ARCH }}-boost-${{ env.HEXT_BOOST_VERSION }}
14+
15+
- uses: actions/cache@v4
16+
id: gumbo_cache
17+
with:
18+
path: ${{ env.HEXT_GUMBO_INSTALL_PATH }}
19+
key: macos-${{ env.HEXT_ARCH }}-gumbo-${{ env.HEXT_GUMBO_VERSION }}
20+
21+
- name: Install build dependencies
22+
shell: bash
23+
run: brew install rapidjson googletest autoconf automake libtool swig
24+
25+
- name: Install gumbo
26+
shell: bash
27+
if: steps.gumbo_cache.outputs.cache-hit != 'true'
28+
run: ./scripts/github-actions/macos/install-gumbo.sh
29+
30+
- name: Install boost
31+
shell: bash
32+
if: steps.boost_cache.outputs.cache-hit != 'true'
33+
run: ./scripts/github-actions/macos/install-boost.sh
34+
35+
- name: Install hext
36+
shell: bash
37+
run: ./scripts/github-actions/macos/install-hext.sh
38+
39+
- name: Build node modules
40+
shell: bash
41+
run: ./scripts/github-actions/macos/build-hext-node-macos.sh
42+
43+
- uses: actions/upload-artifact@v4
44+
with:
45+
name: hext-node-macos-${{ env.HEXT_ARCH }}-${{ github.sha }}
46+
path: ${{ env.NODE_OUT }}
47+
48+
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION5 }} wheel
49+
if: inputs.build_python_version5 == 'true'
50+
uses: ./.github/actions/build-hext-python-macos-version
51+
with:
52+
version: ${{ env.HEXT_PYTHON_VERSION5 }}
53+
arch: ${{ env.HEXT_ARCH }}
54+
55+
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION4 }} wheel
56+
uses: ./.github/actions/build-hext-python-macos-version
57+
with:
58+
version: ${{ env.HEXT_PYTHON_VERSION4 }}
59+
arch: ${{ env.HEXT_ARCH }}
60+
61+
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION3 }} wheel
62+
uses: ./.github/actions/build-hext-python-macos-version
63+
with:
64+
version: ${{ env.HEXT_PYTHON_VERSION3 }}
65+
arch: ${{ env.HEXT_ARCH }}
66+
67+
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION2 }} wheel
68+
uses: ./.github/actions/build-hext-python-macos-version
69+
with:
70+
version: ${{ env.HEXT_PYTHON_VERSION2 }}
71+
arch: ${{ env.HEXT_ARCH }}
72+
73+
- name: Build and upload python${{ env.HEXT_PYTHON_VERSION1 }} wheel
74+
uses: ./.github/actions/build-hext-python-macos-version
75+
with:
76+
version: ${{ env.HEXT_PYTHON_VERSION1 }}
77+
arch: ${{ env.HEXT_ARCH }}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build python wheels for linux
2+
runs:
3+
using: composite
4+
steps:
5+
- uses: actions/cache@v4
6+
id: boost_cache
7+
with:
8+
path: ${{ env.HEXT_BOOST_INSTALL_PATH }}
9+
key: ${{ env.HEXT_MANYLINUX_VERSION }}-${{ env.HEXT_ARCH }}-boost-${{ env.HEXT_BOOST_VERSION }}
10+
11+
- uses: actions/cache@v4
12+
id: gumbo_cache
13+
with:
14+
path: ${{ env.HEXT_GUMBO_INSTALL_PATH }}
15+
key: ${{ env.HEXT_MANYLINUX_VERSION }}-${{ env.HEXT_ARCH }}-gumbo-${{ env.HEXT_GUMBO_VERSION }}
16+
17+
- name: Install build dependencies
18+
shell: bash
19+
run: >
20+
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
21+
&& dnf install -y https://dl.fedoraproject.org/pub/epel/10/Everything/${{ env.HEXT_ARCH }}/Packages/r/rapidjson-devel-1.1.0-42.el10_0.${{ env.HEXT_ARCH }}.rpm
22+
&& yum install -y swig gtest-devel
23+
24+
- name: Install gumbo
25+
shell: bash
26+
if: steps.gumbo_cache.outputs.cache-hit != 'true'
27+
run: ./scripts/github-actions/linux/install-gumbo.sh
28+
29+
- name: Install boost
30+
shell: bash
31+
if: steps.boost_cache.outputs.cache-hit != 'true'
32+
run: ./scripts/github-actions/linux/install-boost.sh
33+
34+
- name: Build
35+
shell: bash
36+
run: ./scripts/github-actions/linux/build-hext-python-manylinux.sh
37+
38+
- name: Remove .gitignore
39+
shell: bash
40+
run: rm ${{ env.WHEEL_OUT }}/.gitignore
41+
42+
- uses: actions/upload-artifact@v4
43+
with:
44+
name: hext-python-linux-${{ env.HEXT_ARCH }}-${{ github.sha }}
45+
path: ${{ env.WHEEL_OUT }}
46+
47+
- name: Prepare upload
48+
shell: bash
49+
run: |
50+
mkdir upload
51+
cp /usr/local/bin/htmlext upload/
52+
strip --strip-unneeded upload/htmlext
53+
54+
- uses: actions/upload-artifact@v4
55+
with:
56+
name: htmlext-static-linux-${{ env.HEXT_ARCH }}-${{ github.sha }}
57+
path: upload
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Test node modules and python wheels for macos
2+
inputs:
3+
test_python_version5:
4+
required: false
5+
default: 'true'
6+
runs:
7+
using: composite
8+
steps:
9+
- name: Test python${{ env.HEXT_PYTHON_VERSION1 }} wheel
10+
uses: ./.github/actions/test-hext-python-macos-version
11+
with:
12+
version: ${{ env.HEXT_PYTHON_VERSION1 }}
13+
arch: ${{ env.HEXT_ARCH }}
14+
15+
- name: Test python${{ env.HEXT_PYTHON_VERSION2 }} wheel
16+
uses: ./.github/actions/test-hext-python-macos-version
17+
with:
18+
version: ${{ env.HEXT_PYTHON_VERSION2 }}
19+
arch: ${{ env.HEXT_ARCH }}
20+
21+
- name: Test python${{ env.HEXT_PYTHON_VERSION3 }} wheel
22+
uses: ./.github/actions/test-hext-python-macos-version
23+
with:
24+
version: ${{ env.HEXT_PYTHON_VERSION3 }}
25+
arch: ${{ env.HEXT_ARCH }}
26+
27+
- name: Test python${{ env.HEXT_PYTHON_VERSION4 }} wheel
28+
uses: ./.github/actions/test-hext-python-macos-version
29+
with:
30+
version: ${{ env.HEXT_PYTHON_VERSION4 }}
31+
arch: ${{ env.HEXT_ARCH }}
32+
33+
- name: Test python${{ env.HEXT_PYTHON_VERSION5 }} wheel
34+
if: inputs.test_python_version5 == 'true'
35+
uses: ./.github/actions/test-hext-python-macos-version
36+
with:
37+
version: ${{ env.HEXT_PYTHON_VERSION5 }}
38+
arch: ${{ env.HEXT_ARCH }}
39+
40+
- uses: ./.github/actions/test-hext-npm

0 commit comments

Comments
 (0)