-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (47 loc) · 1.26 KB
/
test.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: Test
on:
push:
branches:
- master
pull_request:
jobs:
cpp:
name: 'C++ tests and examples'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
if: matrix.os == 'macos-latest'
run: |
brew install bison flex
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
echo "/usr/local/opt/flex/bin" >> $GITHUB_PATH
- uses: actions/cache@v3
if: matrix.os == 'windows-latest'
with:
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
key: ${{ runner.os }}-chocolatey-cpp-0
restore-keys: |
${{ runner.os }}-chocolatey-cpp-
${{ runner.os }}-chocolatey-
- name: Install dependencies
if: matrix.os == 'windows-latest'
run: choco install winflexbison3 --version 2.5.18.20190508
- name: Configure
run: cmake . -DTREE_GEN_BUILD_TESTS=ON
- name: Build
run: cmake --build . --parallel
- name: Test
run: ctest -C Debug --output-on-failure