Skbuild #137
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@v3 | |
# 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: | |
mamba-version: "*" | |
auto-update-conda: true | |
auto-activate-base: false | |
activate-environment: cppe-gha | |
environment-file: .github/environment.yml | |
channel-priority: strict | |
python-version: ${{ matrix.python-version }} | |
- 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 --capture=no --color=yes -vvv |