Hext Releases #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |