Skip to content

Commit 212fa72

Browse files
committed
ci: shrink multi-compiler PR matrix, move full coverage to nightly
PR-time multi-compiler was apt-get update'ing the runner before installing gcc-X/clang-X. When the runner's apt cache was stale this hung past the 20m job timeout (e.g. clang-14 in run 26527356013) and cancelled the whole compiler-matrix run. Restrict the PR-time matrix to compilers that ship in the test-deps container (Debian Bookworm: gcc-11, gcc-12, clang-13, clang-14, clang-15) and run inside the container, so the apt-get step goes away entirely. Six matrix entries cover the common compiler bases plus one entry pinned to wolfssl v5.8.0-stable for back-compat. Dropped from PR-time vs prior matrix: gcc-9, gcc-10, gcc-13, gcc-14, clang-12 (not in Bookworm or its backports). To restore that coverage at nightly cadence, add nightly-multi-compiler.yml which runs the FULL original matrix on GitHub-hosted Ubuntu runners (22.04 + latest). The verify-or-install step skips apt-get when the compiler is already on PATH, so most matrix entries don't apt-get at all and the slow path only fires when a runner image change drops a pre-installed compiler. Wired into nightly-osp.yml as 'multi-compiler:' with the matching needs: entry on the Slack notify job.
1 parent d01bf2e commit 212fa72

3 files changed

Lines changed: 162 additions & 40 deletions

File tree

.github/workflows/multi-compiler.yml

