mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 16:31:14 +01:00
[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
This commit is contained in:
1 parent
5410a1adf4
commit
7a2081ac43
1 file changed
+24
-8
@@ -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"
|
||||
Reference in new issue
Block a user