summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml15
-rw-r--r--CMakeLists.txt5
-rw-r--r--other/travis/env-linux.sh5
-rw-r--r--other/travis/env-osx.sh13
-rw-r--r--other/travis/env-windows.sh28
-rwxr-xr-xother/travis/toxcore-after_failure7
-rwxr-xr-xother/travis/toxcore-osx-install3
-rwxr-xr-xother/travis/toxcore-script8
-rwxr-xr-xother/travis/toxcore-windows-install7
9 files changed, 82 insertions, 9 deletions
diff --git a/.travis.yml b/.travis.yml
index cfa9240d..50bedc8d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,6 +9,14 @@ matrix:
9 compiler: gcc 9 compiler: gcc
10 - env: JOB=toxcore ENV=linux 10 - env: JOB=toxcore ENV=linux
11 compiler: clang 11 compiler: clang
12 - env: JOB=toxcore ENV=osx
13 os: osx
14 - env: JOB=toxcore ENV=windows ARCH=i686
15 services:
16 - docker
17 - env: JOB=toxcore ENV=windows ARCH=x86_64
18 services:
19 - docker
12 20
13addons: 21addons:
14 apt: 22 apt:
@@ -36,9 +44,10 @@ cache:
36 - $HOME/.ghc 44 - $HOME/.ghc
37 - $HOME/cache 45 - $HOME/cache
38 46
39install: other/travis/phase $JOB $ENV install 47install: other/travis/phase $JOB $ENV install
40script: other/travis/phase $JOB $ENV script 48script: other/travis/phase $JOB $ENV script
41after_script: other/travis/phase $JOB $ENV after_script 49after_script: other/travis/phase $JOB $ENV after_script
50after_failure: other/travis/phase $JOB $ENV after_failure
42 51
43notifications: 52notifications:
44 irc: "chat.freenode.net#toktok-status" 53 irc: "chat.freenode.net#toktok-status"
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 399b2a07..aa889ce1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -402,6 +402,11 @@ function(make_version_script header ns lib)
402endfunction() 402endfunction()
403 403
404option(STRICT_ABI "Enforce strict ABI export in dynamic libraries" OFF) 404option(STRICT_ABI "Enforce strict ABI export in dynamic libraries" OFF)
405if(WIN32 OR APPLE)
406 # Windows and OSX don't have this linker functionality.
407 set(STRICT_ABI OFF)
408endif()
409
405if(STRICT_ABI) 410if(STRICT_ABI)
406 if(BUILD_TOXAV) 411 if(BUILD_TOXAV)
407 make_version_script(${CMAKE_SOURCE_DIR}/toxav/toxav.h toxav toxav) 412 make_version_script(${CMAKE_SOURCE_DIR}/toxav/toxav.h toxav toxav)
diff --git a/other/travis/env-linux.sh b/other/travis/env-linux.sh
index 0eb5e9ea..2544ee56 100644
--- a/other/travis/env-linux.sh
+++ b/other/travis/env-linux.sh
@@ -3,8 +3,11 @@
3CMAKE=cmake 3CMAKE=cmake
4NPROC=`nproc` 4NPROC=`nproc`
5CURDIR=$PWD 5CURDIR=$PWD
6TESTS=true
7 6
8RUN() { 7RUN() {
9 "$@" 8 "$@"
10} 9}
10
11TESTS() {
12 "$@"
13}
diff --git a/other/travis/env-osx.sh b/other/travis/env-osx.sh
new file mode 100644
index 00000000..e45c34a7
--- /dev/null
+++ b/other/travis/env-osx.sh
@@ -0,0 +1,13 @@
1#!/bin/sh
2
3CMAKE=cmake
4NPROC=`sysctl -n hw.ncpu`
5CURDIR=$PWD
6
7RUN() {
8 "$@"
9}
10
11TESTS() {
12 "$@"
13}
diff --git a/other/travis/env-windows.sh b/other/travis/env-windows.sh
new file mode 100644
index 00000000..d7eecada
--- /dev/null
+++ b/other/travis/env-windows.sh
@@ -0,0 +1,28 @@
1#!/bin/sh
2
3CMAKE=$ARCH-w64-mingw32.shared-cmake
4NPROC=`nproc`
5CURDIR=/work
6
7RUN() {
8 ./dockcross "$@"
9}
10
11ENABLE_WINDOWS_TESTS=false
12
13TESTS() {
14 # Download Microsoft DLLs.
15 curl http://www.dlldump.com/dllfiles/I/iphlpapi.dll -o _build/iphlpapi.dll
16 curl http://www.dlldump.com/dllfiles/W/ws2_32.dll -o _build/ws2_32.dll
17
18 # Copy our dependency DLLs.
19 ./dockcross sh -c 'cp $WINEDLLPATH/*.dll _build'
20
21 # Run tests in docker.
22 if $ENABLE_WINDOWS_TESTS; then
23 ./dockcross "$@" || {
24 cat _build/Testing/Temporary/LastTest.log
25 false
26 }
27 fi
28}
diff --git a/other/travis/toxcore-after_failure b/other/travis/toxcore-after_failure
new file mode 100755
index 00000000..e1f5c399
--- /dev/null
+++ b/other/travis/toxcore-after_failure
@@ -0,0 +1,7 @@
1#!/bin/sh
2
3if [ -d /cores ]; then
4 for core in /cores/*; do
5 lldb --core $core --one-line "bt all" < /dev/null
6 done
7fi
diff --git a/other/travis/toxcore-osx-install b/other/travis/toxcore-osx-install
new file mode 100755
index 00000000..4b777340
--- /dev/null
+++ b/other/travis/toxcore-osx-install
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3brew install libsodium libvpx opus libconfig check astyle
diff --git a/other/travis/toxcore-script b/other/travis/toxcore-script
index 96193855..b1e60763 100755
--- a/other/travis/toxcore-script
+++ b/other/travis/toxcore-script
@@ -8,9 +8,7 @@ export CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
8# so it's disabled on Travis. 8# so it's disabled on Travis.
9RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install -DDEBUG=ON -DASSOC_DHT=ON -DSTRICT_ABI=ON #-DASAN=ON 9RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install -DDEBUG=ON -DASSOC_DHT=ON -DSTRICT_ABI=ON #-DASAN=ON
10 10
11RUN make -C $BUILD_DIR -j$NPROC -k install 11export CTEST_OUTPUT_ON_FAILURE=1
12 12
13if $TESTS; then 13RUN make -C$BUILD_DIR -j$NPROC -k install
14 export CTEST_OUTPUT_ON_FAILURE=1 14TESTS make -C$BUILD_DIR -j$NPROC test
15 RUN make -C $BUILD_DIR -j$NPROC test
16fi
diff --git a/other/travis/toxcore-windows-install b/other/travis/toxcore-windows-install
new file mode 100755
index 00000000..6160856b
--- /dev/null
+++ b/other/travis/toxcore-windows-install
@@ -0,0 +1,7 @@
1#!/bin/sh
2
3DOCKER_IMAGE=toktoknet/windows:latest.$ARCH-shared
4
5docker pull $DOCKER_IMAGE
6docker run --rm $DOCKER_IMAGE > dockcross
7chmod +x dockcross