2023-07-05 05:43:25 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-09-26 14:03:31 -07:00
|
|
|
COMMIT=$(printf '%03d-%s' $(git cherry $CI_MERGE_REQUEST_DIFF_BASE_SHA HEAD^ | wc -l) $(git rev-parse --short HEAD))
|
2023-07-05 05:43:25 -07:00
|
|
|
|
2024-04-04 14:04:14 -07:00
|
|
|
echo -e "\e[0Ksection_start:`date +%s`:commit_$COMMIT\r\e[0KBuilding commit $COMMIT"
|
|
|
|
|
2023-07-05 05:43:25 -07:00
|
|
|
set -Eeuxo pipefail
|
|
|
|
|
|
|
|
./autogen.sh
|
|
|
|
rm -fr build
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2024-03-28 06:19:18 -07:00
|
|
|
export LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH-}"
|
2024-03-07 11:55:39 -08:00
|
|
|
if ../configure --enable-demos --with-spirv-tools DXCOMPILER_LIBS="-L/usr/local/lib" CFLAGS="-g -O2 -Werror" CPPFLAGS="-DVKD3D_SHADER_UNSUPPORTED_DXIL -DVKD3D_SHADER_UNSUPPORTED_GLSL" && \
|
2023-11-06 05:58:24 -08:00
|
|
|
make -j$(nproc) ; then
|
2024-02-21 03:01:04 -08:00
|
|
|
make -j$(nproc) AM_COLOR_TESTS=always check || \
|
2023-11-06 05:58:24 -08:00
|
|
|
touch ../tests_failed
|
|
|
|
else
|
|
|
|
touch ../build_failed
|
|
|
|
fi
|
2023-07-05 05:43:25 -07:00
|
|
|
|
2023-12-26 13:37:38 -08:00
|
|
|
cat tests/d3d12.log | grep -E 'd3d12: [0-9]+ tests executed' || true
|
|
|
|
|
2023-07-05 05:43:25 -07:00
|
|
|
mkdir -p ../artifacts/$COMMIT
|
2023-10-20 12:39:41 -07:00
|
|
|
rsync -Rr config.log doc/* test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT || true
|
2023-07-05 05:43:25 -07:00
|
|
|
|
|
|
|
git reset --hard
|
2024-04-04 14:04:14 -07:00
|
|
|
|
|
|
|
echo -e "\e[0Ksection_end:`date +%s`:commit_$COMMIT\r\e[0K"
|