diff --git a/.travis.yml b/.travis.yml index 0e56ad7b9..9c6d1ef19 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/other/travis/env-windows.sh b/other/travis/env-windows.sh index d5e485f16..525630ae9 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. - - # 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 diff --git a/other/travis/installmd-windows-install b/other/travis/installmd-windows-install new file mode 100755 index 000000000..8a85bbbd3 --- /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 000000000..906a7f1d6 --- /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