From 85409ec4a207d177aed4667105fe98b5b3b44dcb Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc <6860842+ambroise-leclerc@users.noreply.github.com> Date: Wed, 11 Nov 2026 18:59:04 +0100 Subject: [PATCH] Add GCC 13 Linux ARM64 CI coverage --- .github/actions/setup-cmake/action.yml | 10 +++++- .github/workflows/BuildAndTest.yml | 42 ++++++++++++++++++++++++++ README.md | 2 +- docs/CHANGELOG.md | 4 +++ docs/PROJECT_STATUS.md | 2 +- docs/TEST_TIERS.md | 5 ++- 6 files changed, 61 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-cmake/action.yml b/.github/actions/setup-cmake/action.yml index 60235d23..8864b5ba 100644 --- a/.github/actions/setup-cmake/action.yml +++ b/.github/actions/setup-cmake/action.yml @@ -16,7 +16,13 @@ runs: run: | set -euo pipefail case "$RUNNER_OS" in - Linux) platform=linux-x86_64; extension=tar.gz; bin=bin ;; + Linux) + case "$(uname -m)" in + x86_64) platform=linux-x86_64 ;; + aarch64) platform=linux-aarch64 ;; + *) echo "::error::No CMake archive for Linux $(uname -m)"; exit 1 ;; + esac + extension=tar.gz; bin=bin ;; macOS) platform=macos-universal; extension=tar.gz; bin=CMake.app/Contents/bin ;; Windows) platform=windows-x86_64; extension=zip; bin=bin ;; *) echo "::error::No CMake archive for $RUNNER_OS"; exit 1 ;; @@ -25,9 +31,11 @@ runs: # From cmake--SHA-256.txt of each Kitware release. case "$name.$extension" in cmake-4.4.4-linux-x86_64.tar.gz) expected=e5bb807f7728cb60cd8b27ebc97a2edb469b68655f21e844a600c3575b76f5bb ;; + cmake-4.4.4-linux-aarch64.tar.gz) expected=a1b6cc63636a0e55c63257cf3315a8a5f129e42fade25db1afea4ff8ab06f25e ;; cmake-4.4.4-macos-universal.tar.gz) expected=4b7b73704b1db9b374e5c9ab8e17ac6148b817b6396ee75cd94a852cbac9d305 ;; cmake-4.4.4-windows-x86_64.zip) expected=bace36e94b31c68ab6fa295f26dfa11219e0701cf7c94b0284a7d1cb13dac536 ;; cmake-4.3.1-linux-x86_64.tar.gz) expected=208d76804009cbe8ec9aea0aa052c857c6e59bd289b43b9941c99324dc78b1d8 ;; + cmake-4.3.1-linux-aarch64.tar.gz) expected=2c0eca48ac7d0e3a8b4120b801d48903b0630c8ff1e73c44a90398a300dec1ac ;; cmake-4.3.1-macos-universal.tar.gz) expected=c21fe4ade82a6a236aae0b9fbd8263c7ac6824a3fb32d03594456e30b06f3b7f ;; cmake-4.3.1-windows-x86_64.zip) expected=03a610be931546474e46a442d171ef10532f4fc847de9cf76b7a8065bbef6a23 ;; *) echo "::error::No pinned SHA-256 for $name.$extension: add it to .github/actions/setup-cmake/action.yml"; exit 1 ;; diff --git a/.github/workflows/BuildAndTest.yml b/.github/workflows/BuildAndTest.yml index 8049ae9c..ec7bfc8c 100644 --- a/.github/workflows/BuildAndTest.yml +++ b/.github/workflows/BuildAndTest.yml @@ -360,6 +360,48 @@ jobs: shell: bash run: ctest --test-dir build -C Release -L portability --output-on-failure --no-tests=error + # GCC 13 on Linux aarch64 (#548): the default compiler of Ubuntu 24.04, JetPack 7.2 and Yocto Scarthgap, on the architecture of + # the Jetson boards. It builds the library, the examples and every test with the hosted ubuntu-24.04-arm image, then runs the fast + # tier. Warnings are not errors here: libstdc++ 13 reports false -Wnull-dereference positives (#526), so -Werror stays with the + # reference compiler (#525). A browser frontend needs a display and CEF has no aarch64 job yet, so both are off. + gcc13-arm64: + if: github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'workflow_dispatch' && inputs.repeat_desktop_tests) + runs-on: ubuntu-24.04-arm + timeout-minutes: 45 + env: + CC: gcc-13 + CXX: g++-13 + steps: + - uses: actions/checkout@v7 + - uses: ./.github/actions/remove-node + - uses: ./.github/actions/setup-cmake + with: + version: '4.4.4' + - uses: actions/cache@v4 + with: + path: .cache/CPM + key: cpm-extended-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('CMakeLists.txt', 'cmake/*.cmake') }} + restore-keys: cpm-extended-${{ runner.os }}-${{ runner.arch }}- + - name: Install GCC 13 + run: | + sudo apt-get update + sudo apt-get install -y g++-13 ninja-build + # An image change must not move the compiler silently: fail unless this really is GCC 13 on aarch64. + - name: Verify the compiler + run: | + g++-13 --version + test "$(uname -m)" = aarch64 + case "$(g++-13 -dumpfullversion)" in 13.*) ;; *) echo "::error::Expected GCC 13, got $(g++-13 -dumpfullversion)"; exit 1 ;; esac + - name: Configure + run: >- + cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release + -DWEBFRONT_EMBED_CEF=OFF -DWEBFRONT_EMBED_WEBKITGTK=OFF -DWEBFRONT_ENABLE_TESTING=ON + -DWARNINGS_AS_ERRORS=OFF -DENABLE_CACHE=OFF -DCMAKE_CXX_SCAN_FOR_MODULES=OFF + - name: Build + run: cmake --build build --parallel 4 + - name: Fast tests + run: ctest --test-dir build -L fast --output-on-failure --no-tests=error --parallel 4 + sanitizers: if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.base_ref == 'master') runs-on: ubuntu-24.04 diff --git a/README.md b/README.md index 457701b3..77bdfc87 100644 --- a/README.md +++ b/README.md @@ -423,7 +423,7 @@ shared projects and nested builds retain resource locks. See [test timings and parallelism](docs/TEST_PERFORMANCE.md) for measurements and constraints. `ctest -L fast` runs the unit tests in about a second; [test tiers](docs/TEST_TIERS.md) describes what CI runs on each pull request, weekly and before a merge into `master`. -CI runs one combined C++ / native-browser job per desktop platform on each code change. The Linux job also collects and prints GCC line coverage (no external upload). Linux Clang, sanitizers, fuzzing and CEF compatibility run weekly, on demand and on pull requests into `master`. Manual dispatch with `repeat_desktop_tests=true` also runs the complete desktop CTest suite three times, recreating its fixtures on each pass. Workflow concurrency cancels superseded runs; dependency and compiler caches avoid repeated work. Platform badges above identify the configured matrix; the CI badge reports its aggregate status. Execution times depend on cache state and runner availability. +CI runs one combined C++ / native-browser job per desktop platform on each code change. The Linux job also collects and prints GCC line coverage (no external upload). Linux Clang, sanitizers, fuzzing and CEF compatibility run weekly, on demand and on pull requests into `master`. A Linux aarch64 job with GCC 13 also compiles the library, examples and tests and runs the fast tier weekly and on pull requests into `master`, without a browser frontend or warnings as errors. Manual dispatch with `repeat_desktop_tests=true` also runs the aarch64 job and repeats the complete desktop CTest suite three times, recreating its fixtures on each pass. Workflow concurrency cancels superseded runs; dependency and compiler caches avoid repeated work. Platform badges above identify the configured matrix; the CI badge reports its aggregate status. Execution times depend on cache state and runner availability. ## Contracts and limitations diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 2db31faa..9f592a2c 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -10,6 +10,10 @@ these entries stays in the GitHub releases and the Git history. ## Unreleased +### Added + +- Build and test with GCC 13 on a hosted Linux aarch64 runner in the weekly and `master` checks (`gcc13-arm64`), and let `setup-cmake` install CMake on aarch64 (#548, `docs/TEST_TIERS.md`). + ### Changed - Open the developer page on the interface, over the whole window, once the project has a preview; the terminal moves to a floating, movable window behind a tab on the right edge that shows the session's state, and keeps its session when collapsed. Its shortcut is F9, or the manifest's new optional `developer.terminalShortcut`. Environment sources 0.9.1, not published yet (#539, `docs/DEVELOPER_ENVIRONMENT.md`). diff --git a/docs/PROJECT_STATUS.md b/docs/PROJECT_STATUS.md index 261841bb..457aeacd 100644 --- a/docs/PROJECT_STATUS.md +++ b/docs/PROJECT_STATUS.md @@ -61,7 +61,7 @@ asset freshness checks and, with an enabled engine, real-browser Jasmine and lif `Journey*` builds a UI with the rebuilt environment and local registry, then compiles and runs its generated provider from an empty directory. Configured tests need no public network. -[Tiers](TEST_TIERS.md) defines the desktop and extended CI scope. +[Tiers](TEST_TIERS.md) defines the desktop and extended CI scope, including the GCC 13 Linux aarch64 job (#548). [Test execution and profiling](TEST_PERFORMANCE.md) documents session isolation, fixture locks, resource limits and complete-suite repetition. Sessions retain individual CTest assertions; independent driver processes use OS-assigned loopback ports. Manual transport measurements diff --git a/docs/TEST_TIERS.md b/docs/TEST_TIERS.md index 47fbfb0f..6f6ce7fc 100644 --- a/docs/TEST_TIERS.md +++ b/docs/TEST_TIERS.md @@ -70,6 +70,9 @@ dispatch with `repeat_desktop_tests`: - the `portability` job: the consumer project configured with Ninja (GCC on Linux, MSVC on Windows, Apple clang on macOS), with Unix Makefiles (Clang 23) and, reported but never blocking until it has run on a hosted runner, the Visual Studio 2026 generator. There is no compiler cache: a new user compiles everything; +- the `gcc13-arm64` job (#548): GCC 13 on a hosted Linux aarch64 runner (`ubuntu-24.04-arm`), compiling the library, the examples and + the tests with warnings that are not errors (libstdc++ 13 reports false `-Wnull-dereference` positives, #526), then running + the fast tier. It has no browser frontend. A compile error or a failing fast test under GCC 13 on aarch64 turns it red; - the address/undefined and thread sanitizers, the five fuzzers, and the GCC and Clang CEF browser integration. The portability matrix does not vary the CMake version: `setup-cmake` pins the SHA-256 of each archive it installs, so @@ -78,7 +81,7 @@ another version needs its checksum added first. ## Required checks for `master` A pull request into `master` must pass all of: the desktop jobs, `portability` (except the experimental Visual Studio -leg), `sanitizers` and `web-integration`. GitHub only enforces this once the checks are marked required in the branch +leg), `gcc13-arm64`, `sanitizers` and `web-integration`. GitHub only enforces this once the checks are marked required in the branch protection rules of `master`; the workflow cannot set that itself. The fast tier does not replace the others: the unit tests are also part of the standard run, so a pull request still