Make Travis test Windows Dockerfile

This commit is contained in:
Maxim Biro
2017-03-03 22:52:18 -05:00
parent e672b6f092
commit 6df9e05da2
4 changed files with 64 additions and 23 deletions
+10
View File
@@ -49,6 +49,16 @@ matrix:
group: deprecated-2017Q4
services:
- docker
- stage: "Stage 1"
if: type IN (push, api, cron)
env: JOB=installmd ENV=windows SUPPORT_ARCH_i686=true SUPPORT_ARCH_x86_64=false SUPPORT_TEST=true ENABLE_ARCH_i686=true ENABLE_ARCH_x86_64=false ENABLE_TEST=true ALLOW_TEST_FAILURE=true
services:
- docker
- stage: "Stage 1"
if: type IN (push, api, cron)
env: JOB=installmd ENV=windows SUPPORT_ARCH_i686=false SUPPORT_ARCH_x86_64=true SUPPORT_TEST=true ENABLE_ARCH_i686=false ENABLE_ARCH_x86_64=true ENABLE_TEST=true ALLOW_TEST_FAILURE=true
services:
- docker
- stage: "Stage 1"
if: type IN (push, api, cron)
env: JOB=toxcore ENV=freebsd
+30 -23
View File
@@ -1,29 +1,36 @@
#!/bin/sh
CMAKE=$ARCH-w64-mingw32.shared-cmake
CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DBOOTSTRAP_DAEMON=OFF -DERROR_ON_WARNING=OFF"
NPROC=`nproc`
CURDIR=/work
RUN_TESTS=true
RUN() {
./dockcross "$@"
}
if [ "$JOB" = "toxcore" ]; then
CMAKE=$ARCH-w64-mingw32.shared-cmake
NPROC=`nproc`
CURDIR=/work
RUN_TESTS=true
TESTS() {
shift # Ignore test run count.
# Download Microsoft DLLs.
curl http://www.dlldump.com/dllfiles/I/iphlpapi.dll -o _build/iphlpapi.dll
curl http://www.dlldump.com/dllfiles/W/ws2_32.dll -o _build/ws2_32.dll
# Copy our dependency DLLs.
./dockcross sh -c 'cp $WINEDLLPATH/*.dll _build'
# Run tests in docker.
./dockcross "$@" || {
cat _build/Testing/Temporary/LastTest.log
# Ignore test failures on Windows builds for now.
#false
RUN() {
./dockcross "$@"
}
}
TESTS() {
shift # Ignore test run count.
# Download Microsoft DLLs.
curl http://www.dlldump.com/dllfiles/I/iphlpapi.dll -o _build/iphlpapi.dll
curl http://www.dlldump.com/dllfiles/W/ws2_32.dll -o _build/ws2_32.dll
# Copy our dependency DLLs.
./dockcross sh -c 'cp $WINEDLLPATH/*.dll _build'
# Run tests in docker.
./dockcross "$@" || {
cat _build/Testing/Temporary/LastTest.log
# Ignore test failures on Windows builds for now.
#false
}
}
elif [ "$JOB" = "installmd" ]; then
true
else
echo "Unsupported JOB=$JOB"
fi
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
cd other/docker/windows
docker build \
--build-arg SUPPORT_ARCH_i686=${SUPPORT_ARCH_i686} \
--build-arg SUPPORT_ARCH_x86_64=${SUPPORT_ARCH_x86_64} \
--build-arg SUPPORT_TEST=${SUPPORT_TEST} \
-t toxcore \
.
cd -
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
docker run \
-e ALLOW_TEST_FAILURE=${ALLOW_TEST_FAILURE} \
-e ENABLE_ARCH_i686=${ENABLE_ARCH_i686} \
-e ENABLE_ARCH_x86_64=${ENABLE_ARCH_x86_64} \
-e ENABLE_TEST=${ENABLE_TEST} \
-e EXTRA_CMAKE_FLAGS="${CMAKE_EXTRA_FLAGS} -DDEBUG=ON -DTEST_TIMEOUT_SECONDS=90" \
-v ${PWD}:/toxcore \
-v ${PWD}/result:/prefix \
--rm \
toxcore