summaryrefslogtreecommitdiff
path: root/other/travis/env-windows.sh
blob: 0ea1f7266bff4b0427bc8820b4dddde0eb360348 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

CMAKE=$ARCH-w64-mingw32.shared-cmake
CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DBOOTSTRAP_DAEMON=OFF -DCOMPILE_AS_CXX=ON"
NPROC=`nproc`
CURDIR=/work

RUN() {
  ./dockcross "$@"
}

ENABLE_WINDOWS_TESTS=false

TESTS() {
  # 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.
  if $ENABLE_WINDOWS_TESTS; then
    ./dockcross "$@" || {
      cat _build/Testing/Temporary/LastTest.log
      false
    }
  fi
}