Replaced deprecated universal2 flag with universal2-apple-darwin #12
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: Build wheels | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
macos: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly-2024-02-04 | |
target: aarch64-apple-darwin | |
profile: minimal | |
default: true | |
- name: Build wheels - universal2 | |
if: ${{ matrix.python-version != '3.7' }} | |
uses: messense/maturin-action@v1 | |
with: | |
args: -i python --release --universal2-apple-darwin --out dist | |
rust-toolchain: nightly-2024-02-04 | |
- name: Install built wheel - universal2 | |
if: ${{ matrix.python-version != '3.7' }} | |
run: | | |
pip install py-sr25519-bindings --no-index --find-links dist --force-reinstall | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-wheels-mac-${{ matrix.python-version }} | |
path: dist/*.whl | |
windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | |
target: [x64, x86] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: ${{ matrix.target }} | |
- name: Update rustup | |
run: rustup self update | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly-2024-02-04 | |
profile: minimal | |
default: true | |
- name: Build | |
if: matrix.target == 'x64' | |
run: cargo build --release | |
- name: Build wheels | |
uses: messense/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: -i python --release --out dist | |
rust-toolchain: nightly-2024-02-04 | |
- name: Install built wheel | |
run: | | |
pip install py-sr25519-bindings --no-index --find-links dist --force-reinstall | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-wheels-win-${{ matrix.target }}-${{ matrix.python-version }} | |
path: dist/*.whl | |
linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | |
target: [x86_64, i686] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly-2024-02-04 | |
profile: minimal | |
default: true | |
- name: Build | |
run: cargo build --release | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Build Wheels | |
uses: messense/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
rust-toolchain: nightly-2024-02-04 | |
manylinux: auto | |
args: -i python${{ matrix.python-version }} --release --out dist | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-wheels-linux-${{ matrix.target }}-${{ matrix.python-version }} | |
path: dist/*.whl | |
muslwheels_x86: | |
name: Build musllinux wheels for x86 | |
runs-on: ubuntu-latest | |
env: | |
CIBW_BUILD_VERBOSITY: 1 | |
CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2024-02-04 -y" | |
CIBW_ARCHS_LINUX: "auto64" | |
CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' | |
CIBW_BUILD: "*-musllinux_x86_64" | |
CIBW_SKIP: "cp27-* cp34-* cp35-* cp36-*" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.9.0 | |
with: | |
output-dir: dist | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-wheels-musl | |
path: dist/*.whl | |
aarch64_wheels: | |
name: Build wheels for aarch64 linux | |
runs-on: ubuntu-latest | |
env: | |
CIBW_BUILD_VERBOSITY: 1 | |
CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2024-02-04 -y" | |
CIBW_ARCHS_LINUX: "aarch64" | |
CIBW_ENVIRONMENT: 'PATH="$PATH:$HOME/.cargo/bin"' | |
CIBW_BUILD: "*-musllinux_aarch64 *-manylinux_aarch64" | |
CIBW_SKIP: "cp27-* cp34-* cp35-* cp36-*" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Build wheels | |
uses: pypa/cibuildwheel@v2.9.0 | |
with: | |
output-dir: dist | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-wheels-aarch64 | |
path: dist/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist-src | |
path: dist/*.tar.gz |