Skip to content

Refactor CMake with JRL CMake Modules v2 #107

Refactor CMake with JRL CMake Modules v2

Refactor CMake with JRL CMake Modules v2 #107

Workflow file for this run

name: CI - Pixi - Windows/Linux/macOS
on:
push:
branches:
- devel
pull_request:
paths-ignore:
- CHANGELOG.md
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pixi-ci:
name: Pixi CI - ${{ matrix.os }} - ${{ matrix.build_type }} - C++${{ matrix.cxx_std }}
runs-on: ${{ matrix.os }}
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 6
# Since pixi will install a compiler, the compiler mtime will be changed.
# This can invalidate the cache (https://ccache.dev/manual/latest.html#config_compiler_check)
CCACHE_COMPILERCHECK: content
CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
PROXSUITE_CXX_STANDARD: ${{ matrix.cxx_std }}
strategy:
fail-fast: false
matrix:
build_type: [Release, Debug]
cxx_std: [17, 20]
os: [ubuntu-22.04, ubuntu-24.04, macos-15-intel, macos-26, windows-2022, windows-2025]
steps:
- uses: actions/checkout@v6
- uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_std }}-${{ github.sha }}
restore-keys: ccache-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.cxx_std }}-
- name: Install Pixi
uses: prefix-dev/setup-pixi@v0.9.3
with:
pixi-version: latest
- name: Install Pixi environment
run: pixi install
- name: Configure
run: pixi run configure --fresh --log-level=DEBUG
- name: Build
run: pixi run build --verbose --parallel 1
- name: Install
run: pixi run install
- name: Test Python import
run: pixi run test-import-python
- name: Run C++ tests
if: ${{ !(startsWith(matrix.os, 'windows-') && matrix.build_type == 'Debug') }}
run: pixi run test
- name: Run packaging tests
run: pixi run test-packaging
- name: Uninstall
run: pixi run uninstall
pixi-lint:
name: Pixi Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Pixi
uses: prefix-dev/setup-pixi@v0.9.3
with:
environments: lint
- name: Lint
run: pixi run -e lint lint