Skip to content

Commit e2f287c

Browse files
committed
chore(ci) bump and sync CC version among Dockerfiles and CI workflows
Dockerfiles and CI workflow use the latest version available in the runner OS. Older versions of gcc and clang are tested in CI Large. Also fix minor issues reported by the newer clang-analyzer.
1 parent 6b17917 commit e2f287c

File tree

9 files changed

+151
-59
lines changed

9 files changed

+151
-59
lines changed

.github/workflows/ci-large.yml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
label: [""]
2323
os: [ubuntu-latest]
2424
#os: [ubuntu-latest, macos-latest]
25-
cc: [gcc-9]
25+
cc: [gcc-12]
2626
ngx: [1.25.2]
2727
runtime: [wasmtime, wasmer, v8]
2828
wasmtime: [12.0.1]
@@ -35,7 +35,7 @@ jobs:
3535
# OpenResty + static ngx_wasm_module
3636
- label: dynamic_module
3737
os: ubuntu-latest
38-
cc: gcc-9
38+
cc: gcc-12
3939
openresty: 1.21.4.2
4040
runtime: wasmtime
4141
wasmtime: 12.0.1
@@ -65,7 +65,7 @@ jobs:
6565
fail-fast: false
6666
matrix:
6767
os: [ubuntu-22.04]
68-
cc: [gcc-10]
68+
cc: [gcc-12]
6969
ngx: [1.25.2]
7070
runtime: [wasmer, wasmtime, v8]
7171
wasmtime: [12.0.1]
@@ -77,7 +77,7 @@ jobs:
7777
# OpenResty
7878
- label: openresty
7979
os: ubuntu-22.04
80-
cc: gcc-10
80+
cc: gcc-12
8181
openresty: 1.21.4.2
8282
runtime: wasmer
8383
wasmer: 3.1.1
@@ -103,7 +103,7 @@ jobs:
103103
fail-fast: false
104104
matrix:
105105
os: [ubuntu-latest]
106-
cc: [clang-11]
106+
cc: [clang-15]
107107
openresty: [1.21.4.2]
108108
runtime: [wasmtime, wasmer, v8]
109109
wasmtime: [12.0.1]
@@ -122,3 +122,34 @@ jobs:
122122
v8: ${{ matrix.v8 }}
123123
ssl: ${{ matrix.ssl }}
124124
debug: ${{ matrix.debug }}
125+
126+
build-large:
127+
name: 'Build'
128+
#if: ${{ false }}
129+
strategy:
130+
fail-fast: false
131+
matrix:
132+
label: [""]
133+
os: [ubuntu-latest]
134+
cc: [clang-14, clang-15, gcc-11, gcc-12]
135+
ngx: [1.25.2]
136+
runtime: [wasmtime, wasmer, v8]
137+
wasmtime: [12.0.1]
138+
wasmer: [3.1.1]
139+
v8: [11.4.183.23]
140+
include:
141+
- label: old_nginx
142+
os: [ubuntu-latest]
143+
cc: clang-15
144+
ngx: 1.21.6
145+
runtime: wasmtime
146+
wasmtime: 12.0.1
147+
uses: ./.github/workflows/job-build-tests.yml
148+
with:
149+
os: ${{ matrix.os }}
150+
cc: ${{ matrix.cc }}
151+
ngx: ${{ matrix.ngx }}
152+
runtime: ${{ matrix.runtime }}
153+
wasmtime: ${{ matrix.wasmtime }}
154+
wasmer: ${{ matrix.wasmer }}
155+
v8: ${{ matrix.v8 }}

.github/workflows/ci.yml

