Skip to content

build(deps): update rustc-hash requirement from 1.1.0 to 2.0.0 #333

build(deps): update rustc-hash requirement from 1.1.0 to 2.0.0

build(deps): update rustc-hash requirement from 1.1.0 to 2.0.0 #333

Workflow file for this run

# This file is autogenerated by maturin v1.3.2
# To update, run
#
# maturin generate-ci -m pyapi/Cargo.toml github
#
name: Python Build
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
jobs:
build-test:
name: Build and test
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: "build-test"
- name: Cargo build
run: cargo build -p rustsat-pyapi --verbose
env:
CMAKE_BUILD_PARALLEL_LEVEL: ${{ fromJSON('["", "4"]')[matrix.os == 'macos-latest'] }}
- name: Cargo test
run: cargo test -p rustsat-pyapi --verbose
env:
CMAKE_BUILD_PARALLEL_LEVEL: ${{ fromJSON('["", "4"]')[matrix.os == 'macos-latest'] }}
- name: Build Python package
uses: PyO3/maturin-action@v1
with:
args: -i python --manifest-path pyapi/Cargo.toml
- name: Install Python package
run: pip install --no-index --find-links target/wheels/ rustsat
- name: Test PyAPI example
run: python pyapi/examples/pyapi-dpw.py
version:
name: Ensure Python API crate version is in sync
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Check
run: "[ \"$(grep '^version = ' rustsat/Cargo.toml)\" = \"$(grep '^version = ' pyapi/Cargo.toml)\" ]"
linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --manifest-path pyapi/Cargo.toml
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.target }}
path: dist
pystubs:
name: Test python stubs
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Install maturin from PyPI
uses: install-pinned/maturin@0620ca40d2c575adaa48574fe2f6c76aa188e2c6
- name: Install mypy from PyPI
uses: install-pinned/mypy@cec260456eec5126750b72b8f0a6e6011eb85223
- name: Install python project
run: maturin build -m pyapi/Cargo.toml && pip install --no-index --find-links target/wheels/ rustsat
- name: Test stubs
run: stubtest --mypy-config-file pyapi/pyproject.toml --allowlist pyapi/stubtest-allowlist.txt rustsat
windows:
runs-on: windows-latest
strategy:
matrix:
target: [x64, x86]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --manifest-path pyapi/Cargo.toml
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.target }}
path: dist
macos:
runs-on: macos-latest
strategy:
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --manifest-path pyapi/Cargo.toml
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.target }}
path: dist
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist --manifest-path pyapi/Cargo.toml
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/rustsat-v')"
needs: [linux, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v4
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*