-
Notifications
You must be signed in to change notification settings - Fork 46
57 lines (53 loc) · 1.28 KB
/
ccpp.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
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
release:
types:
- published
jobs:
base:
name: Base library ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
name: Install Python
with:
python-version: '3.10'
- name: Checkout submodules
run: git submodule update --init --recursive
- uses: ilammy/msvc-dev-cmd@v1
if: matrix.os == 'windows-latest'
- name: Install CMake and Ninja
run: |
which python
python --version
pip install cmake ninja
- name: Configure
shell: bash -l {0}
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
export CC=cl.exe
export CXX=cl.exe
fi
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -Dgtest_force_shared_crt=ON
- name: Build
shell: bash -l {0}
run: |
cd build
ninja
- name: Test
shell: bash -l {0}
run: |
cd build
ctest