Skip to content

Commit fbd65a7

Browse files
committed
.github/workflows/os-check.yml: split make_check into make_check_linux and make_check_macos
The previous structure left make_check as "Ubuntu matrix + 5 macOS configs attached via include:" alongside a separate make_check_linux job. Two Linux-first jobs with overlapping purpose plus an include: hack to bolt macOS onto the first one was confusing. Refactor to a symmetric pair, each with its own plain matrix: - make_check_linux: all 51 previous make_check configs plus the 18 previous make_check_linux configs, merged into one 69-entry list with a section comment delimiting the two original groupings. - make_check_macos: 5 curated configs as a plain matrix, no include: indirection. No coverage change vs. the previous commit; this is purely structural. Branch protection rules upstream that reference the old job names ("make check", "make check (Linux only)", or any specific "(macos-latest, ...)" combination) will need updating.
1 parent 649a7ce commit fbd65a7

1 file changed

Lines changed: 62 additions & 72 deletions

File tree

.github/workflows/os-check.yml

Lines changed: 62 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,18 @@ concurrency:
1313
# END OF COMMON SECTION
1414

1515
jobs:
16-
# The full config matrix runs on Ubuntu only. macOS runs the curated subset
17-
# under include: below, covering the code paths that genuinely differ on
18-
# Darwin (sys-ca-certs / Apple Security.framework, BSD-socket DTLS,
19-
# crypto-callback dispatch) plus broad key-crypto via --enable-all.
20-
make_check:
16+
# Ubuntu config matrix. macOS is covered separately by make_check_macos
17+
# below with a curated subset; configs here either have equivalent macOS
18+
# coverage there or exercise no Darwin-specific code.
19+
make_check_linux:
2120
strategy:
2221
fail-fast: false
2322
matrix:
24-
# WARNING: keep this list to a single OS. Adding another value here
25-
# cross-products with all configs below and silently re-adds dozens
26-
# of jobs. Add new OSes via include: instead.
27-
os: [ ubuntu-24.04 ]
2823
config: [
29-
# Add new configs here
24+
# Add new configs here.
25+
# --- Configs whose macOS-relevant paths are covered by
26+
# make_check_macos (sys-ca-certs, --enable-all, DTLS-CID,
27+
# cryptocb dispatch). ---
3028
'',
3129
'--enable-all --enable-asn=template',
3230
'--enable-all --enable-asn=original',
@@ -93,61 +91,9 @@ jobs:
9391
'--enable-ocsp --enable-ocsp-responder --enable-ocspstapling CPPFLAGS="-DWOLFSSL_NONBLOCK_OCSP" --enable-maxfragment',
9492
'--enable-all CPPFLAGS=-DWOLFSSL_HASH_KEEP',
9593
'--enable-all --enable-writedup',
96-
]
97-
include:
98-
# Curated macOS coverage. Each entry exists for a Darwin-specific
99-
# reason; do not add entries that only re-test platform-agnostic
100-
# crypto already exercised in --enable-all.
101-
#
102-
# 1) Default build: --enable-sys-ca-certs is auto-on on macOS, so
103-
# this exercises Apple keychain / system trust loading in
104-
# src/ssl_load.c that has no Linux equivalent.
105-
- os: macos-latest
106-
config: ''
107-
# 2) Broad key-crypto + Security.framework + opensslextra in one
108-
# run (RSA, ECC, AES, SHA-2/3, ChaCha20-Poly1305, Curve25519/448,
109-
# HMAC, sniffer, DTLS, OCSP, ...). Note: --enable-all does NOT
110-
# enable cryptocb or SHE, so those have their own entries below.
111-
- os: macos-latest
112-
config: '--enable-all --enable-asn=template'
113-
# 3) Negative test: ensure the explicit-disable path still builds
114-
# and runs cleanly on the only OS that auto-enables sys-ca-certs.
115-
- os: macos-latest
116-
config: '--disable-sys-ca-certs'
117-
# 4) DTLS over BSD sockets on Darwin: connection-ID, fragmented
118-
# ClientHello, secure renegotiation, PSK, AES-CCM, null cipher
119-
# -- exercises recvmsg/MTU/datagram handling that differs from
120-
# Linux.
121-
- os: macos-latest
122-
config: '--enable-dtls --enable-dtlscid --enable-dtls13 --enable-secure-renegotiation
123-
--enable-psk --enable-aesccm --enable-nullcipher
124-
CPPFLAGS=-DWOLFSSL_STATIC_RSA'
125-
# 5) Crypto-callback dispatcher on macOS clang. Not covered by
126-
# --enable-all; verifies the cryptocb find/setkey/keygen path
127-
# compiles and runs on Apple Silicon's compiler toolchain.
128-
- os: macos-latest
129-
config: '--enable-cryptocb --enable-keygen --enable-cryptocbutils=setkey'
130-
name: make check
131-
if: github.repository_owner == 'wolfssl'
132-
runs-on: ${{ matrix.os }}
133-
# This should be a safe limit for the tests to run.
134-
timeout-minutes: 14
135-
steps:
136-
- name: Build and test wolfSSL
137-
uses: wolfSSL/actions-build-autotools-project@v1
138-
with:
139-
configure: CFLAGS="-pedantic -Wdeclaration-after-statement -Wnull-dereference -Wno-overlength-strings -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE" ${{ matrix.config }}
140-
check: true
141-
142-
# Linux-only configs. These are tests where the make_check job above
143-
# already provides equivalent coverage on macOS via its include: entries
144-
# (or where the config exercises no Darwin-specific code at all), so
145-
# running them on macOS would only duplicate signal on a slow runner.
146-
make_check_linux:
147-
strategy:
148-
fail-fast: false
149-
matrix:
150-
config: [
94+
# --- Configs that exercise no Darwin-specific code at all
95+
# (pure crypto algorithms, preprocessor guards, features
96+
# with no platform-specific code paths). ---
15197
'--enable-ascon --enable-experimental',
15298
'--enable-ascon CPPFLAGS=-DWOLFSSL_ASCON_UNROLL --enable-experimental',
15399
# PKCS#7 with RSA-PSS (CMS RSASSA-PSS signers)
@@ -169,7 +115,7 @@ jobs:
169115
'--enable-curve25519=nonblock --enable-ecc=nonblock --enable-sp=yes,nonblock CPPFLAGS="-DWOLFSSL_PUBLIC_MP -DWOLFSSL_DEBUG_NONBLOCK"',
170116
'--enable-certreq --enable-certext --enable-certgen --disable-secure-renegotiation-info CPPFLAGS="-DNO_TLS"',
171117
]
172-
name: make check (Linux only)
118+
name: make check (Linux)
173119
if: github.repository_owner == 'wolfssl'
174120
runs-on: ubuntu-24.04
175121
# This should be a safe limit for the tests to run.
@@ -181,10 +127,54 @@ jobs:
181127
configure: CFLAGS="-pedantic -Wdeclaration-after-statement -Wnull-dereference -Wno-overlength-strings -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE" ${{ matrix.config }}
182128
check: true
183129

