-
-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (99 loc) · 2.81 KB
/
build-test.yml
File metadata and controls
120 lines (99 loc) · 2.81 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Build and test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
linux:
strategy:
fail-fast: false
matrix:
type: [release, debug]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install doctest
if: ${{ matrix.type == 'debug' }}
run: |
git clone https://github.com/doctest/doctest.git
cd doctest
mkdir out
cd out
cmake ..
cmake --build .
sudo cmake --install .
- name: List presets
run: cmake --list-presets=all .
- name: Make preset
run: cmake --preset linux-${{ matrix.type }}
- name: Build
run: cmake --build .
working-directory: ./out/build/linux-${{ matrix.type }}
- name: Test
if: ${{ matrix.type == 'debug' }}
run: ./IFCA_tests
working-directory: ./out/build/linux-${{ matrix.type }}/tests/
windows-x64:
strategy:
fail-fast: false
matrix:
type: [release, debug]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: List presets
run: cmake --list-presets=all .
- name: Build all
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
git clone https://github.com/doctest/doctest.git
cd doctest
mkdir out
cd out
cmake ..
cmake --build .
cmake --install .
cd ../..
cmake --preset x64-${{ matrix.type }}
cd out/build/x64-${{ matrix.type }}
cmake --build .
- name: Test
if: ${{ matrix.type == 'debug' }}
run: .\IFCA_tests.exe
working-directory: ./out/build/x64-${{ matrix.type }}/tests
windows-x86:
strategy:
fail-fast: false
matrix:
type: [release, debug]
os: [windows-2019]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: List presets
run: cmake --list-presets=all .
- name: Build all
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86
git clone https://github.com/doctest/doctest.git
cd doctest
mkdir out
cd out
cmake ..
cmake --build .
cmake --install .
cd ../..
cmake --preset x86-${{ matrix.type }}
cd out/build/x86-${{ matrix.type }}
cmake --build .
- name: Test
if: ${{ matrix.type == 'debug' }}
run: .\IFCA_tests.exe
working-directory: ./out/build/x86-${{ matrix.type }}/tests