11
11
12
12
jobs :
13
13
formatting :
14
- runs-on : ubuntu-latest
14
+ runs-on : ubuntu-20.04
15
15
steps :
16
16
- uses : actions/checkout@v2
17
17
18
+ - name : Install clang-format
19
+ env :
20
+ DEBIAN_FRONTEND : noninteractive
21
+ run : |
22
+ wget https://apt.llvm.org/llvm.sh
23
+ chmod +x llvm.sh
24
+ sudo ./llvm.sh 11
25
+ rm llvm.sh
26
+ sudo apt-get install -y --no-install-recommends clang-format-11
27
+
18
28
- name : Format files
19
- run : find base libs modules test -type f -a \( -name "*.cc" -o -name "*.h" \) -print0 | xargs -0 clang-format-9 -i
29
+ run : find base libs modules test -type f -a \( -name "*.cc" -o -name "*.h" \) -print0 | xargs -0 clang-format-11 -i
20
30
21
31
- name : Check for differences
22
32
run : |
23
33
git status --porcelain
24
34
git status --porcelain | xargs -I {} -0 test -z \"{}\"
35
+
25
36
build :
26
37
runs-on : ${{ matrix.config.os }}
27
38
strategy :
28
39
fail-fast : false
29
40
matrix :
30
41
config :
31
- - name : Mac OS X
42
+ - name : MacOS Release
32
43
cxx : clang++
33
44
cc : clang
34
45
mode : Release
35
46
cxxflags : -stdlib=libc++
36
47
os : macos-latest
37
48
artifact : macos
38
- - name : GCC 9 Release
39
- cxx : g++-9
40
- cc : gcc-9
49
+ - name : GCC 10 Release
50
+ cxx : g++-10
51
+ cc : gcc-10
41
52
mode : Release
42
- os : ubuntu-latest
53
+ os : ubuntu-20.04
43
54
artifact : linux
44
- - name : GCC 9 Debug
45
- cxx : g++-9
46
- cc : gcc-9
55
+ - name : GCC 10 Debug
56
+ cxx : g++-10
57
+ cc : gcc-10
47
58
mode : Debug
48
- os : ubuntu-latest
49
- - name : Clang 9 Release
50
- cxx : clang++-9
51
- cc : clang-9
59
+ os : ubuntu-20.04
60
+ - name : Clang 11 Release
61
+ cxx : clang++-11
62
+ cc : clang-11
52
63
mode : Release
53
64
cxxflags : -stdlib=libc++
54
65
ldflags : -lc++abi
55
- os : ubuntu-latest
66
+ os : ubuntu-20.04
56
67
- name : Clang Tidy
57
- cxx : clang++-9
58
- cc : clang-9
68
+ cxx : clang++-11
69
+ cc : clang-11
59
70
mode : Debug
60
71
cxxflags : -stdlib=libc++
61
72
ldflags : -lc++abi
62
73
lint : true
63
- os : ubuntu-latest
64
- - key : Clang 9 Sanitizer
65
- cxx : clang++-9
66
- cc : clang-9
74
+ os : ubuntu-20.04
75
+ - key : Clang 11 Sanitizer
76
+ cxx : clang++-11
77
+ cc : clang-11
67
78
mode : Release
68
79
cflags : -fsanitize=address,undefined -fno-omit-frame-pointer
69
80
cxxflags : -fsanitize=address,undefined -fno-omit-frame-pointer -stdlib=libc++
70
81
ldflags : -lc++abi
71
- os : ubuntu-latest
82
+ os : ubuntu-20.04
72
83
env :
73
- BOOST_ROOT : /usr/local/share/boost/1.72.0
84
+ DEBIAN_FRONTEND : noninteractive
74
85
BUILDCACHE_COMPRESS : true
75
86
BUILDCACHE_ACCURACY : SLOPPY
76
87
BUILDCACHE_LUA_PATH : ${{ github.workspace }}/tools
77
88
BUILDCACHE_DIR : ${{ github.workspace }}/.buildcache
78
89
UBSAN_OPTIONS : halt_on_error=1:abort_on_error=1
79
90
steps :
80
91
- uses : actions/checkout@v2
92
+
81
93
- uses : seanmiddleditch/gha-setup-ninja@master
94
+ if : matrix.config.os == 'macos-latest'
82
95
83
96
# ==== INSTALL ====
84
97
- name : Update APT
85
98
if : matrix.config.os != 'macos-latest'
86
- env :
87
- DEBIAN_FRONTEND : noninteractive
88
99
run : sudo apt-get update
89
-
100
+
90
101
- name : Install LLVM
91
- if : matrix.config.os != 'macos-latest' && matrix.config.cc == 'clang-9'
92
- env :
93
- DEBIAN_FRONTEND : noninteractive
94
- run : sudo apt-get install -y --no-install-recommends libc++-9-dev libc++abi-9-dev clang-tidy-9
102
+ if : matrix.config.os != 'macos-latest' && matrix.config.cc == 'clang-11'
103
+ run : |
104
+ wget https://apt.llvm.org/llvm.sh
105
+ chmod +x llvm.sh
106
+ sudo ./llvm.sh 11
107
+ rm llvm.sh
108
+ sudo apt-get install -y --no-install-recommends libc++-11-dev libc++abi-11-dev clang-tidy-11
95
109
96
110
- name : Install Valgrind
97
- if : matrix.config.mode == 'Debug' && matrix.config.cc == 'gcc-9'
98
- env :
99
- DEBIAN_FRONTEND : noninteractive
111
+ if : matrix.config.mode == 'Debug' && matrix.config.cc == 'gcc-10'
100
112
run : sudo apt-get install -y --no-install-recommends valgrind
101
113
114
+ - name : Install Ninja
115
+ if : matrix.config.os != 'macos-latest'
116
+ run : sudo apt-get install -y --no-install-recommends ninja-build
117
+
102
118
# ==== CACHING ====
103
119
- name : buildcache Cache
104
120
@@ -117,78 +133,6 @@ jobs:
117
133
key : deps-${{ hashFiles('.pkg') }}
118
134
restore-keys : deps-
119
135
120
- - name : libc++ Boost Cache
121
- uses : actions/cache@v1
122
- id : libcxxboostcache
123
- if : contains(matrix.config.cxxflags, 'libc++') && !contains(matrix.config.cxxflags, '-fsanitize=address')
124
- with :
125
- path : boost_1_72_0
126
- key : boost_1_72_0-${{ matrix.config.os }}
127
-
128
- - name : libc++ Boost asan Cache
129
- uses : actions/cache@v1
130
- id : libcxxboostasancache
131
- if : contains(matrix.config.cxxflags, 'libc++') && contains(matrix.config.cxxflags, '-fsanitize=address')
132
- with :
133
- path : boost_1_72_0_asan
134
- key : boost_1_72_0_asan-${{ matrix.config.os }}
135
-
136
- # ==== BOOST FOR LIBCXX ====
137
- - name : Boost for libc++
138
- if : contains(matrix.config.cxxflags, 'libc++') && !contains(matrix.config.cxxflags, '-fsanitize=address') && steps.libcxxboostcache.outputs.cache-hit != 'true'
139
- run : |
140
- echo "using clang : 9 : ${{ matrix.config.cxx }} ;" > $HOME/user-config.jam
141
- wget https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.bz2
142
- tar xf boost_1_72_0.tar.bz2
143
- cd boost_1_72_0
144
- ./bootstrap.sh
145
- ./b2 -j6 \
146
- link=static threading=multi variant=release \
147
- toolset=clang-9 cxxflags="-stdlib=libc++" \
148
- --with-system \
149
- --with-filesystem \
150
- --with-iostreams \
151
- --with-program_options \
152
- --with-thread \
153
- --with-date_time \
154
- --with-regex \
155
- --with-serialization \
156
- -s NO_BZIP2=1
157
-
158
- - name : Boost for libc++ asan
159
- if : contains(matrix.config.cxxflags, 'libc++') && contains(matrix.config.cxxflags, '-fsanitize=address') && steps.libcxxboostasancache.outputs.cache-hit != 'true'
160
- run : |
161
- echo "using clang : 9 : /usr/bin/${{ matrix.config.cxx }} ;" > $HOME/user-config.jam
162
- wget https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.bz2
163
- tar xf boost_1_72_0.tar.bz2
164
- mv boost_1_72_0 boost_1_72_0_asan
165
- cd boost_1_72_0_asan
166
- ./bootstrap.sh
167
- ./b2 -j6 \
168
- link=static threading=multi variant=release \
169
- toolset=clang-9 cxxflags="-fsanitize=address,undefined -fno-omit-frame-pointer -stdlib=libc++" \
170
- --with-system \
171
- --with-filesystem \
172
- --with-iostreams \
173
- --with-program_options \
174
- --with-thread \
175
- --with-date_time \
176
- --with-regex \
177
- --with-serialization \
178
- -s NO_BZIP2=1
179
-
180
- - name : Set BOOST_ROOT for GCC 9
181
- if : matrix.config.cxx == 'g++-9'
182
- run : echo "BOOST_ROOT=$BOOST_ROOT_1_72_0" >> $GITHUB_ENV
183
-
184
- - name : Set BOOST_ROOT
185
- if : contains(matrix.config.cxxflags, 'libc++') && !contains(matrix.config.cxxflags, '-fsanitize=address')
186
- run : echo "BOOST_ROOT=`pwd`/boost_1_72_0" >> $GITHUB_ENV
187
-
188
- - name : Set BOOST_ROOT asan
189
- if : contains(matrix.config.cxxflags, 'libc++') && contains(matrix.config.cxxflags, '-fsanitize=address')
190
- run : echo "BOOST_ROOT=`pwd`/boost_1_72_0_asan" >> $GITHUB_ENV
191
-
192
136
# ==== BUILD ====
193
137
- name : CMake
194
138
run : |
@@ -204,7 +148,7 @@ jobs:
204
148
-DCMAKE_BUILD_TYPE=${{ matrix.config.mode }} \
205
149
-DMOTIS_LINT=${{ matrix.config.lint }} \
206
150
-DCTX_ASAN=${{ contains(matrix.config.cxxflags, '-fsanitize=address') }} \
207
- -DCTX_VALGRIND=${{ matrix.config.cc == 'gcc-9 ' && matrix.config.mode == 'Debug' }}
151
+ -DCTX_VALGRIND=${{ matrix.config.cc == 'gcc-10 ' && matrix.config.mode == 'Debug' }}
208
152
209
153
- name : Build
210
154
run : |
@@ -229,7 +173,7 @@ jobs:
229
173
230
174
# ==== VALGRIND ====
231
175
- name : Run Test Mode Valgrind
232
- if : matrix.mode == 'Debug' && matrix.config.cc == 'gcc-9 '
176
+ if : matrix.mode == 'Debug' && matrix.config.cc == 'gcc-10 '
233
177
run : >
234
178
valgrind --error-exitcode=1 --show-reachable=yes --leak-check=full \
235
179
./build/motis --mode test \
@@ -240,28 +184,28 @@ jobs:
240
184
--bikesharing.db_max_size 1048576
241
185
242
186
- name : Run Tests Valgrind
243
- if : matrix.config.mode == 'Debug' && matrix.config.cc == 'gcc-9 '
187
+ if : matrix.config.mode == 'Debug' && matrix.config.cc == 'gcc-10 '
244
188
run : valgrind --error-exitcode=1 --show-reachable=yes --leak-check=full ./build/motis-test
245
189
246
190
- name : Run Integration Tests Valgrind
247
- if : matrix.config.mode == 'Debug' && matrix.config.cc == 'gcc-9 '
191
+ if : matrix.config.mode == 'Debug' && matrix.config.cc == 'gcc-10 '
248
192
run : valgrind --error-exitcode=1 --show-reachable=yes --leak-check=full ./build/motis-itest
249
193
250
194
# ==== DISTRIBUTION ====
251
195
- name : Strip Executable
252
- if : matrix.config.mode == 'Release' && (matrix.config.cc == 'gcc-9 ' || matrix.config.os == 'macos-latest')
196
+ if : matrix.config.mode == 'Release' && (matrix.config.cc == 'gcc-10 ' || matrix.config.os == 'macos-latest')
253
197
run : strip build/motis
254
198
255
199
- name : Compile Web Interface
256
- if : matrix.config.mode == 'Release' && (matrix.config.cc == 'gcc-9 ' || matrix.config.os == 'macos-latest')
200
+ if : matrix.config.mode == 'Release' && (matrix.config.cc == 'gcc-10 ' || matrix.config.os == 'macos-latest')
257
201
run : |
258
202
cd ./ui/web
259
203
npm install
260
204
./node_modules/elm/binwrappers/elm-make --yes src/Main.elm --output elm.js
261
205
rm -rf node_modules
262
206
263
207
- name : Create Distribution
264
- if : matrix.config.mode == 'Release' && (matrix.config.cc == 'gcc-9 ' || matrix.config.os == 'macos-latest')
208
+ if : matrix.config.mode == 'Release' && (matrix.config.cc == 'gcc-10 ' || matrix.config.os == 'macos-latest')
265
209
run : |
266
210
mkdir motis
267
211
mv ui/web motis
@@ -272,15 +216,15 @@ jobs:
272
216
tar cjf motis-${{ matrix.config.artifact }}.tar.bz2 motis
273
217
274
218
- name : Upload Distribution
275
- if : matrix.config.mode == 'Release' && (matrix.config.cc == 'gcc-9 ' || matrix.config.os == 'macos-latest')
219
+ if : matrix.config.mode == 'Release' && (matrix.config.cc == 'gcc-10 ' || matrix.config.os == 'macos-latest')
276
220
uses : actions/upload-artifact@v1
277
221
with :
278
222
name : motis-${{ matrix.config.artifact }}
279
223
path : motis-${{ matrix.config.artifact }}.tar.bz2
280
224
281
225
# ==== RELEASE ====
282
226
- name : Upload Release
283
- if : github.event.action == 'published' && matrix.config.mode == 'Release' && (matrix.config.cc == 'gcc-9 ' || matrix.config.os == 'macos-latest')
227
+ if : github.event.action == 'published' && matrix.config.mode == 'Release' && (matrix.config.cc == 'gcc-10 ' || matrix.config.os == 'macos-latest')
284
228
285
229
env :
286
230
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments