diff options
author | Maxim Biro <nurupo.contributions@gmail.com> | 2017-03-03 22:52:18 -0500 |
---|---|---|
committer | Maxim Biro <nurupo.contributions@gmail.com> | 2018-01-25 17:27:26 -0500 |
commit | 6df9e05da2ffca5fa8cc9601d86765b759ed8f99 (patch) | |
tree | 9d478618e04a65742e741d7ec63e028e3781bc27 | |
parent | e672b6f09218b61248a265a9a7ce3c0d3158ff48 (diff) |
Make Travis test Windows Dockerfile
-rw-r--r-- | .travis.yml | 10 | ||||
-rw-r--r-- | other/travis/env-windows.sh | 47 | ||||
-rwxr-xr-x | other/travis/installmd-windows-install | 12 | ||||
-rwxr-xr-x | other/travis/installmd-windows-script | 12 |
4 files changed, 61 insertions, 20 deletions
diff --git a/.travis.yml b/.travis.yml index 0e56ad7b..9c6d1ef1 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -51,6 +51,16 @@ matrix: | |||
51 | - docker | 51 | - docker |
52 | - stage: "Stage 1" | 52 | - stage: "Stage 1" |
53 | if: type IN (push, api, cron) | 53 | if: type IN (push, api, cron) |
54 | 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 | ||
55 | services: | ||
56 | - docker | ||
57 | - stage: "Stage 1" | ||
58 | if: type IN (push, api, cron) | ||
59 | 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 | ||
60 | services: | ||
61 | - docker | ||
62 | - stage: "Stage 1" | ||
63 | if: type IN (push, api, cron) | ||
54 | env: JOB=toxcore ENV=freebsd | 64 | env: JOB=toxcore ENV=freebsd |
55 | dist: trusty | 65 | dist: trusty |
56 | sudo: required | 66 | sudo: required |
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 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | CMAKE=$ARCH-w64-mingw32.shared-cmake | ||
4 | CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DBOOTSTRAP_DAEMON=OFF -DERROR_ON_WARNING=OFF" | 3 | CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DBOOTSTRAP_DAEMON=OFF -DERROR_ON_WARNING=OFF" |
5 | NPROC=`nproc` | ||
6 | CURDIR=/work | ||
7 | RUN_TESTS=true | ||
8 | 4 | ||
9 | RUN() { | 5 | if [ "$JOB" = "toxcore" ]; then |
10 | ./dockcross "$@" | 6 | CMAKE=$ARCH-w64-mingw32.shared-cmake |
11 | } | 7 | NPROC=`nproc` |
8 | CURDIR=/work | ||
9 | RUN_TESTS=true | ||
12 | 10 | ||
13 | TESTS() { | 11 | RUN() { |
14 | shift # Ignore test run count. | 12 | ./dockcross "$@" |
13 | } | ||
14 | |||
15 | TESTS() { | ||
16 | shift # Ignore test run count. | ||
15 | 17 | ||
16 | # Download Microsoft DLLs. | 18 | # Download Microsoft DLLs. |
17 | curl http://www.dlldump.com/dllfiles/I/iphlpapi.dll -o _build/iphlpapi.dll | 19 | curl http://www.dlldump.com/dllfiles/I/iphlpapi.dll -o _build/iphlpapi.dll |
18 | curl http://www.dlldump.com/dllfiles/W/ws2_32.dll -o _build/ws2_32.dll | 20 | curl http://www.dlldump.com/dllfiles/W/ws2_32.dll -o _build/ws2_32.dll |
19 | 21 | ||
20 | # Copy our dependency DLLs. | 22 | # Copy our dependency DLLs. |
21 | ./dockcross sh -c 'cp $WINEDLLPATH/*.dll _build' | 23 | ./dockcross sh -c 'cp $WINEDLLPATH/*.dll _build' |
22 | 24 | ||
23 | # Run tests in docker. | 25 | # Run tests in docker. |
24 | ./dockcross "$@" || { | 26 | ./dockcross "$@" || { |
25 | cat _build/Testing/Temporary/LastTest.log | 27 | cat _build/Testing/Temporary/LastTest.log |
26 | # Ignore test failures on Windows builds for now. | 28 | # Ignore test failures on Windows builds for now. |
27 | #false | 29 | #false |
30 | } | ||
28 | } | 31 | } |
29 | } | 32 | elif [ "$JOB" = "installmd" ]; then |
33 | true | ||
34 | else | ||
35 | echo "Unsupported JOB=$JOB" | ||
36 | 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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd other/docker/windows | ||
4 | |||
5 | docker build \ | ||
6 | --build-arg SUPPORT_ARCH_i686=${SUPPORT_ARCH_i686} \ | ||
7 | --build-arg SUPPORT_ARCH_x86_64=${SUPPORT_ARCH_x86_64} \ | ||
8 | --build-arg SUPPORT_TEST=${SUPPORT_TEST} \ | ||
9 | -t toxcore \ | ||
10 | . | ||
11 | |||
12 | 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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | docker run \ | ||
4 | -e ALLOW_TEST_FAILURE=${ALLOW_TEST_FAILURE} \ | ||
5 | -e ENABLE_ARCH_i686=${ENABLE_ARCH_i686} \ | ||
6 | -e ENABLE_ARCH_x86_64=${ENABLE_ARCH_x86_64} \ | ||
7 | -e ENABLE_TEST=${ENABLE_TEST} \ | ||
8 | -e EXTRA_CMAKE_FLAGS="${CMAKE_EXTRA_FLAGS} -DDEBUG=ON -DTEST_TIMEOUT_SECONDS=90" \ | ||
9 | -v ${PWD}:/toxcore \ | ||
10 | -v ${PWD}/result:/prefix \ | ||
11 | --rm \ | ||
12 | toxcore | ||