From 7a2081ac43e4be7330ed33299f1d24ef10aef345 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 11 Nov 2026 18:52:00 -0600 Subject: [PATCH] [ci] Build configuration checks two at a time Run two configurations concurrently within the existing runner. Use separate outputs and logs per configuration, then print grouped logs and collect failures after waiting for each pair. Retain all six core link checks and subset compilations without adding matrix jobs. Validation: actionlint, git diff --check, and meson test -C build (302 passed, one skipped). All six configurations compile and link with the real compiler. A stub-compiler check confirms the two-worker limit and failure propagation. Assisted-by: OpenAI Codex --- .github/workflows/configs-build.yml | 32 +++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/configs-build.yml b/.github/workflows/configs-build.yml index 3d05400d8..2ed90e263 100644 --- a/.github/workflows/configs-build.yml +++ b/.github/workflows/configs-build.yml @@ -36,14 +36,30 @@ jobs: run: sudo apt-get install gcc - name: Build configurations run: | + build_config() { + local config=$1 status=0 + echo "Build with $config" + ccache g++ -std=c++11 -c main.cc -D"$config" -o "main-$config.o" && + g++ "main-$config.o" -o "main-$config" || status=1 + echo "Build subset library with $config" + ccache g++ -std=c++11 -c subset.cc -D"$config" -o "subset-$config.o" || status=1 + return "$status" + } + + configs=(HB_DISABLE_DEPRECATED HB_MINI HB_LEAN HB_TINY HB_NO_DRAW HB_NO_PAINT) status=0 - for config in HB_DISABLE_DEPRECATED HB_MINI HB_LEAN HB_TINY HB_NO_DRAW HB_NO_PAINT; do - echo "::group::Build with $config" - ccache g++ -std=c++11 -c main.cc -D"$config" -o main.o && - g++ main.o || status=1 - echo "::endgroup::" - echo "::group::Build subset library with $config" - ccache g++ -std=c++11 -c subset.cc -D"$config" || status=1 - echo "::endgroup::" + for ((i=0; i<${#configs[@]}; i+=2)); do + pids=() + for config in "${configs[@]:i:2}"; do + build_config "$config" > "$config.log" 2>&1 & + pids+=("$!") + done + for ((j=0; j<${#pids[@]}; j++)); do + wait "${pids[j]}" || status=1 + config=${configs[i+j]} + echo "::group::Build with $config" + cat "$config.log" + echo "::endgroup::" + done done exit "$status"