-
Notifications
You must be signed in to change notification settings - Fork 24
78 lines (63 loc) · 1.88 KB
/
test_conan.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
74
75
76
77
78
name: Tests (Conan)
on:
pull_request:
branches: [main]
workflow_call:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
run_tests:
name: Conan build
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
config:
- { cc: "gcc", cxx: "g++" }
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore ccache caches
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}
- name: Conan cache
uses: actions/cache@v4
with:
path: ~/.conan/data
key: conan-${{ runner.os }}-${{ hashFiles('**/conanfile.py') }}
- name: apt cache
uses: actions/cache@v4
with:
path: |
/var/cache/apt/
/var/lib/apt/
key: apt-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/install_deps_ubuntu.sh') }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Set up pipx
run: |
python -m pip install --user pipx
python -m pipx ensurepath
- name: Set up Conan
run: |
pipx install cmake
pipx install conan
- name: Install compilers
run: sudo apt install build-essential ninja-build ccache
- name: Build sc-machine with tests
id: run_cmake
run: |
cmake --preset release-with-tests-conan
cmake --build --preset release
- name: Run sc-machine tests
id: run_tests
run: cd build/Release && ctest -C Release -V
- name: Run sc-machine
id: run_sc_machine
run: |
mkdir kb
build/Release/bin/sc-builder -i kb -o kb.bin --clear
build/Release/bin/sc-machine -c sc-machine.ini -e build/Release/lib/extensions -s kb.bin -t