2023-08-31 13:55:46 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo "Building $(git log -1)"
|
|
|
|
echo "---"
|
|
|
|
|
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-08-31 13:55:46 -07:00
|
|
|
|
|
|
|
set -Eeuxo pipefail
|
|
|
|
|
|
|
|
./autogen.sh
|
|
|
|
rm -fr build
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-11-27 06:37:14 -08:00
|
|
|
if ../configure CFLAGS="-g -O2 -Wno-implicit-fallthrough -Werror" && \
|
2023-11-06 05:58:24 -08:00
|
|
|
make -j$(sysctl -n hw.ncpu) ; then
|
2023-09-22 01:51:48 -07:00
|
|
|
make -j$(sysctl -n hw.ncpu) check || \
|
2023-11-06 05:58:24 -08:00
|
|
|
touch ../tests_failed
|
|
|
|
else
|
|
|
|
touch ../build_failed
|
|
|
|
fi
|
2023-08-31 13:55:46 -07:00
|
|
|
|
|
|
|
mkdir -p ../artifacts/$COMMIT
|
2023-10-20 12:39:41 -07:00
|
|
|
rsync -Rr config.log test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT || true
|
2023-08-31 13:55:46 -07:00
|
|
|
|
|
|
|
git reset --hard
|