Lines changed: 13 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -28,73 +28,46 @@ jobs:
2828
build_wolfprovider:
2929
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
3030
name: Build with compiler ${{ matrix.CC }}, wolfssl ${{ matrix.wolfssl_ref }}, OpenSSL ${{ matrix.openssl_ref }}
31-
runs-on: ${{ matrix.OS }}
31+
runs-on: ubuntu-22.04
32+
container:
33+
image: ghcr.io/wolfssl/wolfprovider-test-deps:bookworm
34+
env:
35+
DEBIAN_FRONTEND: noninteractive
3236
timeout-minutes: 20
3337
strategy:
3438
fail-fast: false
39+
# PR-time matrix is intentionally narrow: only compilers that ship
40+
# in Debian Bookworm (the test-deps image base). Dropped vs the
41+
# prior matrix: gcc-9, gcc-10, gcc-13, gcc-14, clang-12. Full
42+
# cross-compiler coverage (including those) runs in the nightly
43+
# multi-compiler job called from nightly-osp.yml.
3544
matrix:
3645
include:
37-
- CC: gcc-9
38-
CXX: g++-9
39-
OS: ubuntu-latest
40-
wolfssl_ref: master
41-
openssl_ref: master
42-
- CC: gcc-10
43-
CXX: g++-10
44-
OS: ubuntu-latest
45-
wolfssl_ref: master
46-
openssl_ref: master
47-
- CC: gcc-10
48-
CXX: g++-10
49-
OS: ubuntu-latest
50-
wolfssl_ref: v5.8.0-stable
51-
openssl_ref: master
5246
- CC: gcc-11
5347
CXX: g++-11
54-
OS: ubuntu-latest
5548
wolfssl_ref: master
5649
openssl_ref: master
5750
- CC: gcc-12
5851
CXX: g++-12
59-
OS: ubuntu-latest
60-
wolfssl_ref: master
61-
openssl_ref: master
62-
- CC: gcc-13
63-
CXX: g++-13
64-
OS: ubuntu-latest
6552
wolfssl_ref: master
6653
openssl_ref: master
67-
- CC: gcc-14
68-
CXX: g++-14
69-
OS: ubuntu-latest
70-
wolfssl_ref: master
71-
openssl_ref: master
72-
- CC: clang-12
73-
CXX: clang++-12
74-
OS: ubuntu-22.04
75-
wolfssl_ref: master
54+
- CC: gcc-12
55+
CXX: g++-12
56+
wolfssl_ref: v5.8.0-stable
7657
openssl_ref: master
7758
- CC: clang-13
7859
CXX: clang++-13
79-
OS: ubuntu-22.04
8060
wolfssl_ref: master
8161
openssl_ref: master
8262
- CC: clang-14
8363
CXX: clang++-14
84-
OS: ubuntu-latest
8564
wolfssl_ref: master
8665
openssl_ref: master
8766
- CC: clang-15
8867
CXX: clang++-15
89-
OS: ubuntu-latest
9068
wolfssl_ref: master
9169
openssl_ref: master
9270
steps:
93-
- name: Install dependencies
94-
run: |
95-
sudo apt-get update
96-
sudo apt-get install -y ${{ matrix.CC }} ${{ matrix.CXX }} automake libtool
97-
9871
- name: Checkout wolfProvider
9972
uses: actions/checkout@v4
10073
with:
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
name: Nightly Multi-Compiler Tests
2+
3+
# Runs the FULL multi-compiler matrix (gcc-9..14, clang-12..15) on
4+
# Ubuntu runners. PR-time multi-compiler.yml is restricted to the
5+
# compilers that ship in the test-deps container (Debian Bookworm:
6+
# gcc-11, gcc-12, clang-13..15) to avoid the apt-get hangs that were
7+
# cancelling PR jobs after 20 minutes. This nightly job restores
8+
# coverage of the dropped compilers (gcc-9, gcc-10, gcc-13, gcc-14,
9+
# clang-12) plus everything in between.
10+
11+
on:
12+
workflow_call: {}
13+
workflow_dispatch: {}
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build_wolfprovider:
21+
name: Nightly build ${{ matrix.CC }} on ${{ matrix.OS }}, wolfssl ${{ matrix.wolfssl_ref }}, OpenSSL ${{ matrix.openssl_ref }}
22+
runs-on: ${{ matrix.OS }}
23+
timeout-minutes: 30
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- CC: gcc-9
29+
CXX: g++-9
30+
OS: ubuntu-22.04
31+
wolfssl_ref: master
32+
openssl_ref: master
33+
- CC: gcc-10
34+
CXX: g++-10
35+
OS: ubuntu-22.04
36+
wolfssl_ref: master
37+
openssl_ref: master
38+
- CC: gcc-10
39+
CXX: g++-10
40+
OS: ubuntu-22.04
41+
wolfssl_ref: v5.8.0-stable
42+
openssl_ref: master
43+
- CC: gcc-11
44+
CXX: g++-11
45+
OS: ubuntu-latest
46+
wolfssl_ref: master
47+
openssl_ref: master
48+
- CC: gcc-12
49+
CXX: g++-12
50+
OS: ubuntu-latest
51+
wolfssl_ref: master
52+
openssl_ref: master
53+
- CC: gcc-13
54+
CXX: g++-13
55+
OS: ubuntu-latest
56+
wolfssl_ref: master
57+
openssl_ref: master
58+
- CC: gcc-14
59+
CXX: g++-14
60+
OS: ubuntu-latest
61+
wolfssl_ref: master
62+
openssl_ref: master
63+
- CC: clang-12
64+
CXX: clang++-12
65+
OS: ubuntu-22.04
66+
wolfssl_ref: master
67+
openssl_ref: master
68+
- CC: clang-13
69+
CXX: clang++-13
70+
OS: ubuntu-22.04
71+
wolfssl_ref: master
72+
openssl_ref: master
73+
- CC: clang-14
74+
CXX: clang++-14
75+
OS: ubuntu-latest
76+
wolfssl_ref: master
77+
openssl_ref: master
78+
- CC: clang-15
79+
CXX: clang++-15
80+
OS: ubuntu-latest
81+
wolfssl_ref: master
82+
openssl_ref: master
83+
steps:
84+
- name: Verify or install compiler
85+
run: |
86+
# Most matrix compilers are pre-installed on the GitHub-hosted
87+
# Ubuntu runners. Only apt-install if the binary isn't already
88+
# on PATH - skips the slow `apt-get update` whenever possible.
89+
if ! command -v ${{ matrix.CC }} >/dev/null; then
90+
sudo apt-get update
91+
sudo apt-get install -y ${{ matrix.CC }} ${{ matrix.CXX }}
92+
fi
93+
${{ matrix.CC }} --version
94+
95+
- name: Checkout wolfProvider
96+
uses: actions/checkout@v4
97+
with:
98+
fetch-depth: 1
99+
100+
- name: Get OpenSSL commit hash
101+
id: openssl-ref
102+
run: |
103+
sha=$(./scripts/resolve-ref.sh "${{ matrix.openssl_ref }}" "openssl/openssl")
104+
echo "ref=$sha" >> "$GITHUB_OUTPUT"
105+
env:
106+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107+
108+
- name: Get WolfSSL commit hash
109+
id: wolfssl-ref
110+
run: |
111+
sha=$(./scripts/resolve-ref.sh "${{ matrix.wolfssl_ref }}" "wolfssl/wolfssl")
112+
echo "ref=$sha" >> "$GITHUB_OUTPUT"
113+
env:
114+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115+
116+
- name: Checking OpenSSL in cache
117+
uses: actions/cache@v4
118+
id: openssl-cache
119+
with:
120+
path: openssl-install
121+
key: openssl-depends-${{ matrix.CC }}-${{ steps.openssl-ref.outputs.ref }}
122+
lookup-only: false
123+
124+
- name: Checking WolfSSL in cache
125+
uses: actions/cache@v4
126+
id: wolfssl-cache
127+
with:
128+
path: wolfssl-install
129+
key: wolfssl-depends-${{ matrix.CC }}-${{ steps.wolfssl-ref.outputs.ref }}
130+
lookup-only: false
131+
132+
- name: Build wolfProvider
133+
env:
134+
CC: ${{ matrix.CC }}
135+
CXX: ${{ matrix.CXX }}
136+
run: |
137+
OPENSSL_TAG=${{ matrix.openssl_ref }} WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
138+
139+
- name: Print errors
140+
if: ${{ failure() }}
141+
run: |
142+
if [ -f test-suite.log ]; then
143+
cat test-suite.log
144+
fi
145+
if [ -f config.log ]; then
146+
cat config.log
147+
fi

.github/workflows/nightly-osp.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
x11vnc: { uses: ./.github/workflows/x11vnc.yml }
6363
xmlsec: { uses: ./.github/workflows/xmlsec.yml }
6464
openssl-version: { uses: ./.github/workflows/openssl-version.yml }
65+
multi-compiler: { uses: ./.github/workflows/nightly-multi-compiler.yml }
6566

6667
notify:
6768
name: Slack notification
@@ -108,6 +109,7 @@ jobs:
108109
- x11vnc
109110
- xmlsec
110111
- openssl-version
112+
- multi-compiler
111113
if: always()
112114
runs-on: ubuntu-latest
113115
# Job-level env: step `if:` runs before step `env:` exports.

0 commit comments

Comments
 (0)