mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 09:18:09 +00:00
use run_tests.sh to drive builds.yml
This commit is contained in:
committed by
Ryan Fleury
parent
1de3be3b8b
commit
56c5036593
@@ -88,13 +88,12 @@ jobs:
|
||||
sudo apt-add-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-22 main"
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang-22 lld-22 llvm-22 gcc-14 pkg-config libfreetype6-dev libx11-dev libxext-dev libgl1-mesa-dev libegl1-mesa-dev
|
||||
# crash callstack symbolizer depends on LLVM
|
||||
sudo ln -s /usr/bin/llvm-symbolizer-22 /usr/bin/llvm-symbolizer
|
||||
- name: run-torture
|
||||
shell: bash
|
||||
run: |
|
||||
CC="${{ matrix.compiler }}" ./build.sh meta raddbg raddbg_non_graphical radbin radlink torture "${{ matrix.mode }}"
|
||||
cd build
|
||||
./torture --gen_crash_dump
|
||||
CC="${{ matrix.compiler }}" ./run_tests.sh "${{ matrix.compiler }}" "${{ matrix.mode }}" -- --gen_crash_dump
|
||||
- name: upload torture artifacts
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v7
|
||||
|
||||
@@ -18,7 +18,7 @@ git_hash_full=$(git rev-parse HEAD)
|
||||
|
||||
# --- Compile/Link Line Definitions -------------------------------------------
|
||||
cc_cflags_gcc=""
|
||||
cc_cflags_clang=${cc_sanitize}" -fuse-ld=lld -fdiagnostics-absolute-paths -Wno-for-loop-analysis -Wno-incompatible-pointer-types-discards-qualifiers -Wno-initializer-overrides -Wno-compare-distinct-pointer-types -Wno-single-bit-bitfield-constant-conversion -Wno-deprecated-declarations -Wno-writable-strings -Wno-unknown-warning-option -Wno-deprecated-register -Wno-unused-local-typedef"
|
||||
cc_cflags_clang=${cc_sanitize}" -fdiagnostics-absolute-paths -Wno-for-loop-analysis -Wno-incompatible-pointer-types-discards-qualifiers -Wno-initializer-overrides -Wno-compare-distinct-pointer-types -Wno-single-bit-bitfield-constant-conversion -Wno-deprecated-declarations -Wno-writable-strings -Wno-unknown-warning-option -Wno-deprecated-register -Wno-unused-local-typedef"
|
||||
cc_common="-mcx16 -I../src/ -I../local/ -D_GNU_SOURCE -g -DBUILD_GIT_HASH=\"$git_hash\" -DBUILD_GIT_HASH_FULL=\"$git_hash_full\" -Wall -Wno-missing-braces -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-value -D_USE_MATH_DEFINES -Dstrdup=_strdup -Dgnu_printf=printf"
|
||||
cc_debug="-g -O0 -DBUILD_DEBUG=1 ${cc_common}"
|
||||
cc_release="-g -O2 -DBUILD_DEBUG=0 ${cc_common}"
|
||||
|
||||
Regular → Executable
+45
-8
@@ -3,23 +3,60 @@ set -eu
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
target_values=(raddbg raddbg_non_graphical radlink radbin torture)
|
||||
# TODO: gcc
|
||||
cc_values=(clang)
|
||||
cc_values=(clang gcc)
|
||||
mode_values=(debug release)
|
||||
run_torture=1
|
||||
torture_args=()
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--)
|
||||
shift
|
||||
torture_args=("$@")
|
||||
break
|
||||
;;
|
||||
clang|clang-*)
|
||||
cc_values=("$1")
|
||||
shift
|
||||
;;
|
||||
gcc|gcc-*)
|
||||
cc_values=("$1")
|
||||
shift
|
||||
;;
|
||||
debug|release)
|
||||
mode_values=("$1")
|
||||
shift
|
||||
;;
|
||||
no_torture)
|
||||
run_torture=0
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [clang|clang-*|gcc|gcc-*] [debug|release] [no_torture] [-- <torture args>]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for m in "${mode_values[@]}"; do
|
||||
for c in "${cc_values[@]}"; do
|
||||
build_cc=clang
|
||||
if [[ "$c" == gcc* ]]; then build_cc=gcc; fi
|
||||
|
||||
# nuke artifacts from last run
|
||||
rm -rf build/torture_artifacts
|
||||
rm -f build/metagen
|
||||
for t in "${target_values[@]}"; do
|
||||
rm -f "build/$t"
|
||||
done
|
||||
|
||||
./build.sh meta "$c" "$m" "${target_values[@]}"
|
||||
# build targets
|
||||
CC="$c" ./build.sh meta "$build_cc" "$m" "${target_values[@]}"
|
||||
|
||||
# run torture
|
||||
cd build
|
||||
./torture "$@"
|
||||
cd ..
|
||||
# run torture from build folder
|
||||
if [[ "$run_torture" == "1" ]]; then
|
||||
(cd build && ./torture "${torture_args[@]}")
|
||||
fi
|
||||
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user