Skip to content

ci

ci #8

Workflow file for this run

name: CI
on:
push:
branches:
- seuif97
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
build:
name: ${{ matrix.python-version }} ${{ matrix.platform.os }}-${{ matrix.platform.python-architecture }}
runs-on: ${{ matrix.platform.os }}
strategy:
# If one platform fails, allow the rest to keep testing if `CI-no-fail-fast` label is present
fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }}
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev", pypy-3.7, pypy-3.8, pypy-3.9]
platform: [
{ os: "macos-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
{ os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" },
{ os: "windows-latest", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" },
{ os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" },
]
exclude:
# No 32-bit pypy 3.7 on Windows
- python-version: pypy-3.7
platform: { os: "windows-latest", python-architecture: "x86" }
# No 32-bit pypy 3.8 on Windows
- python-version: pypy-3.8
platform: { os: "windows-latest", python-architecture: "x86" }
# No 32-bit pypy 3.9 on Windows
- python-version: pypy-3.9
platform: { os: "windows-latest", python-architecture: "x86" }
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform.python-architecture }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform.rust-target }}
- name: Install Rust aarch64-apple-darwin target
if: matrix.platform.os == 'macos-latest'
run: rustup target add aarch64-apple-darwin
- name: Build package
run: pip install -e .