130+
# Curated macOS subset. Each config exists for a Darwin-specific reason;
131+
# do not add entries that only re-test platform-agnostic crypto already
132+
# covered by the corresponding Linux run.
133+
make_check_macos:
134+
strategy:
135+
fail-fast: false
136+
matrix:
137+
config: [
138+
# Default build: --enable-sys-ca-certs is auto-on on macOS, so
139+
# this exercises Apple keychain / system trust loading in
140+
# src/ssl_load.c that has no Linux equivalent.
141+
'',
142+
# Broad key-crypto + Security.framework + opensslextra in one run
143+
# (RSA, ECC, AES, SHA-2/3, ChaCha20-Poly1305, Curve25519/448, HMAC,
144+
# sniffer, DTLS, OCSP, ...). Note: --enable-all does NOT enable
145+
# cryptocb or SHE, so those have their own entries below.
146+
'--enable-all --enable-asn=template',
147+
# Negative test: ensure the explicit-disable path still builds and
148+
# runs cleanly on the only OS that auto-enables sys-ca-certs.
149+
'--disable-sys-ca-certs',
150+
# DTLS over BSD sockets on Darwin: connection-ID, fragmented
151+
# ClientHello, secure renegotiation, PSK, AES-CCM, null cipher --
152+
# exercises recvmsg/MTU/datagram handling that differs from Linux.
153+
'--enable-dtls --enable-dtlscid --enable-dtls13 --enable-secure-renegotiation
154+
--enable-psk --enable-aesccm --enable-nullcipher
155+
CPPFLAGS=-DWOLFSSL_STATIC_RSA',
156+
# Crypto-callback dispatcher under Apple clang. Not covered by
157+
# --enable-all; verifies the cryptocb find/setkey/keygen path
158+
# compiles and runs on the macOS toolchain.
159+
'--enable-cryptocb --enable-keygen --enable-cryptocbutils=setkey',
160+
]
161+
name: make check (macOS)
162+
if: github.repository_owner == 'wolfssl'
163+
runs-on: macos-latest
164+
# This should be a safe limit for the tests to run.
165+
timeout-minutes: 14
166+
steps:
167+
- name: Build and test wolfSSL
168+
uses: wolfSSL/actions-build-autotools-project@v1
169+
with:
170+
configure: CFLAGS="-pedantic -Wdeclaration-after-statement -Wnull-dereference -Wno-overlength-strings -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE" ${{ matrix.config }}
171+
check: true
172+
184173
# Run on both OSes: the user_settings.h header-driven build path is
185-
# distinct from the autotools-driven --enable-all path in make_check, and
186-
# macOS-specific guard ordering (e.g. WOLFSSL_SYS_CA_CERTS pulling in
187-
# Security.framework) needs to be exercised under Apple clang here.
174+
# distinct from the autotools-driven --enable-all path in
175+
# make_check_linux / make_check_macos, and macOS-specific guard ordering
176+
# (e.g. WOLFSSL_SYS_CA_CERTS pulling in Security.framework) needs to be
177+
# exercised under Apple clang here.
188178
make_user_settings:
189179
strategy:
190180
fail-fast: false
@@ -252,9 +242,9 @@ jobs:
252242
run: ./wolfcrypt/test/testwolfcrypt
253243

254244
# Has to be dedicated function due to the sed call.
255-
# Platform-agnostic; --enable-all macOS coverage in make_check and the
256-
# macOS user_settings_all.h run in make_user_settings already cover the
257-
# equivalent code paths on Darwin.
245+
# Platform-agnostic; --enable-all macOS coverage in make_check_macos and
246+
# the macOS user_settings_all.h run in make_user_settings already cover
247+
# the equivalent code paths on Darwin.
258248
make_user_all:
259249
name: make user_setting.h (with sed)
260250
if: github.repository_owner == 'wolfssl'

0 commit comments

Comments
 (0)