Update README #49
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 is autogenerated by maturin v1.7.0 | |
# To update, run | |
# | |
# maturin generate-ci github --platform linux | |
# | |
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- master | |
tags: | |
- '*' | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
linux: | |
runs-on: ${{ matrix.platform.runner }} | |
strategy: | |
matrix: | |
platform: | |
- runner: ubuntu-22.04 | |
target: x86_64 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
id: setup-python | |
with: | |
python-version: 3.9 | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
before-script-linux: | | |
case "${{ matrix.platform.target }}" in | |
"aarch64" | "armv7" | "s390x" | "ppc64le") | |
# NOTE: pypa/manylinux docker images are Debian based | |
sudo apt-get update | |
sudo apt-get install -y pkg-config libssl-dev | |
;; | |
"x86" | "x86_64") | |
# NOTE: rust-cross/manylinux docker images are CentOS based | |
yum update -y | |
yum install -y openssl openssl-devel | |
;; | |
esac | |
target: ${{ matrix.platform.target }} | |
args: --release --out dist --find-interpreter | |
sccache: 'true' | |
manylinux: auto | |
- run: pip install dist/*-cp39-*.whl | |
- run: heliport binarize | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-linux-${{ matrix.platform.target }} | |
path: dist | |
- name: Upload models | |
uses: actions/upload-artifact@v4 | |
with: | |
name: models-linux-${{ matrix.platform.target }} | |
path: /opt/hostedtoolcache/Python/${{ steps.setup-python.outputs.python-version }}/x64/lib/python3.9/site-packages/heliport/*.bin | |
sdist: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build sdist | |
uses: PyO3/maturin-action@v1 | |
with: | |
command: sdist | |
args: --out dist | |
- name: Upload sdist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-sdist | |
path: dist | |
release: | |
name: Release | |
environment: release | |
permissions: | |
id-token: write | |
contents: write | |
runs-on: ubuntu-22.04 | |
if: "startsWith(github.ref, 'refs/tags/')" | |
needs: [linux, sdist] | |
steps: | |
- uses: actions/download-artifact@v4 | |
- name: Display downloaded files | |
run: ls -R | |
- name: Archive model files | |
run: for i in models-*; do tar czvf $i.tgz $i/*; done | |
- name: Upload Github release assets | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: models-*.tgz | |
- name: Publish to PyPI | |
uses: PyO3/maturin-action@v1 | |
with: | |
command: upload | |
args: --non-interactive --skip-existing wheels-*/* |