Skip to content

Commit

Permalink
Update Deno, build aarch64 wheels with QEMU (#68)
Browse files Browse the repository at this point in the history
* Use qemu with official manylinux2014 aarch docker image

* Rename wheel files

* Update deno to 1.34.2

* Update bundled licenses

* Use image similarity on python

* Drop cli arm builds. Cross compiling isn't working
  • Loading branch information
jonmmease committed Jun 25, 2023
1 parent 74a0af5 commit 48efbc8
Show file tree
Hide file tree
Showing 13 changed files with 4,491 additions and 2,407 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
python-version: ${{ matrix.options[1] }}
- name: install Python dependencies
run: |
python -m pip install pytest maturin
python -m pip install pytest maturin scikit-image
- name: Build development wheel
run: |
maturin develop -m vl-convert-python/Cargo.toml
Expand Down
73 changes: 38 additions & 35 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Release

on:
pull_request:
push:
branches:
- main
Expand All @@ -12,7 +13,6 @@ jobs:
matrix:
options:
- [ "x86_64-unknown-linux-gnu", "linux-64"]
- [ "aarch64-unknown-linux-gnu", "linux-aarch64"]
steps:
- uses: actions/checkout@v2
- name: Install latest stable Rust toolchain
Expand Down Expand Up @@ -103,44 +103,12 @@ jobs:
path: |
vl-convert_osx-64.zip
build-cli-osx-arm64:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Install latest stable Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Download Apple Silicon toolchain
run: |
rustup target add aarch64-apple-darwin
- name: Build vl-convert
uses: actions-rs/cargo@v1
with:
command: build
args: -p vl-convert --release --target aarch64-apple-darwin
- name: Move executable to bin directory
run: |
mkdir -p bin
cp target/aarch64-apple-darwin/release/vl-convert bin/
cp LICENSE bin/
cp thirdparty_* bin/
zip -r vl-convert_osx-arm64.zip bin/
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: vl-convert
path: |
vl-convert_osx-arm64.zip
build-wheels-linux:
build-wheels-linux-x86_64:
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- "x86_64-unknown-linux-gnu"
- "aarch64-unknown-linux-gnu"
steps:
- uses: actions/checkout@v3
- uses: messense/maturin-action@v1
Expand All @@ -155,6 +123,41 @@ jobs:
name: wheels
path: dist

build-wheels-linux-aarch64:
runs-on: ubuntu-latest
strategy:
matrix:
pyversion:
- "python3.11"
- "python3.10"
- "python3.9"
- "python3.8"
- "python3.7"
steps:
- uses: actions/checkout@v3
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
- uses: messense/maturin-action@v1
with:
manylinux: auto
container: quay.io/pypa/manylinux2014_aarch64
target: aarch64-unknown-linux-gnu
command: build
args: --release -m vl-convert-python/Cargo.toml --sdist -o dist -i ${{ matrix.pyversion }} --strip
# Not sure why the compiled wheels end up with x86_64 in the file name,
# they are aarch64 and work properly after being renamed.
- name: Rename files
run: |
sudo apt-get update
sudo apt-get install rename
ls dist/
rename 's/x86_64/aarch64/g' dist/vl_convert_python-*.whl
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

build-wheels-win-64:
runs-on: windows-latest
steps:
Expand Down Expand Up @@ -206,7 +209,7 @@ jobs:
name: Publish to PyPI
environment: PyPI Upload
runs-on: ubuntu-latest
needs: [ build-wheels-linux, build-wheels-win-64, build-wheels-osx-64, build-wheels-osx-arm64 ]
needs: [ build-wheels-linux-x86_64, build-wheels-linux-aarch64, build-wheels-win-64, build-wheels-osx-64, build-wheels-osx-arm64 ]
steps:
- uses: actions/download-artifact@v2
with:
Expand Down
Loading

0 comments on commit 48efbc8

Please sign in to comment.