Add OSX and Windows build to travis config.

Tests for Windows are disabled for now, until we figure out which tests
can successfully run on wine and select only those.
This commit is contained in:
iphydf 2016-08-24 23:52:34 +01:00
parent 51d18236c8
commit e59fd26d49
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
9 changed files with 82 additions and 9 deletions

View File

@ -9,6 +9,14 @@ matrix:
compiler: gcc
- env: JOB=toxcore ENV=linux
compiler: clang
- env: JOB=toxcore ENV=osx
os: osx
- env: JOB=toxcore ENV=windows ARCH=i686
services:
- docker
- env: JOB=toxcore ENV=windows ARCH=x86_64
services:
- docker
addons:
apt:
@ -36,9 +44,10 @@ cache:
- $HOME/.ghc
- $HOME/cache
install: other/travis/phase $JOB $ENV install
script: other/travis/phase $JOB $ENV script
after_script: other/travis/phase $JOB $ENV after_script
install: other/travis/phase $JOB $ENV install
script: other/travis/phase $JOB $ENV script
after_script: other/travis/phase $JOB $ENV after_script
after_failure: other/travis/phase $JOB $ENV after_failure
notifications:
irc: "chat.freenode.net#toktok-status"

View File

@ -402,6 +402,11 @@ function(make_version_script header ns lib)
endfunction()
option(STRICT_ABI "Enforce strict ABI export in dynamic libraries" OFF)
if(WIN32 OR APPLE)
# Windows and OSX don't have this linker functionality.
set(STRICT_ABI OFF)
endif()
if(STRICT_ABI)
if(BUILD_TOXAV)
make_version_script(${CMAKE_SOURCE_DIR}/toxav/toxav.h toxav toxav)

View File

@ -3,8 +3,11 @@
CMAKE=cmake
NPROC=`nproc`
CURDIR=$PWD
TESTS=true
RUN() {
"$@"
}
TESTS() {
"$@"
}

13
other/travis/env-osx.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/sh
CMAKE=cmake
NPROC=`sysctl -n hw.ncpu`
CURDIR=$PWD
RUN() {
"$@"
}
TESTS() {
"$@"
}

View File

@ -0,0 +1,28 @@
#!/bin/sh
CMAKE=$ARCH-w64-mingw32.shared-cmake
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
}

View File

@ -0,0 +1,7 @@
#!/bin/sh
if [ -d /cores ]; then
for core in /cores/*; do
lldb --core $core --one-line "bt all" < /dev/null
done
fi

View File

@ -0,0 +1,3 @@
#!/bin/sh
brew install libsodium libvpx opus libconfig check astyle

View File

@ -8,9 +8,7 @@ export CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
# so it's disabled on Travis.
RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install -DDEBUG=ON -DASSOC_DHT=ON -DSTRICT_ABI=ON #-DASAN=ON
RUN make -C $BUILD_DIR -j$NPROC -k install
export CTEST_OUTPUT_ON_FAILURE=1
if $TESTS; then
export CTEST_OUTPUT_ON_FAILURE=1
RUN make -C $BUILD_DIR -j$NPROC test
fi
RUN make -C$BUILD_DIR -j$NPROC -k install
TESTS make -C$BUILD_DIR -j$NPROC test

View File

@ -0,0 +1,7 @@
#!/bin/sh
DOCKER_IMAGE=toktoknet/windows:latest.$ARCH-shared
docker pull $DOCKER_IMAGE
docker run --rm $DOCKER_IMAGE > dockcross
chmod +x dockcross