From 6df9e05da2ffca5fa8cc9601d86765b759ed8f99 Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Fri, 3 Mar 2017 22:52:18 -0500 Subject: Make Travis test Windows Dockerfile --- other/travis/env-windows.sh | 47 +++++++++++++++++++--------------- other/travis/installmd-windows-install | 12 +++++++++ other/travis/installmd-windows-script | 12 +++++++++ 3 files changed, 51 insertions(+), 20 deletions(-) create mode 100755 other/travis/installmd-windows-install create mode 100755 other/travis/installmd-windows-script (limited to 'other') diff --git a/other/travis/env-windows.sh b/other/travis/env-windows.sh index d5e485f1..525630ae 100644 --- a/other/travis/env-windows.sh +++ b/other/travis/env-windows.sh @@ -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. + 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 + # 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' + # 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 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 diff --git a/other/travis/installmd-windows-install b/other/travis/installmd-windows-install new file mode 100755 index 00000000..8a85bbbd --- /dev/null +++ b/other/travis/installmd-windows-install @@ -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 - diff --git a/other/travis/installmd-windows-script b/other/travis/installmd-windows-script new file mode 100755 index 00000000..906a7f1d --- /dev/null +++ b/other/travis/installmd-windows-script @@ -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 -- cgit v1.2.3