Skip to content

Switching to scikit-build-core instead of meson for building (#215) #260

Switching to scikit-build-core instead of meson for building (#215)

Switching to scikit-build-core instead of meson for building (#215) #260

Workflow file for this run

name: Tests
on:
release:
types: [published]
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: "py${{ matrix.python-version }} / ${{ matrix.os }} / ${{ matrix.nox-session }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.11"]
os: [ubuntu-latest]
nox-session: ["tests"]
include:
- os: macos-latest
python-version: "3.11"
nox-session: "tests"
- os: ubuntu-latest
python-version: "3.11"
nox-session: "options"
steps:
- name: Clone the repo
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# if: ${{ runner.os != 'Windows' }}
- name: Set up Linux
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc g++ gfortran
if: ${{ runner.os == 'Linux' }}
- name: Set up macOS
run: brew unlink gfortran && brew link --overwrite gfortran
if: ${{ runner.os == 'macOS' }}
- name: Cache pip packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.nox-session }}-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/noxfile.py') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.nox-session }}-${{ hashFiles('**/pyproject.toml') }}-
${{ runner.os }}-pip-${{ matrix.python-version }}-${{ matrix.nox-session }}-
- name: Cache nox session files
uses: actions/cache@v3
with:
path: .nox
key: ${{ runner.os }}-nox-${{ matrix.python-version }}-${{ matrix.nox-session }}-${{ hashFiles('**/noxfile.py') }}
restore-keys: |
${{ runner.os }}-nox-${{ matrix.python-version }}-${{ matrix.nox-session }}-
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U nox
- name: Run tests
run: python -m nox --non-interactive --no-error-on-missing-interpreters -s ${{ matrix.nox-session }}-${{ matrix.python-version }}
env:
SPS_HOME: ${{ github.workspace }}/src/fsps/libfsps
docs:
if: github.event_name != 'pull_request'
name: "docs"
runs-on: ubuntu-latest
steps:
- name: Clone the repo
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install -U pip sphinx
python -m pip install .
- name: Build documentation
run: .github/workflows/build_docs.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPS_HOME: ${{ github.workspace }}/src/fsps/libfsps
STABLE: ${{ github.event_name == 'release' && github.event.action == 'published' }}