-
Notifications
You must be signed in to change notification settings - Fork 5
61 lines (53 loc) · 1.44 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
50
51
52
53
54
55
56
57
58
59
60
61
name: CI tests
on:
- push
- pull_request
jobs:
build:
name: libpotassco tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
include:
- os: 'ubuntu-latest'
generator: 'Ninja'
build_type: 'Debug'
- os: 'macos-latest'
generator: 'Ninja'
build_type: 'Debug'
- os: 'windows-latest'
generator: 'Visual Studio 17 2022'
build_type: 'Debug'
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: install prerequisites on ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
run:
sudo apt install ninja-build
- name: install prerequisites on macos
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew update
brew install ninja
- name: Configure CMake
run: >
cmake
-G "${{ matrix.generator }}"
-B "${{github.workspace}}/build"
-DCMAKE_BUILD_TYPE="${{matrix.build_type}}"
-DLIB_POTASSCO_BUILD_TESTS="On"
-DCMAKE_CXX_STANDARD="14"
- name: Build
run: >
cmake
--build "${{github.workspace}}/build"
--config "${{matrix.build_type}}"
- name: Test
working-directory: ${{github.workspace}}/build
run: >
ctest
-C "${{matrix.build_type}}"