Skip to content

Commit

Permalink
Add an OSX build that doesn't run tests.
Browse files Browse the repository at this point in the history
This one is not allowed to fail and ensures that toxcore can at least be
built for OSX.
  • Loading branch information
iphydf committed Jan 6, 2017
1 parent fdb46f6 commit 08cd613
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@ language: c

matrix:
include:
# OSX build comes first because Travis queues builds in order. The OSX
# builds are often pushed on a very long (100-200 jobs) backlog, so they get
# highest priority in our build sequence.
- env: JOB=toxcore ENV=osx RUN_TESTS=false
os: osx
- env: JOB=toxcore ENV=osx RUN_TESTS=true
os: osx
- env: JOB=hstox ENV=linux
language: haskell
ghc: 7.8
- env: JOB=autotools ENV=linux
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
Expand All @@ -19,7 +24,7 @@ matrix:
- docker
fast_finish: true
allow_failures:
- os: osx
- env: JOB=toxcore ENV=osx RUN_TESTS=true

addons:
apt:
Expand Down
1 change: 1 addition & 0 deletions other/travis/env-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CMAKE=cmake
CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DFORMAT_TEST=ON"
NPROC=`nproc`
CURDIR=$PWD
RUN_TESTS=true

RUN() {
"$@"
Expand Down
13 changes: 5 additions & 8 deletions other/travis/env-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ CMAKE=$ARCH-w64-mingw32.shared-cmake
CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DBOOTSTRAP_DAEMON=OFF -DCOMPILE_AS_CXX=ON"
NPROC=`nproc`
CURDIR=/work
RUN_TESTS=false

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

ENABLE_WINDOWS_TESTS=false

TESTS() {
# Download Microsoft DLLs.
curl http://www.dlldump.com/dllfiles/I/iphlpapi.dll -o _build/iphlpapi.dll
Expand All @@ -20,10 +19,8 @@ TESTS() {
./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
./dockcross "$@" || {
cat _build/Testing/Temporary/LastTest.log
false
}
}
4 changes: 3 additions & 1 deletion other/travis/toxcore-script
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ RUN $CMAKE \
export CTEST_OUTPUT_ON_FAILURE=1

RUN make -C$BUILD_DIR -j$NPROC -k install
TESTS make -C$BUILD_DIR -j$NPROC test
if $RUN_TESTS; then
TESTS make -C$BUILD_DIR -j$NPROC test
fi

0 comments on commit 08cd613

Please sign in to comment.