light/tools/ci/amd64/gcc/unit_tests.sh
light7734 febe633520
Some checks reported errors
continuous-integration/drone/push Build was killed
ci(amd64/gcc/unit_tests): log lshw display info
2025-09-24 06:06:49 +03:30

28 lines
623 B
Bash
Executable file

#!/bin/bash
set -e
cd $(git rev-parse --show-toplevel)/
rm -rf ./build && mkdir build/ && cd build
Xvfb :99 -screen 0 1024x768x16 &
export CXX=$(which g++)
export CC=$(which gcc)
export DISPLAY=:99
lshw -C display
vulkaninfo --summary
# gcc uses libstdc++ by default
cmake .. \
-G Ninja \
-DCMAKE_LINKER_TYPE=MOLD \
-DENABLE_UNIT_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-std=c++23 -g -fno-omit-frame-pointer" \
&& cmake --build . -j `nproc`
for test in $(find ./ -type f -name '*_tests' -executable); do
echo "Running $test"
gdb -ex='set confirm off' -ex='run' -ex='bt' -ex='quit' "$test"
done