Skip to content

Speed up AVX-512 byte and fixed-width array scans #253

Speed up AVX-512 byte and fixed-width array scans

Speed up AVX-512 byte and fixed-width array scans #253

Workflow file for this run

name: build
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [ main ]
jobs:
build-and-test:
name: Testing on ${{ matrix.os }} with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: stable
- name: Install maturin and test dependencies
run: |
python -m pip install --upgrade pip
pip install maturin pytest pytest-benchmark
- name: Build and install with maturin
shell: bash
run: |
maturin build --release
pip install target/wheels/*.whl
- name: Run tests
run: pytest -vls test/
sdist:
if: startsWith(github.ref, 'refs/tags')
needs: build-and-test
name: Source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Rust
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
with:
toolchain: stable
- name: Build sdist
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: wheels-sdist
path: dist/*.tar.gz
wheels_linux:
if: startsWith(github.ref, 'refs/tags')
needs: build-and-test
name: Build Linux ${{ matrix.target }} wheels
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up QEMU
if: matrix.target == 'aarch64'
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
with:
platforms: arm64
- name: Build wheels
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
manylinux: auto
before-script-linux: |
# Install Rust in manylinux container
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
- name: Upload wheels
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: wheels-linux-${{ matrix.target }}
path: dist/*.whl
if-no-files-found: error
wheels_macos:
if: startsWith(github.ref, 'refs/tags')
needs: build-and-test
name: Build macOS ${{ matrix.target }} wheels
runs-on: macos-latest
strategy:
fail-fast: true
matrix:
target: [x86_64, aarch64]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Build wheels
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
with:
target: ${{ matrix.target == 'aarch64' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}
args: --release --out dist
- name: Upload wheels
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: wheels-macos-${{ matrix.target }}
path: dist/*.whl
if-no-files-found: error
wheels_windows:
if: startsWith(github.ref, 'refs/tags')
needs: build-and-test
name: Build Windows wheels
runs-on: windows-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Build wheels
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1
with:
args: --release --out dist
- name: Upload wheels
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: wheels-windows
path: dist/*.whl
if-no-files-found: error
publish-wheels:
if: startsWith(github.ref, 'refs/tags')
needs: [sdist, wheels_linux, wheels_macos, wheels_windows]
name: Publish wheels
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: dist
pattern: wheels-*
merge-multiple: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
packages-dir: dist/