-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.59 KB
/
test_linux.yml
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
name: Linux
on: [push, pull_request]
jobs:
gcc:
name: GCC
strategy:
matrix:
cxx_std: [17, 20, 23]
build_mode: ["Debug", "Release"]
fail-fast: false
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
submodules: recursive
lfs: true
- name: Install system dependencies
run: |
sudo apt update
sudo apt install -y ninja-build cmake
- name: Install conan
run: |
pip install --force-reinstall -v "conan==1.59.0"
conan config init
conan config set general.revisions_enabled=1
conan profile update conf.tools.cmake.cmaketoolchain:generator=Ninja default
conan remote add modern-circuits https://moderncircuits.jfrog.io/artifactory/api/conan/modern-circuits-conan
- name: Build dependencies
run: >
conan install -if build
--build=missing
-pr:b=default
-pr:h=default
-c user.build:all=True
-s compiler.cppstd="${{ matrix.cxx_std }}"
-s build_type="${{ matrix.build_mode }}" .
- name: Configure
run: >
cmake -S. -Bbuild
-G"Ninja Multi-Config"
-DCMAKE_TOOLCHAIN_FILE="build/conan_toolchain.cmake"
-DCMAKE_CXX_STANDARD="${{ matrix.cxx_std }}"
-DMODERNCIRCUITS_ENABLE_WERROR=ON
- name: Build
run: cmake --build build --config "${{ matrix.build_mode }}"
- name: Test
run: ctest --test-dir build -C "${{ matrix.build_mode }}" --output-on-failure