Switching to scikit-build-core instead of meson for building #240
Workflow file for this run
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: Tests | |
on: | |
release: | |
types: [published] | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
tests: | |
name: "py${{ matrix.python-version }} / ${{ matrix.os }} / ${{ matrix.nox-session }}" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
os: [ubuntu-latest] | |
nox-session: ["tests"] | |
include: | |
- os: macos-latest | |
python-version: "3.10" | |
nox-session: "tests" | |
- os: windows-latest | |
python-version: "3.10" | |
nox-session: "tests" | |
- os: ubuntu-latest | |
python-version: "3.10" | |
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 }} | |
- 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: Set up Windows | |
run: | | |
choco install rtools -y --no-progress --force --version=4.0.0.20220206 | |
echo "c:\rtools40\ucrt64\bin;" >> $env:GITHUB_PATH | |
if: ${{ runner.os == 'Windows' }} | |
- 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' }} |