forked from sqreen/PyMiniRacer
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to v8 13.2 and use native aarch64 runners
- Loading branch information
Showing
7 changed files
with
54 additions
and
41 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,44 +32,40 @@ jobs: | |
- name: Build | ||
run: python -m build --sdist | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: sdist | ||
path: dist/* | ||
if-no-files-found: error | ||
|
||
# We build for Linux using uraimo/run-on-arch-action@v2, which runs a container under | ||
# the runner in order to reach different platforms (notably Alpine with its musl) and | ||
# architectures (notably aarch64) via emulation. uraimo/run-on-arch-action@v2 doesn't | ||
# support Mac or Windows, so we run a separate job for those. | ||
# architectures. uraimo/run-on-arch-action@v2 doesn't support Mac or Windows, so we | ||
# run a separate job for those. | ||
linux-wheels: | ||
name: Build wheel for ${{ matrix.image }} | ||
runs-on: ubuntu-latest | ||
name: Build wheel for ${{ matrix.config.image }} on ${{ matrix.config.os }} | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: | ||
config: | ||
# To maximize compatibility of generated wheels, we should theoreticaly build | ||
# on the *oldest* supported distros. | ||
# But V8 ships its own bullseye sysroot and links against that, so we may as | ||
# well run on bullseye (even though buster would provide an older supported | ||
# build distro): | ||
- debian:bullseye | ||
- arm64v8/debian:bullseye | ||
# Alpine 3.19 includes a clang new enough for V8 to build (with only minor | ||
# patches!). Builds on 3.19 seem incompatible with <= 3.18 due to libstdc++ | ||
# symbols. (And we can't just run on an old Alpine and update clang from the | ||
# llvm site, because unlike Debian, the llvm project doesn't maintain | ||
# updated packages for old Alpine distros.) | ||
- alpine:3.19 | ||
- arm64v8/alpine:3.19 | ||
exclude: | ||
# The aarch64 builds run really slowly, so let's skip them except for | ||
# releases. | ||
# For more info on this GitHub Actions hack, see: | ||
# https://stackoverflow.com/questions/65384420/how-do-i-make-a-github-action-matrix-element-conditional#answer-73822998 | ||
- image: ${{ !startsWith(github.ref, 'refs/heads/release/') && 'arm64v8/debian:bullseye' }} | ||
- image: ${{ !startsWith(github.ref, 'refs/heads/release/') && 'arm64v8/alpine:3.19' }} | ||
- os: ubuntu-latest # x86_64 base OS (on which we run a container) | ||
distro: bullseye | ||
arch: none | ||
- os: ubuntu-latest | ||
distro: alpine-latest | ||
arch: none | ||
- os: ubuntu-24.04-arm | ||
distro: bullseye | ||
arch: aarch64 | ||
- os: ubuntu-24.04-arm | ||
distro: alpine-latest | ||
arch: aarch64 | ||
|
||
steps: | ||
- name: Configure git | ||
|
@@ -88,9 +84,9 @@ jobs: | |
- uses: uraimo/run-on-arch-action@v2 | ||
name: Build wheel | ||
with: | ||
arch: none | ||
arch: ${{ matrix.config.arch }} | ||
distro: none | ||
base_image: ${{ matrix.image }} | ||
base_image: ${{ matrix.config.image }} | ||
|
||
setup: | | ||
mkdir -p "${PWD}/wheels" | ||
|
@@ -101,7 +97,7 @@ jobs: | |
shell: /bin/sh | ||
|
||
install: | | ||
case "${{ matrix.image }}" in | ||
case "${{ matrix.config.image }}" in | ||
*debian*) | ||
# Let's download some system packages! | ||
# Note that the precise list of packages we need is intertwined not just | ||
|
@@ -232,7 +228,7 @@ jobs: | |
cp dist/*.whl /wheels/ | ||
chmod a+rwx /wheels/*.whl | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels | ||
path: ./wheels/* | ||
|
@@ -243,7 +239,7 @@ jobs: | |
with: | ||
arch: none | ||
distro: none | ||
base_image: ${{ matrix.image }} | ||
base_image: ${{ matrix.config.image }} | ||
|
||
setup: | | ||
mkdir -p "${PWD}/wheels" | ||
|
@@ -254,7 +250,7 @@ jobs: | |
shell: /bin/sh | ||
|
||
install: | | ||
case "${{ matrix.image }}" in | ||
case "${{ matrix.config.image }}" in | ||
*debian*) | ||
PACKAGES="" | ||
PACKAGES="${PACKAGES} python3" | ||
|
@@ -280,7 +276,7 @@ jobs: | |
python3 -m venv /venv | ||
. /venv/bin/activate | ||
case "${{ matrix.image }}" in | ||
case "${{ matrix.config.image }}" in | ||
*debian*) | ||
python3 -m pip install --upgrade hatch hatch-fancy-pypi-readme hatch-mkdocs | ||
hatch run testinstalled:install /wheels/*.whl | ||
|
@@ -330,13 +326,19 @@ jobs: | |
# depot_tools still uses distutils which is gone in 3.12: | ||
python-version: '3.11' | ||
|
||
- name: Install Windows SDK | ||
uses: GuillaumeFalourd/[email protected] | ||
with: | ||
sdk-version: 26100 | ||
if: startsWith(matrix.config.os, 'windows') | ||
|
||
- name: Build wheel | ||
run: | | ||
set -e | ||
python3 -m pip install --upgrade build | ||
python3 -m build --wheel | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels | ||
path: dist/* | ||
|
@@ -359,7 +361,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
- uses: actions/download-artifact@v4 | ||
|
||
- name: Compute release version | ||
run: | | ||
|
@@ -386,7 +388,7 @@ jobs: | |
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
- uses: actions/download-artifact@v4 | ||
|
||
- name: Make dist directory | ||
run: mkdir dist && cp wheels/* sdist/* dist/ | ||
|
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
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
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
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
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
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