Update README.md #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Software on Multiple OS and Python Versions | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Test on ${{ matrix.os }} with Python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-2019, windows-2022, macos-14, macos-13] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
exclude: | |
- os: "macos-14" | |
python-version: "3.8" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge,defaults | |
use-only-tar-bz2: true | |
- name: Activate conda environment | |
shell: bash -l {0} | |
run: | | |
conda create -n workshop_dirac python=${{ matrix.python-version }} -y --channel=defaults --override-channels | |
conda activate workshop_dirac | |
conda install -y --channel conda-forge cmake clang lld llvmdev ninja | |
echo "Conda environment activated" | |
if: "!contains(matrix.os, 'windows')" | |
- name: Activate conda environment | |
shell: bash -l {0} | |
run: | | |
conda create -n workshop_dirac python=${{ matrix.python-version }} -y --channel=defaults --override-channels | |
conda activate workshop_dirac | |
conda install -y --channel conda-forge cmake clang=15 lld=15 llvmdev=15 ninja | |
echo "Conda environment activated" | |
if: contains(matrix.os, 'windows') | |
- name: Install dependencies | |
shell: bash -l {0} | |
run: | | |
conda activate workshop_dirac | |
pip install -r requirements.txt | |
- name: Run tests | |
shell: bash -l {0} | |
run: | | |
conda activate workshop_dirac | |
echo 'y' | python test.py | |