-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (48 loc) · 1.34 KB
/
main.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
name: unit-tests
on:
push:
branches: [ main ]
env:
BUILD_TYPE: Debug
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Create Python virtual environment
run: |
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
- name: Install Ninja
run: brew upgrade && brew install ninja
- name: Get Conan
uses: turtlebrowser/[email protected]
- name: Install Python dependencies
run: |
source venv/bin/activate
pip install conan
- name: Install gtest
run: |
brew install googletest
- name: Create default profile
run: |
source venv/bin/activate
conan profile detect
- name: Install dependencies
run: |
source venv/bin/activate
conan install . -s build_type=${{env.BUILD_TYPE}} --build=missing
- name: Configure CMake
run: cmake . -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build .
- name: Test
working-directory: ${{github.workspace}}
run: ctest -C ${{env.BUILD_TYPE}}