2023-09-21 06:35:11 -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-09-21 06:35:11 -07:00
|
|
|
|
|
|
|
set -Eeuxo pipefail
|
|
|
|
|
2023-09-22 01:50:38 -07:00
|
|
|
# Building with -Wno-array-bounds because MinGW headers currently emit
|
|
|
|
# a lot of those
|
|
|
|
|
2023-09-21 06:35:11 -07:00
|
|
|
./autogen.sh
|
|
|
|
rm -fr build
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2023-10-06 07:15:26 -07:00
|
|
|
../configure CROSSCC64="x86_64-w64-mingw32-gcc -Wno-array-bounds -Werror" CROSSCC32="i686-w64-mingw32-gcc -Wno-array-bounds -Werror" && \
|
2023-09-22 01:51:48 -07:00
|
|
|
make -j$(nproc) crosstest || \
|
|
|
|
touch ../pipeline_failed
|
2023-09-21 06:35:11 -07:00
|
|
|
|
|
|
|
mkdir -p ../artifacts/$COMMIT
|
2023-10-20 12:39:41 -07:00
|
|
|
rsync -Rr config.log tests/*.txt tests/*.exe ../artifacts/$COMMIT || true
|
2023-09-26 02:20:39 -07:00
|
|
|
|
|
|
|
# Make the driver easily available to the Windows CI job
|
|
|
|
cp tests/driver.cross64.exe ../artifacts
|
2023-09-21 06:35:11 -07:00
|
|
|
|
|
|
|
git reset --hard
|