mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
[RfC] Make CI faster
We can straightforwardly parallelize the `check_universal.sh` script, which takes quite a bit of time for the x86 builds. closes https://github.com/official-stockfish/Stockfish/pull/6919 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
74a0a73715
commit
31e89adf70
@@ -165,7 +165,13 @@ jobs:
|
||||
|
||||
- name: Download required macOS packages
|
||||
if: runner.os == 'macOS'
|
||||
run: brew install coreutils gcc@11
|
||||
run: brew install coreutils
|
||||
|
||||
- name: Install GCC on macOS
|
||||
if: runner.os == 'macOS' && matrix.config.comp == 'gcc'
|
||||
run: |
|
||||
brew install gcc@11 || true
|
||||
g++-11 --version
|
||||
|
||||
- name: Setup msys and install required packages
|
||||
if: runner.os == 'Windows'
|
||||
|
||||
@@ -44,14 +44,17 @@ if [ "$BINARY_SIZE" -gt "$MAX_SIZE" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FAIL=0
|
||||
WORK=$(mktemp -d)
|
||||
trap 'rm -rf "$WORK"' EXIT
|
||||
|
||||
i=0
|
||||
for pair in $PAIRS; do
|
||||
i=$((i + 1))
|
||||
cpu=${pair%%:*}
|
||||
expected_compiler=${pair##*:}
|
||||
(
|
||||
compiler_out=$("$SDE_EXE" "-$cpu" -- "$STOCKFISH_EXE" compiler 2>&1 || true)
|
||||
bench_out=$("$SDE_EXE" "-$cpu" -- "$STOCKFISH_EXE" bench 2>&1 || true)
|
||||
bench_out=$("$SDE_EXE" "-$cpu" -- "$STOCKFISH_EXE" bench 2>&1 >/dev/null || true)
|
||||
actual_compiler=$(printf '%s\n' "$compiler_out" | awk -F: '/Compilation architecture/ {
|
||||
sub(/^[[:space:]]+/, "", $2); sub(/[[:space:]]+$/, "", $2); print $2; exit
|
||||
}')
|
||||
@@ -60,10 +63,23 @@ for pair in $PAIRS; do
|
||||
}')
|
||||
if [ "$actual_compiler" != "$expected_compiler" ] || [ "$actual_bench" != "$EXPECTED_BENCH" ]; then
|
||||
printf '===== CPU %s output (expected %s/%s, got %s/%s) =====\n' \
|
||||
"$cpu" "$expected_compiler" "$EXPECTED_BENCH" "${actual_compiler:--}" "$actual_bench" >&2
|
||||
"$cpu" "$expected_compiler" "$EXPECTED_BENCH" "${actual_compiler:--}" "$actual_bench" > "$WORK/$i.fail"
|
||||
else
|
||||
printf 'CPU %s ok\n' "$cpu" > "$WORK/$i.log"
|
||||
fi
|
||||
) &
|
||||
done
|
||||
wait
|
||||
|
||||
FAIL=0
|
||||
i=0
|
||||
for pair in $PAIRS; do
|
||||
i=$((i + 1))
|
||||
if [ -f "$WORK/$i.fail" ]; then
|
||||
cat "$WORK/$i.fail" >&2
|
||||
FAIL=1
|
||||
else
|
||||
printf 'CPU %s ok\n' "$cpu" >&2
|
||||
cat "$WORK/$i.log" >&2
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user