@@ -12,38 +12,53 @@ concurrency:
1212 group : ${{ github.workflow }}-${{ github.ref }}
1313 cancel-in-progress : true
1414
15+ permissions :
16+ contents : read
17+
1518jobs :
19+ # Resolve the latest -stable wolfSSL tag at run time so we don't have to
20+ # bump this workflow every release. Floor (v5.8.0) and master are fixed:
21+ # v5.8.0 exercises every version-gated workaround in fwtpm_crypto.c, and
22+ # master surfaces upstream drift on the nightly run.
23+ discover-versions :
24+ name : Resolve wolfSSL version matrix
25+ runs-on : ubuntu-latest
26+ outputs :
27+ matrix : ${{ steps.set-matrix.outputs.matrix }}
28+ latest-stable : ${{ steps.set-matrix.outputs.latest-stable }}
29+ steps :
30+ - name : Resolve latest -stable wolfSSL tag
31+ id : set-matrix
32+ run : |
33+ set -euo pipefail
34+ # List remote v*-stable tags, version-sort, take the highest.
35+ # Equivalent to `git tag -l 'v*-stable' | sort -V | tail -1` in a
36+ # local clone, but avoids cloning just to read tag names.
37+ LATEST=$(git ls-remote --tags --refs https://github.com/wolfSSL/wolfssl.git 'v*-stable' \
38+ | awk -F/ '{print $NF}' | sort -V | tail -n 1)
39+ if [ -z "${LATEST:-}" ]; then
40+ echo "::error::Could not resolve latest wolfSSL -stable tag from remote"
41+ exit 1
42+ fi
43+ echo "Latest stable wolfSSL: $LATEST"
44+ echo "latest-stable=$LATEST" >> "$GITHUB_OUTPUT"
45+ MATRIX=$(jq -nc --arg latest "$LATEST" '{
46+ include: [
47+ {"wolfssl-version":"v5.8.0-stable","wolfssl-ref":"v5.8.0-stable","cache-key":"wolfssl-pqc-v5.8.0-v1"},
48+ {"wolfssl-version":$latest,"wolfssl-ref":$latest,"cache-key":("wolfssl-pqc-" + $latest + "-v1")},
49+ {"wolfssl-version":"master","wolfssl-ref":"master","cache-key":""}
50+ ]
51+ }')
52+ echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT"
53+
1654 pqc-build-test :
1755 name : wolfSSL ${{ matrix.wolfssl-version }}
56+ needs : discover-versions
1857 runs-on : ubuntu-latest
1958 timeout-minutes : 25
2059 strategy :
2160 fail-fast : false
22- matrix :
23- include :
24- # v5.8.x: needs version-gated workarounds in fwtpm_crypto.c for
25- # (a) non-const wc_RsaPSS_VerifyCheck (v5.8.0 only) and
26- # (b) Decapsulate not computing H from seed-derived keys (all v5.8.x).
27- - wolfssl-version : ' v5.8.0-stable'
28- wolfssl-ref : ' v5.8.0-stable'
29- cache-key : ' wolfssl-pqc-v5.8.0-v1'
30- - wolfssl-version : ' v5.8.2-stable'
31- wolfssl-ref : ' v5.8.2-stable'
32- cache-key : ' wolfssl-pqc-v5.8.2-v1'
33- - wolfssl-version : ' v5.8.4-stable'
34- wolfssl-ref : ' v5.8.4-stable'
35- cache-key : ' wolfssl-pqc-v5.8.4-v1'
36- # v5.9.0+: H-set fix landed; workaround is skipped via VERSION_HEX gate.
37- - wolfssl-version : ' v5.9.0-stable'
38- wolfssl-ref : ' v5.9.0-stable'
39- cache-key : ' wolfssl-pqc-v5.9.0-v1'
40- - wolfssl-version : ' v5.9.1-stable'
41- wolfssl-ref : ' v5.9.1-stable'
42- cache-key : ' wolfssl-pqc-v5.9.1-v1'
43- # master always rebuilds (no cache) so wolfSSL upstream renames /
44- # API breaks surface within ~24h on the next scheduled run.
45- - wolfssl-version : ' master'
46- wolfssl-ref : ' master'
61+ matrix : ${{ fromJson(needs.discover-versions.outputs.matrix) }}
4762
4863 steps :
4964 - name : Checkout wolfTPM
0 commit comments