Skip to content

CI/DEV: add linux-arm, macos, windows CI #2661

CI/DEV: add linux-arm, macos, windows CI

CI/DEV: add linux-arm, macos, windows CI #2661

Workflow file for this run

name: CI
permissions:
contents: read
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# Many color libraries just need this to be set to any value, but at least
# one distinguishes color depth, where "3" -> "256-bit color".
FORCE_COLOR: 3
jobs:
lint:
name: Lint
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
with:
pixi-version: v0.76.2
cache: true
environments: lint
- name: Lint (if this step fails, please 'pixi run lint' locally and push the changes)
run: pixi run -e lint lint
checks:
name: Test ${{ matrix.environment }} (${{ matrix.arch }})
runs-on: ${{ matrix.arch == 'arm' && 'ubuntu-24.04-arm' || matrix.x64_runner || 'ubuntu-slim' }}
strategy:
fail-fast: false
matrix:
environment:
- tests-py311
- tests-py314
- tests-numpy1
- tests-nogil
- tests-backends
- tests-backends-py311
- tests-run-deps
arch: [x64, arm]
include:
# Full x64 image is faster than ubuntu-slim for the slowest jobs
- {environment: tests-py311, x64_runner: ubuntu-latest}
- {environment: tests-backends, x64_runner: ubuntu-latest}
- {environment: tests-backends-py311, x64_runner: ubuntu-latest}
# Non-default pixi task (default: tests-ci)
- {environment: tests-nogil, task: "tests --parallel-threads=4", no-coverage: true}
- {environment: tests-run-deps, task: tests-run-deps-cov}
environment:
name: ci-checks
deployment: false
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
with:
pixi-version: v0.76.2
cache: true
environments: ${{ matrix.environment }}
- name: Test
run: pixi run -e "${TASK_ENV}" ${TASK}
env:
TASK_ENV: ${{ matrix.environment }}
TASK_ARGS: ${{ matrix.task || 'tests-ci' }}
- name: Upload coverage report
if: ${{ !matrix.no-coverage }}
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}