Include binarized model in the wheels #59
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 -vv | |
sccache: 'false' | |
manylinux: auto | |
- run: ls -R | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-linux-${{ matrix.platform.target }} | |
path: dist | |
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: Publish to PyPI | |
uses: PyO3/maturin-action@v1 | |
with: | |
command: upload | |
args: --non-interactive --skip-existing wheels-*/* |