-
Notifications
You must be signed in to change notification settings - Fork 18
56 lines (47 loc) · 1.6 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
name: test
on: [ push, pull_request ]
jobs:
test_ubuntu:
name: Run CMake Test on Ubuntu (GCC) 🧪
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Build Tools
run: |
sudo apt-get update
sudo apt-get install -y gcc cmake
- name: Build and Run 64bit Tests
run: |
mkdir build
cd build
cmake -DBUILD=test ..
make
make test || ctest --rerun-failed --output-on-failure
- name: Build and Run 32bit Tests
run: |
rm -rf build
mkdir build
cd build
cmake -DBUILD=test -DFORCE_32BIT=1 ..
make
make test || ctest --rerun-failed --output-on-failure
test_windows:
name: Run CMake Test on Windows (MSVC) 🧪
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Build and Run 64bit Tests
run: |
mkdir build && cd build
cmake -DBUILD=test -G "Visual Studio 17 2022" -A x64 ..
cmake --build . --config Release --target all --
ctest -C Release -T test || ctest -C Release -T test --rerun-failed --output-on-failure
- name: Build and Run 32bit Tests
run: |
Remove-Item -Path build -Force
mkdir build && cd build
cmake -DBUILD=test -DFORCE_32BIT=1 -G "Visual Studio 17 2022" -A x86 ..
cmake --build . --config Release --target all --
ctest -C Release -T test || ctest -C Release -T test --rerun-failed --output-on-failure