-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.51 KB
/
ci.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
name: C++ CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
arch: [x86]
exclude:
- os: windows-latest
arch: arm64
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies on Linux
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y python3-pip cmake g++-multilib
pip3 install conan
conan profile detect
echo "[conf]" >> ~/.conan2/profiles/default
echo "tools.system.package_manager:mode=install" >> ~/.conan2/profiles/default
echo "tools.system.package_manager:sudo=True" >> ~/.conan2/profiles/default
- name: Create build directory
run: mkdir build
working-directory: ${{ github.workspace }}
- name: Install dependencies with Conan
run: conan install .. --build=missing -c tools.system.package_manager:mode=install
working-directory: ${{ github.workspace }}/build
- name: Configure CMake
run: cmake .. -G "Unix Makefiles" -DCMAKE_CXX_STANDARD=20 -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="conan_provider.cmake" -DCMAKE_BUILD_TYPE=Debug
working-directory: ${{ github.workspace }}/build
- name: Build
run: cmake --build .
working-directory: ${{ github.workspace }}/build
- name: Run tests
run: ctest
working-directory: ${{ github.workspace }}/build