2023-07-05 05:43:25 -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-07-05 05:43:25 -07:00
|
|
|
|
|
|
|
set -Eeuxo pipefail
|
|
|
|
|
|
|
|
./autogen.sh
|
|
|
|
rm -fr build
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-09-27 14:30:28 -07:00
|
|
|
../configure --enable-demos CFLAGS="-g -O2 -Werror" && \
|
2023-09-22 01:51:48 -07:00
|
|
|
make -j$(nproc) && \
|
|
|
|
make -j$(nproc) check || \
|
|
|
|
touch ../pipeline_failed
|
2023-07-05 05:43:25 -07:00
|
|
|
|
|
|
|
mkdir -p ../artifacts/$COMMIT
|
2023-09-21 06:35:11 -07:00
|
|
|
rsync -Rr doc/* test-suite.log tests/*.log tests/*/*.log ../artifacts/$COMMIT
|
2023-07-05 05:43:25 -07:00
|
|
|
|
|
|
|
git reset --hard
|