Lines changed: 24 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
matrix:
2929
label: [""]
3030
os: [ubuntu-latest]
31-
cc: [gcc-9]
31+
cc: [gcc-12]
3232
ngx: [1.25.2]
3333
openresty: [""]
3434
runtime: [wasmer]
@@ -44,7 +44,7 @@ jobs:
4444
- runtime: wasmtime
4545
wasmtime: 12.0.1
4646
os: ubuntu-latest
47-
cc: gcc-9
47+
cc: gcc-12
4848
ngx: 1.25.2
4949
ssl: ssl
5050
debug: debug
@@ -53,15 +53,15 @@ jobs:
5353
- runtime: v8
5454
v8: 11.4.183.23
5555
os: ubuntu-latest
56-
cc: gcc-9
56+
cc: gcc-12
5757
ngx: 1.25.2
5858
ssl: ssl
5959
debug: debug
6060
hup: no_hup
6161
# Old Nginx
6262
- label: old_nginx
6363
os: ubuntu-latest
64-
cc: gcc-9
64+
cc: gcc-12
6565
ngx: 1.21.6
6666
runtime: wasmer
6767
wasmer: 3.1.1
@@ -71,7 +71,7 @@ jobs:
7171
# Nginx + dynamic ngx_wasm_module + HUP
7272
- label: dynamic_nginx
7373
os: ubuntu-latest
74-
cc: gcc-9
74+
cc: gcc-12
7575
ngx: 1.25.2
7676
runtime: wasmtime
7777
wasmtime: 12.0.1
@@ -81,7 +81,7 @@ jobs:
8181
module_type: dynamic
8282
# No SSL
8383
- os: ubuntu-latest
84-
cc: gcc-9
84+
cc: gcc-12
8585
ngx: 1.25.2
8686
runtime: wasmer
8787
wasmer: 3.1.1
@@ -91,7 +91,7 @@ jobs:
9191
# OpenResty
9292
- label: openresty
9393
os: ubuntu-latest
94-
cc: gcc-9
94+
cc: gcc-12
9595
openresty: 1.21.4.2
9696
runtime: wasmtime
9797
wasmtime: 12.0.1
@@ -101,7 +101,7 @@ jobs:
101101
# OpenResty + dynamic ngx_wasm_module
102102
- label: dynamic_openresty
103103
os: ubuntu-latest
104-
cc: gcc-9
104+
cc: gcc-12
105105
openresty: 1.21.4.2
106106
runtime: wasmtime
107107
wasmtime: 12.0.1
@@ -147,7 +147,7 @@ jobs:
147147
matrix:
148148
label: [""]
149149
os: [ubuntu-22.04]
150-
cc: [gcc-10]
150+
cc: [gcc-12]
151151
ngx: [1.25.2]
152152
openresty: [""]
153153
runtime: [wasmer]
@@ -161,22 +161,22 @@ jobs:
161161
- runtime: wasmtime
162162
wasmtime: 12.0.1
163163
os: ubuntu-22.04
164-
cc: gcc-10
164+
cc: gcc-12
165165
ngx: 1.25.2
166166
hup: no_hup
167167
debug: debug
168168
# V8
169169
- runtime: v8
170170
v8: 11.4.183.23
171171
os: ubuntu-22.04
172-
cc: gcc-10
172+
cc: gcc-12
173173
ngx: 1.25.2
174174
debug: debug
175175
hup: no_hup
176176
# OpenResty
177177
- label: openresty
178178
os: ubuntu-22.04
179-
cc: gcc-10
179+
cc: gcc-12
180180
openresty: 1.21.4.2
181181
ngx:
182182
runtime: wasmer
@@ -240,7 +240,7 @@ jobs:
240240
strategy:
241241
fail-fast: false
242242
matrix:
243-
cc: [clang-11]
243+
cc: [clang-15]
244244
openresty: [1.21.4.2]
245245
runtime: [wasmtime, wasmer, v8]
246246
wasmtime: [12.0.1]
@@ -251,7 +251,7 @@ jobs:
251251
include:
252252
# No SSL
253253
- os: ubuntu-latest
254-
cc: clang-11
254+
cc: clang-15
255255
ngx: 1.25.2
256256
runtime: wasmer
257257
wasmer: 3.1.1
@@ -272,39 +272,22 @@ jobs:
272272
build:
273273
name: 'Build'
274274
#if: ${{ false }}
275-
runs-on: ${{ matrix.os }}
276275
strategy:
277276
fail-fast: false
278277
matrix:
279-
label: [""]
280278
os: [ubuntu-latest]
281-
cc: [clang-14, gcc-10]
279+
cc: [clang-15, gcc-12]
282280
ngx: [1.25.2]
283281
runtime: [wasmtime, wasmer, v8]
284282
wasmtime: [12.0.1]
285283
wasmer: [3.1.1]
286284
v8: [11.4.183.23]
287-
include:
288-
- label: old_nginx
289-
os: ubuntu-latest
290-
cc: clang-14
291-
ngx: 1.21.6
292-
runtime: wasmtime
293-
wasmtime: 12.0.1
294-
steps:
295-
- uses: actions/checkout@v3
296-
- name: 'Setup cache - work/ dir'
297-
uses: actions/cache@v3
298-
if: ${{ !env.ACT }}
299-
with:
300-
path: |
301-
work/downloads
302-
work/runtimes
303-
work/openssl
304-
key: work-${{ runner.os }}-${{ matrix.cc }}-${{ matrix.ngx }}-${{ matrix.openresty }}-${{ matrix.runtime }}-${{ hashFiles('util/**/*.sh', 'util/**/*.pl', 'util/**/*.awk', '.github/**/*.yml', '.github/**/*.sh', '.github/**/*.js', 'rust-toolchain', 'Makefile') }}
305-
- name: Setup Wasm runtime
306-
run: ./util/runtime.sh -R ${{ matrix.runtime }} -V ${{ matrix[matrix.runtime] }}
307-
- run: make setup
308-
- run: make test-build
309-
env:
310-
NGX_WASM_RUNTIME: ${{ matrix.runtime }}
285+
uses: ./.github/workflows/job-build-tests.yml
286+
with:
287+
os: ${{ matrix.os }}
288+
cc: ${{ matrix.cc }}
289+
ngx: ${{ matrix.ngx }}
290+
runtime: ${{ matrix.runtime }}
291+
wasmtime: ${{ matrix.wasmtime }}
292+
wasmer: ${{ matrix.wasmer }}
293+
v8: ${{ matrix.v8 }}

