mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-08-12 08:01:26 +02:00
120 lines
4.5 KiB
YAML
120 lines
4.5 KiB
YAML
name: Multiple compilers and versions
|
|
|
|
# START OF COMMON SECTION
|
|
on:
|
|
push:
|
|
branches: [ 'release/**' ]
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
branches: [ '*' ]
|
|
# Weekday-morning cron (10:00 UTC) seeds the master-scoped ccache that PR runs
|
|
# restore: re-runs --build-only (compile only, no tests) on the
|
|
# default branch. PR runs are read-only (see ccache-setup).
|
|
schedule:
|
|
- cron: '24 10 * * 1-5'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
# END OF COMMON SECTION
|
|
|
|
jobs:
|
|
# All former runner-per-config matrix entries build on one runner via
|
|
# .github/scripts/parallel-make-check.py (see os-check.yml for the full
|
|
# pattern): each config builds in its own out-of-tree ("VPATH") build
|
|
# directory off one checkout/autogen, on a pool of one-per-CPU worker
|
|
# threads, longest first.
|
|
my_matrix:
|
|
name: Compiler test
|
|
if: ${{ (github.repository_owner == 'wolfssl') && (github.event_name != 'pull_request' || github.event.pull_request.draft == false) }}
|
|
runs-on: ubuntu-24.04
|
|
# Generous for a cold ccache; warm reruns finish in a fraction.
|
|
timeout-minutes: 15
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
name: Checkout wolfSSL
|
|
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/install-apt-deps
|
|
with:
|
|
packages: autoconf automake libtool build-essential gcc-9 g++-9 gcc-10 g++-10 gcc-11 g++-11 gcc-12 g++-12 clang-14 clang-19
|
|
ghcr-debs-tag: ubuntu-24.04-minimal
|
|
|
|
# ccache via the cross-platform composite; the script passes the
|
|
# compiler to configure as CC="ccache gcc" (or a per-config "cc").
|
|
- name: Set up ccache
|
|
uses: ./.github/actions/ccache-setup
|
|
with:
|
|
workflow-id: multi-compiler
|
|
read-only: ${{ github.event_name == 'pull_request' }}
|
|
max-size: 500M
|
|
|
|
# One entry per compiler (the former one-runner-per-compiler matrix):
|
|
# default-config build plus "make dist", with the compiler routed
|
|
# through ccache via the per-config "cc" key. CXX rides along as a
|
|
# configure argument.
|
|
- name: Build all configs (parallel, out-of-tree)
|
|
run: |
|
|
cat > "$RUNNER_TEMP/multi-compiler-configs.json" <<'EOF'
|
|
[
|
|
{"name": "gcc-9", "minutes": 1.5,
|
|
"cc": "ccache gcc-9",
|
|
"configure": ["CXX=g++-9",
|
|
"CFLAGS=-pedantic -Wdeclaration-after-statement -Wnull-dereference"],
|
|
"check": false,
|
|
"run": [["make", "dist"]]},
|
|
{"name": "gcc-10", "minutes": 1.5,
|
|
"cc": "ccache gcc-10",
|
|
"configure": ["CXX=g++-10",
|
|
"CFLAGS=-pedantic -Wdeclaration-after-statement -Wnull-dereference"],
|
|
"check": false,
|
|
"run": [["make", "dist"]]},
|
|
{"name": "gcc-11", "minutes": 1.5,
|
|
"cc": "ccache gcc-11",
|
|
"configure": ["CXX=g++-11",
|
|
"CFLAGS=-pedantic -Wdeclaration-after-statement -Wnull-dereference"],
|
|
"check": false,
|
|
"run": [["make", "dist"]]},
|
|
{"name": "gcc-12", "minutes": 1.5,
|
|
"cc": "ccache gcc-12",
|
|
"configure": ["CXX=g++-12",
|
|
"CFLAGS=-pedantic -Wdeclaration-after-statement -Wnull-dereference"],
|
|
"check": false,
|
|
"run": [["make", "dist"]]},
|
|
{"name": "clang-14", "minutes": 1.5,
|
|
"cc": "ccache clang-14",
|
|
"configure": ["CXX=clang++-14",
|
|
"CFLAGS=-pedantic -Wdeclaration-after-statement -Wnull-dereference"],
|
|
"check": false,
|
|
"run": [["make", "dist"]]},
|
|
{"name": "clang-19", "minutes": 1.5,
|
|
"cc": "ccache clang-19",
|
|
"configure": ["CXX=clang++-19",
|
|
"CFLAGS=-pedantic -Wdeclaration-after-statement -Wnull-dereference"],
|
|
"check": false,
|
|
"run": [["make", "dist"]]}
|
|
]
|
|
EOF
|
|
.github/scripts/parallel-make-check.py \
|
|
${{ github.event_name == 'schedule' && '--build-only' || '' }} \
|
|
"$RUNNER_TEMP/multi-compiler-configs.json"
|
|
|
|
- name: ccache stats
|
|
if: always()
|
|
run: ccache -s || true
|
|
|
|
- name: Upload logs on failure
|
|
if: failure()
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
retention-days: 7
|
|
name: multi-compiler-logs
|
|
path: |
|
|
build-*/make-check.log
|
|
build-*/test-suite.log
|
|
build-*/config.log
|
|
if-no-files-found: ignore
|