Repository navigation
144 lines (140 loc) · 5.03 KB
/
Copy pathci-cpp.yml
File metadata and controls
144 lines (140 loc) · 5.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
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
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:
token: ${{ secrets.CODECOV_TOKEN }}
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