Skip to content

(auto) Paper PDF Draft #73

(auto) Paper PDF Draft

(auto) Paper PDF Draft #73

Workflow file for this run

name: C++ CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
debug_unix:
name: Debug ${{ matrix.label }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- label: linux-x64
runner: ubuntu-22.04
conda_pkgs: c-compiler cxx-compiler cmake ninja 'libboost>=1.73' 'fmt>=10' 'heyoka>=7' spdlog 'xtensor>=0.26' xtensor-blas pagmo-devel 'eigen<5' 'nlopt<2.10.1'
- label: linux-arm64
runner: ubuntu-22.04-arm
conda_pkgs: c-compiler cxx-compiler cmake ninja 'libboost>=1.73' 'fmt>=10' 'heyoka>=7' spdlog 'xtensor>=0.26' xtensor-blas pagmo-devel 'eigen<5' 'nlopt<2.10.1'
- label: macos-arm64
runner: macos-latest
conda_pkgs: c-compiler cxx-compiler cmake ninja 'libboost>=1.73' 'fmt>=10' 'heyoka>=7,<8' spdlog 'xtensor>=0.26' xtensor-blas pagmo-devel 'eigen<5' 'nlopt<2.10.1'
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
channels: conda-forge
channel-priority: strict
- name: Install dependencies
shell: bash
run: |
set -e
conda create -y -q -p "$HOME/local" ${{ matrix.conda_pkgs }}
- name: Configure
shell: bash
run: |
set -e
conda run -p "$HOME/local" cmake -S . -B build -G Ninja \
-DCMAKE_PREFIX_PATH="$HOME/local" \
-DCMAKE_BUILD_TYPE=Debug \
-Dkep3_BUILD_TESTS=ON \
-Dkep3_BUILD_BENCHMARKS=OFF \
-Dkep3_BUILD_PYTHON_BINDINGS=OFF
- name: Build
shell: bash
run: |
set -e
conda run -p "$HOME/local" cmake --build build --parallel
- name: Test
shell: bash
run: |
set -e
conda run -p "$HOME/local" ctest --test-dir build -VV --output-on-failure -j4
coverage_linux_x64:
name: Coverage linux-x64
runs-on: ubuntu-22.04
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
channels: conda-forge
channel-priority: strict
- name: Install dependencies
shell: bash
run: |
set -e
conda create -y -q -p "$HOME/local" \
c-compiler cxx-compiler cmake ninja lcov \
'libboost>=1.73' 'fmt>=10' 'heyoka>=7' spdlog \
'xtensor>=0.26' xtensor-blas pagmo-devel \
'eigen<5' 'nlopt<2.10.1'
- name: Configure
shell: bash
run: |
set -e
CXXFLAGS="${CXXFLAGS:-} --coverage" \
conda run -p "$HOME/local" cmake -S . -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX="$HOME/local" \
-DCMAKE_PREFIX_PATH="$HOME/local" \
-DCMAKE_BUILD_TYPE=Debug \
-Dkep3_BUILD_TESTS=ON \
-Dkep3_BUILD_BENCHMARKS=OFF \
-Dkep3_BUILD_PYTHON_BINDINGS=OFF
- name: Build
shell: bash
run: |
set -e
conda run -p "$HOME/local" cmake --build build --parallel --verbose
- name: Test
shell: bash
run: |
set -e
conda run -p "$HOME/local" ctest --test-dir build -VV --output-on-failure -j4
- name: Generate coverage report
shell: bash
run: |
set -e
conda run -p "$HOME/local" lcov --capture --directory build --output-file build/coverage.info
- name: Upload coverage
uses: codecov/codecov-action@v5
with:
use_oidc: true
files: build/coverage.info
flags: cpp
fail_ci_if_error: true
release_windows_x64:
name: Release windows-x64
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
channels: conda-forge
channel-priority: strict
- name: Configure
shell: powershell
run: |
conda create -y -q -p $env:USERPROFILE\local cmake ninja c-compiler cxx-compiler 'libboost>=1.73' 'fmt>=10' 'heyoka>=7' spdlog 'xtensor>=0.26' xtensor-blas pagmo-devel 'eigen<5' 'nlopt<2.10.1'
conda run -p $env:USERPROFILE\local cmake -S . -B build -G "Visual Studio 17 2022" -A x64 `
-DCMAKE_PREFIX_PATH=$env:USERPROFILE\local `
-DCMAKE_INSTALL_PREFIX=$env:USERPROFILE\local `
-Dkep3_BUILD_TESTS=ON `
-Dkep3_BUILD_BENCHMARKS=OFF `
-Dkep3_BUILD_PYTHON_BINDINGS=OFF
- name: Build
shell: powershell
run: conda run -p $env:USERPROFILE\local cmake --build build --config Release --parallel
- name: Test
shell: powershell
run: |
$env:PATH = "$PWD\build\test\Release;$PWD\build\Release;$env:USERPROFILE\local\Library\bin;$env:USERPROFILE\local\bin;$env:PATH"
ctest --test-dir build -VV --output-on-failure -j4 -C Release