-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (60 loc) · 1.86 KB
/
tests.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: bt tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
os: [macos-latest, ubuntu-latest]
cpp_compiler: [g++-13, clang++]
include:
- os: ubuntu-latest
c_compiler: gcc-13
cpp_compiler: g++-13
- os: macos-latest
c_compiler: clang
cpp_compiler: clang++
exclude:
- os: macos-latest
cpp_compiler: g++-13
- os: ubuntu-latest
cpp_compiler: clang++
steps:
- uses: actions/checkout@v3
- name: Install Conan
run: pip install conan
- name: Configure Conan
run: conan profile detect
- name: Install Requirements
run: >
conan install .
--output-folder=${{ runner.workspace }}/build
--build=missing -s compiler.cppstd=20
-s build_type=${{ matrix.build_type }}
- name: Configure CMake
working-directory: ${{runner.workspace}}
run: >
cmake -B ${{ runner.workspace }}/build -S ${{ github.workspace }}
-DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DBT_TEST=1
- name: Build Tests
working-directory: ${{runner.workspace}}/build/tests
run: make bt_tests
- name: Run Tests
working-directory: ${{runner.workspace}}/build
run: ctest --test-dir ./tests --output-on-failure
- name: Build benchmark
working-directory: ${{runner.workspace}}/build/tests
run: make bt_benchmark
- name: Run Benchmark
working-directory: ${{runner.workspace}}/build
run: ./tests/bt_benchmark