.github/workflows/job-build-tests.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
os:
7+
required: true
8+
type: string
9+
cc:
10+
required: true
11+
type: string
12+
ngx:
13+
required: true
14+
type: string
15+
runtime:
16+
required: true
17+
type: string
18+
wasmtime:
19+
required: true
20+
type: string
21+
wasmer:
22+
required: true
23+
type: string
24+
v8:
25+
required: true
26+
type: string
27+
28+
defaults:
29+
run:
30+
shell: bash
31+
32+
env:
33+
CC: ${{ inputs.cc }}
34+
NGX_WASM_RUNTIME: ${{ inputs.runtime }}
35+
36+
jobs:
37+
build:
38+
name: 'Build'
39+
#if: ${{ false }}
40+
runs-on: ${{ inputs.os }}
41+
steps:
42+
- name: 'Setup deps - apt-get gcc'
43+
if: ${{ !env.ACT && contains(inputs.cc, 'gcc') }}
44+
run: sudo apt-get update && sudo apt-get install -y ${CC} libstdc++-${CC#*-}-dev lcov
45+
46+
- name: 'Setup deps - apt-get clang'
47+
if: ${{ !env.ACT && contains(inputs.cc, 'clang') }}
48+
run: sudo apt-get update && sudo apt-get install -y ${CC} lcov
49+
50+
- uses: actions/checkout@v3
51+
- name: 'Setup cache - work/ dir'
52+
uses: actions/cache@v3
53+
if: ${{ !env.ACT }}
54+
with:
55+
path: |
56+
work/downloads
57+
work/runtimes
58+
work/openssl
59+
key: work-${{ runner.os }}-${{ inputs.cc }}-${{ inputs.ngx }}-${{ inputs.runtime }}-${{ hashFiles('util/**/*.sh', 'util/**/*.pl', 'util/**/*.awk', '.github/**/*.yml', '.github/**/*.sh', '.github/**/*.js', 'rust-toolchain', 'Makefile') }}
60+
- name: Setup Wasm runtime
61+
run: ./util/runtime.sh -R ${{ inputs.runtime }} -V ${{ inputs[inputs.runtime] }}
62+
- run: make setup
63+
- run: make test-build

.github/workflows/job-unit-tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ jobs:
7070
coveralls_name: ${{ steps.lcov.outputs.name }}
7171
steps:
7272
- name: 'Setup deps - apt-get'
73-
if: ${{ inputs.cc == 'gcc-9' }}
74-
run: sudo apt-get update && sudo apt-get install -y gcc-9 libstdc++-9-dev lcov
73+
if: ${{ !env.ACT }}
74+
run: sudo apt-get update && sudo apt-get install -y ${CC} libstdc++-${CC#*-}-dev lcov
7575
- uses: actions/checkout@v3
7676
- name: 'Setup cache - rustup toolchain'
7777
if: ${{ !env.ACT }}
@@ -116,11 +116,11 @@ jobs:
116116
- run: make test
117117
- name: Run lcov
118118
id: lcov
119-
if: ${{ !env.ACT && inputs.cc == 'gcc-9' && inputs.coverage }}
119+
if: ${{ !env.ACT && inputs.coverage }}
120120
run: |
121-
lcov --capture --directory work/buildroot --output-file lcov.info
122-
lcov --remove lcov.info "*/ngx_wasm_module/src/common/debug/*" --output-file lcov.info
123-
lcov --extract lcov.info "*/ngx_wasm_module/src/*" --output-file lcov.info
121+
lcov --gcov-tool gcov-${CC#*-} --capture --directory work/buildroot --output-file lcov.info
122+
lcov --gcov-tool gcov-${CC#*-} --remove lcov.info "*/ngx_wasm_module/src/common/debug/*" --output-file lcov.info
123+
lcov --gcov-tool gcov-${CC#*-} --extract lcov.info "*/ngx_wasm_module/src/*" --output-file lcov.info
124124
125125
name="unit"
126126
if [ -n "${{ inputs.openresty }}" ]; then
@@ -139,7 +139,7 @@ jobs:
139139
fi
140140
echo "name=$name" >> $GITHUB_OUTPUT
141141
- name: Coveralls Upload
142-
if: ${{ !env.ACT && inputs.cc == 'gcc-9' && inputs.coverage }}
142+
if: ${{ !env.ACT && inputs.coverage }}
143143
uses: coverallsapp/github-action@v2
144144
with:
145145
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)