37632f60d9
It seems several CI builds failed for [v3.16.0-alpha](https://github.com/ooni/probe-cli/releases/tag/v3.16.0-alpha). Let's aim to repair miniooni and ooniprobe-windows for now. The other failing builds seem more tricky. (Android fails with an unsupported NDK while Linux fails with issues accessing the git repository from Docker, probably because the the user running inside Docker is not the user that owns the repository.)
38 lines
1.0 KiB
Bash
Executable File
38 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
EXPECTED_MINGW_W64_VERSION=${EXPECTED_MINGW_W64_VERSION:-12.2.0} # Allow overriding
|
|
|
|
printf "checking for x86_64-w64-mingw32-gcc... "
|
|
command -v x86_64-w64-mingw32-gcc || {
|
|
echo "not found"
|
|
exit 1
|
|
}
|
|
|
|
printf "checking for i686-w64-mingw32-gcc... "
|
|
command -v i686-w64-mingw32-gcc || {
|
|
echo "not found"
|
|
exit 1
|
|
}
|
|
|
|
exitcode=0
|
|
|
|
printf "checking for x86_64-w64-mingw32-gcc version... "
|
|
__version_amd64=$(x86_64-w64-mingw32-gcc --version | sed -n 1p | awk '{print $3}')
|
|
echo $__version_amd64
|
|
[[ "$EXPECTED_MINGW_W64_VERSION" == "$__version_amd64" ]] || {
|
|
echo "fatal: x86_64-w64-mingw32-gcc version must be $EXPECTED_MINGW_W64_VERSION instead of $__version_amd64"
|
|
exitcode=1
|
|
}
|
|
|
|
printf "checking for i686-w64-mingw32-gcc version... "
|
|
__version_386=$(i686-w64-mingw32-gcc --version | sed -n 1p | awk '{print $3}')
|
|
echo $__version_386
|
|
[[ "$EXPECTED_MINGW_W64_VERSION" == "$__version_386" ]] || {
|
|
echo "fatal: i686-w64-mingw32-gcc version must be $EXPECTED_MINGW_W64_VERSION instead of $__version_386"
|
|
exitcode=1
|
|
}
|
|
|
|
exit $exitcode
|