-
Notifications
You must be signed in to change notification settings - Fork 2
157 lines (147 loc) · 4.34 KB
/
ci.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build-ubuntu:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
gcc: [9, 10, 11]
cxx: [C++03, C++11, C++14, C++17]
zmq: [zmq, nozmq]
exclude:
- os: ubuntu-20.04
gcc: 11
runs-on: ${{matrix.os}}
env:
CC: gcc-${{matrix.gcc}}
CXX: g++-${{matrix.gcc}}
steps:
- name: checkout
uses: actions/checkout@v3
- name: bootstrap
run: |
dist/ubuntu/bootstrap.sh
sudo apt install -y clang clang-tidy cppcheck
- name: build Debug
run: dist/ubuntu/build.sh Debug dev ${{matrix.cxx}} ${{matrix.zmq}} test
- name: build Release
run: |
rm -rf dist/ubuntu/build
dist/ubuntu/build.sh Release ${{matrix.cxx}} ${{matrix.zmq}} test
build-windows:
runs-on: windows-latest
strategy:
matrix:
zmq: [ON, OFF]
steps:
- name: checkout
uses: actions/checkout@v3
- name: bootstrap
run: dist\win32\bootstrap.cmd
- name: build Debug
run: dist\win32\build.cmd Debug "-DZTH_TESTS=ON" "-DZTH_HAVE_LIBZMQ=${{matrix.zmq}}"
- name: test
run: cmake --build . --target=test
working-directory: dist\win32\build
- name: build Release
run: |
Remove-Item -path dist\win32\build -recurse -force
dist\win32\build.cmd Release "-DZTH_TESTS=ON" "-DZTH_HAVE_LIBZMQ=${{matrix.zmq}}"
- name: test
run: cmake --build . --target=test
working-directory: dist\win32\build
build-mac:
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: bootstrap
run: |
# Workaround for linker bug in XCode 14.0
sudo xcode-select --switch /Library/Developer/CommandLineTools
dist/macos/bootstrap.sh
- name: build Debug
run: dist/macos/build.sh Debug test
- name: build Release
run: |
rm -rf dist/macos/build
dist/macos/build.sh Release test
build-arm-a15:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: bootstrap
run: dist/qemu-arm-a15/bootstrap.sh
- name: build Debug
run: dist/qemu-arm-a15/build.sh Debug dev test
- name: build Release
run: |
rm -rf dist/qemu-arm-a15/build
dist/qemu-arm-a15/build.sh Release test
build-arm-m3:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: bootstrap
run: dist/qemu-arm-m3/bootstrap.sh
- name: build Debug
run: dist/qemu-arm-m3/build.sh Debug dev test
- name: build Release
run: |
rm -rf dist/qemu-arm-m3/build
dist/qemu-arm-m3/build.sh Release test
build-mingw:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: bootstrap
run: dist/mingw/bootstrap.sh
- name: build Debug
run: dist/mingw/build.sh Debug dev notest
- name: build Release
run: |
rm -rf dist/mingw/build
dist/mingw/build.sh Release
documentation:
if: github.ref == 'refs/heads/master'
needs: [build-ubuntu, build-windows, build-mac, build-arm-a15, build-arm-m3, build-mingw]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: bootstrap
run: dist/ubuntu/bootstrap.sh
- name: build
run: dist/ubuntu/build.sh -DZTH_DOCUMENTATION=ON
- name: deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doxygen/html
test-documentation:
if: github.ref != 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: bootstrap
run: dist/ubuntu/bootstrap.sh
- name: build
run: dist/ubuntu/build.sh -DZTH_DOCUMENTATION=ON
merge-status-check:
if: github.ref != 'refs/heads/master'
needs: [build-ubuntu, build-windows, build-mac, build-arm-a15, build-arm-m3, build-mingw, test-documentation]
runs-on: ubuntu-latest
steps:
- name: accept
run: echo OK