Skbuild #150
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: CI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
FORCE_COLOR: 3 | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
python-version: | |
- "3.8" | |
- "3.11" | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
NINJA_STATUS: "[Built edge %f of %t in %e sec] " | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # such that setuptools_scm can do its job correctly | |
# this will set the system compiler; | |
# This must be done *before* setting up miniconda, see: | |
# https://github.com/ilammy/msvc-dev-cmd/issues/34 | |
- name: Set Windows env | |
if: matrix.os == 'windows-latest' | |
uses: ilammy/msvc-dev-cmd@v1 | |
env: | |
KMP_DUPLICATE_LIB_OK: "TRUE" | |
- name: Cache conda | |
uses: actions/cache@v3 | |
env: | |
# Increase this value to reset cache if .github/environment.yml has not changed | |
CACHE_NUMBER: 2 | |
with: | |
path: ~/conda_pkgs_dir | |
key: | |
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('.github/environment.yml') }} | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
auto-update-conda: true | |
auto-activate-base: false | |
channels: conda-forge | |
channel-priority: true | |
activate-environment: cppe-gha | |
environment-file: .github/environment.yml | |
- name: Select CMake CLI options | |
run: | | |
echo "We are running on ${{ matrix.os }}" | |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then | |
echo "SKBUILD_CMAKE_ARGS=-DCMAKE_CXX_COMPILER=g++;-GNinja" >> $GITHUB_ENV | |
elif [ "${{ matrix.os }}" == "macos-latest" ]; then | |
echo "SKBUILD_CMAKE_ARGS=-DCMAKE_CXX_COMPILER=clang++;-GNinja" >> $GITHUB_ENV | |
else | |
echo "SKBUILD_CMAKE_ARGS=-DCMAKE_CXX_COMPILER=clang-cl;-GNinja" >> $GITHUB_ENV | |
fi | |
- name: Configure, build, install | |
run: | | |
python -m pip install -v .[test] | |
- name: Test | |
run: | | |
python -m pytest -vvv --ignore=tests/test_fields.py --ignore=tests/test_functionality.py --ignore=tests/test_gradients.py --ignore=tests/test_solver.py |