-
Notifications
You must be signed in to change notification settings - Fork 24
130 lines (123 loc) · 4.12 KB
/
build.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
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
121
122
123
124
125
126
127
128
129
130
name: build
on: [push]
env:
BUILD_TYPE: RelWithDebInfo
CFLAGS: -DALLOW_TIMER_SLACK
jobs:
test:
strategy:
matrix:
os: [ubuntu-20.04, macos-12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
sed -e 's/-DNDEBUG//g' < CMakeCache.txt > CMakeCache.txt.new
mv -- CMakeCache.txt.new CMakeCache.txt
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -C $BUILD_TYPE --output-on-failure
testfreebsd:
strategy:
matrix:
release: [13.3]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Test in FreeBSD
id: test
uses: vmactions/freebsd-vm@v1
with:
release: ${{ matrix.release }}
envs: 'BUILD_TYPE'
usesh: true
prepare: pkg install -y cmake
run: |
mkdir build || exit 1
cd build || exit 1
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE || exit 1
sed -e 's/-DNDEBUG//g' < CMakeCache.txt > CMakeCache.txt.new || exit 1
mv -- CMakeCache.txt.new CMakeCache.txt || exit 1
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE || exit 1
cmake --build . --config $BUILD_TYPE || exit 1
ctest -C $BUILD_TYPE --output-on-failure || exit 1
testopenbsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Test in OpenBSD
id: test
uses: vmactions/openbsd-vm@v1
with:
release: 7.4
envs: 'BUILD_TYPE'
usesh: true
prepare: pkg_add cmake
run: |
cd /tmp || exit 1
ftp https://cloudflare.cdn.openbsd.org/pub/OpenBSD/7.4/amd64/comp74.tgz || exit 1
cd / || exit 1
tar xzvphf /tmp/comp71.tgz
cd || exit 1
mkdir build || exit 1
cd build || exit 1
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE || exit 1
sed -e 's/-DNDEBUG//g' < CMakeCache.txt > CMakeCache.txt.new || exit 1
mv -- CMakeCache.txt.new CMakeCache.txt || exit 1
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE || exit 1
cmake --build . --config $BUILD_TYPE || exit 1
ctest -C $BUILD_TYPE --output-on-failure || exit 1
testnetbsd:
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Test in NetBSD
id: test
uses: vmactions/netbsd-vm@v0
with:
release: 9.1
envs: 'BUILD_TYPE'
usesh: true
prepare: pkg_add cmake
run: |
mkdir build || exit 1
cd build || exit 1
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE || exit 1
sed -e 's/-DNDEBUG//g' < CMakeCache.txt > CMakeCache.txt.new || exit 1
mv -- CMakeCache.txt.new CMakeCache.txt || exit 1
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE || exit 1
cmake --build . --config $BUILD_TYPE || exit 1
ctest -C $BUILD_TYPE --output-on-failure || exit 1
testdragonflybsd:
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Test in DragonFly BSD
id: test
uses: vmactions/dragonflybsd-vm@v0
with:
release: 6.2.2
envs: 'BUILD_TYPE'
usesh: true
prepare: pkg install -y cmake
run: |
mkdir build || exit 1
cd build || exit 1
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE || exit 1
sed -e 's/-DNDEBUG//g' < CMakeCache.txt > CMakeCache.txt.new || exit 1
mv -- CMakeCache.txt.new CMakeCache.txt || exit 1
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE || exit 1
cmake --build . --config $BUILD_TYPE || exit 1
ctest -C $BUILD_TYPE --output-on-failure || exit 1