diff options
-rw-r--r-- | .travis.yml | 15 | ||||
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | other/travis/env-linux.sh | 5 | ||||
-rw-r--r-- | other/travis/env-osx.sh | 13 | ||||
-rw-r--r-- | other/travis/env-windows.sh | 28 | ||||
-rwxr-xr-x | other/travis/toxcore-after_failure | 7 | ||||
-rwxr-xr-x | other/travis/toxcore-osx-install | 3 | ||||
-rwxr-xr-x | other/travis/toxcore-script | 8 | ||||
-rwxr-xr-x | other/travis/toxcore-windows-install | 7 |
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 | ||
13 | addons: | 21 | addons: |
14 | apt: | 22 | apt: |
@@ -36,9 +44,10 @@ cache: | |||
36 | - $HOME/.ghc | 44 | - $HOME/.ghc |
37 | - $HOME/cache | 45 | - $HOME/cache |
38 | 46 | ||
39 | install: other/travis/phase $JOB $ENV install | 47 | install: other/travis/phase $JOB $ENV install |
40 | script: other/travis/phase $JOB $ENV script | 48 | script: other/travis/phase $JOB $ENV script |
41 | after_script: other/travis/phase $JOB $ENV after_script | 49 | after_script: other/travis/phase $JOB $ENV after_script |
50 | after_failure: other/travis/phase $JOB $ENV after_failure | ||
42 | 51 | ||
43 | notifications: | 52 | notifications: |
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) | |||
402 | endfunction() | 402 | endfunction() |
403 | 403 | ||
404 | option(STRICT_ABI "Enforce strict ABI export in dynamic libraries" OFF) | 404 | option(STRICT_ABI "Enforce strict ABI export in dynamic libraries" OFF) |
405 | if(WIN32 OR APPLE) | ||
406 | # Windows and OSX don't have this linker functionality. | ||
407 | set(STRICT_ABI OFF) | ||
408 | endif() | ||
409 | |||
405 | if(STRICT_ABI) | 410 | if(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 @@ | |||
3 | CMAKE=cmake | 3 | CMAKE=cmake |
4 | NPROC=`nproc` | 4 | NPROC=`nproc` |
5 | CURDIR=$PWD | 5 | CURDIR=$PWD |
6 | TESTS=true | ||
7 | 6 | ||
8 | RUN() { | 7 | RUN() { |
9 | "$@" | 8 | "$@" |
10 | } | 9 | } |
10 | |||
11 | TESTS() { | ||
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 | |||
3 | CMAKE=cmake | ||
4 | NPROC=`sysctl -n hw.ncpu` | ||
5 | CURDIR=$PWD | ||
6 | |||
7 | RUN() { | ||
8 | "$@" | ||
9 | } | ||
10 | |||
11 | TESTS() { | ||
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 | |||
3 | CMAKE=$ARCH-w64-mingw32.shared-cmake | ||
4 | NPROC=`nproc` | ||
5 | CURDIR=/work | ||
6 | |||
7 | RUN() { | ||
8 | ./dockcross "$@" | ||
9 | } | ||
10 | |||
11 | ENABLE_WINDOWS_TESTS=false | ||
12 | |||
13 | TESTS() { | ||
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 | |||
3 | if [ -d /cores ]; then | ||
4 | for core in /cores/*; do | ||
5 | lldb --core $core --one-line "bt all" < /dev/null | ||
6 | done | ||
7 | fi | ||
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 | |||
3 | brew 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. |
9 | RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install -DDEBUG=ON -DASSOC_DHT=ON -DSTRICT_ABI=ON #-DASAN=ON | 9 | RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install -DDEBUG=ON -DASSOC_DHT=ON -DSTRICT_ABI=ON #-DASAN=ON |
10 | 10 | ||
11 | RUN make -C $BUILD_DIR -j$NPROC -k install | 11 | export CTEST_OUTPUT_ON_FAILURE=1 |
12 | 12 | ||
13 | if $TESTS; then | 13 | RUN make -C$BUILD_DIR -j$NPROC -k install |
14 | export CTEST_OUTPUT_ON_FAILURE=1 | 14 | TESTS make -C$BUILD_DIR -j$NPROC test |
15 | RUN make -C $BUILD_DIR -j$NPROC test | ||
16 | fi | ||
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 | |||
3 | DOCKER_IMAGE=toktoknet/windows:latest.$ARCH-shared | ||
4 | |||
5 | docker pull $DOCKER_IMAGE | ||
6 | docker run --rm $DOCKER_IMAGE > dockcross | ||
7 | chmod +x dockcross | ||