Skip to content

[pre-commit.ci] pre-commit autoupdate (#6) #117

[pre-commit.ci] pre-commit autoupdate (#6)

[pre-commit.ci] pre-commit autoupdate (#6) #117

Workflow file for this run

name: Tests
on:
push:
branches:
- main
tags:
- '*'
pull_request:
schedule:
# Run weekly, Friday at 7:15 EST.
- cron: '15 12 * * 5'
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: "3.9"
compiler: gcc
- python-version: "3.10"
compiler: gcc
- python-version: "3.11"
compiler: gcc
- python-version: "3.12"
compiler: gcc
- python-version: "3.13"
compiler: gcc
- python-version: "3.12"
compiler: clang
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Clang with OpenMP support
if: ${{ matrix.compiler == 'clang' }}
run: |
sudo apt-get update
sudo apt-get install -y clang libomp-dev
- name: Set Compiler Environment
run: |
if [ "${{ matrix.compiler }}" == "gcc" ]; then
echo "Using GCC compiler"
echo "CC=gcc" >> $GITHUB_ENV
echo "CXX=g++" >> $GITHUB_ENV
else
echo "Using Clang compiler"
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
fi
# Not using uv sync due to https://github.com/astral-sh/uv/issues/10996
# Waiting for uv pip install --group: https://github.com/astral-sh/uv/issues/8590
- name: Install from source
run: |
uv venv
. .venv/bin/activate
uv export --only-group=dev | uv pip install -r -
uv pip install -v -Csetup-args="-Dwerror=true" .
- name: Run tests (no AVX512)
run: |
. .venv/bin/activate
pytest -v -k 'not avx512'