2020-05-06 07:15:09 +08:00
|
|
|
#!/bin/bash
|
2018-06-25 06:56:07 +08:00
|
|
|
|
|
|
|
ACTION="$1"
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
CACHEDIR="$HOME/cache"
|
2020-05-06 07:15:09 +08:00
|
|
|
NPROC=$(nproc)
|
2018-06-25 06:56:07 +08:00
|
|
|
|
|
|
|
travis_install() {
|
|
|
|
cd other/docker/windows
|
|
|
|
|
|
|
|
docker build \
|
2020-05-06 07:15:09 +08:00
|
|
|
--build-arg SUPPORT_ARCH_i686="$i686" \
|
|
|
|
--build-arg SUPPORT_ARCH_x86_64="$x86_64" \
|
2018-06-25 06:56:07 +08:00
|
|
|
--build-arg SUPPORT_TEST=true \
|
2020-05-06 07:15:09 +08:00
|
|
|
-t toxcore-"$WINDOWS_ARCH" \
|
2018-06-25 06:56:07 +08:00
|
|
|
.
|
|
|
|
}
|
|
|
|
|
|
|
|
travis_script() {
|
2021-12-20 09:39:24 +08:00
|
|
|
. ".travis/flags-gcc.sh"
|
2018-06-25 06:56:07 +08:00
|
|
|
|
|
|
|
# Allows wine to display source code file names and line numbers on crash in
|
|
|
|
# its backtrace.
|
|
|
|
add_flag -gdwarf-2
|
|
|
|
|
2022-01-02 08:44:11 +08:00
|
|
|
# Fix invalid register for .seh_savexmm error
|
|
|
|
add_flag -fno-asynchronous-unwind-tables
|
|
|
|
|
2018-06-25 06:56:07 +08:00
|
|
|
docker run \
|
|
|
|
-e ALLOW_TEST_FAILURE=true \
|
2020-05-06 07:15:09 +08:00
|
|
|
-e ENABLE_ARCH_i686="$i686" \
|
|
|
|
-e ENABLE_ARCH_x86_64="$x86_64" \
|
2018-06-25 06:56:07 +08:00
|
|
|
-e ENABLE_TEST=true \
|
2018-10-07 02:03:52 +08:00
|
|
|
-e EXTRA_CMAKE_FLAGS="-DBOOTSTRAP_DAEMON=OFF -DMIN_LOGGER_LEVEL=DEBUG -DTEST_TIMEOUT_SECONDS=90 -DAUTOTEST=ON" \
|
2020-04-24 22:18:00 +08:00
|
|
|
-e CMAKE_C_FLAGS="$C_FLAGS" \
|
2018-06-25 06:56:07 +08:00
|
|
|
-e CMAKE_CXX_FLAGS="$CXX_FLAGS" \
|
|
|
|
-e CMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \
|
|
|
|
-e CMAKE_SHARED_LINKER_FLAGS="$LD_FLAGS" \
|
|
|
|
-v "$PWD:/toxcore" \
|
|
|
|
-v "$PWD/result:/prefix" \
|
|
|
|
--rm \
|
2020-05-06 07:15:09 +08:00
|
|
|
toxcore-"$WINDOWS_ARCH"
|
2018-06-25 06:56:07 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if [ "-z" "$ACTION" ]; then
|
|
|
|
"travis_script"
|
|
|
|
else
|
|
|
|
"travis_$ACTION"
|
|
|
|
fi
|