diff options
Diffstat (limited to '.travis/cmake-linux')
-rwxr-xr-x | .travis/cmake-linux | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/.travis/cmake-linux b/.travis/cmake-linux index 0deeaacc..e2f44195 100755 --- a/.travis/cmake-linux +++ b/.travis/cmake-linux | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/bash |
2 | 2 | ||
3 | ACTION="$1" | 3 | ACTION="$1" |
4 | 4 | ||
@@ -8,22 +8,11 @@ CACHEDIR="$HOME/cache" | |||
8 | NPROC=`nproc` | 8 | NPROC=`nproc` |
9 | ASTYLE="$CACHEDIR/astyle/build/gcc/bin/astyle" | 9 | ASTYLE="$CACHEDIR/astyle/build/gcc/bin/astyle" |
10 | ASTYLE_VERSION=3.1 | 10 | ASTYLE_VERSION=3.1 |
11 | 11 | TRAVIS_TOOL="https://raw.githubusercontent.com/TokTok/ci-tools/master/bin/travis-haskell" | |
12 | install_tool() { | ||
13 | SLUG="$1" | ||
14 | TOOL="$2" | ||
15 | TARGET="$3" | ||
16 | |||
17 | VERSION=$(curl -L -s -H 'Accept: application/json' \ | ||
18 | "https://github.com/$SLUG/releases/latest" \ | ||
19 | | egrep -o '"v[0-9][^"]+"' \ | ||
20 | | egrep -o '[^"]+') | ||
21 | URL="https://github.com/$SLUG/releases/download/$VERSION/$TOOL-x86_64-linux-$VERSION.tar.gz" | ||
22 | curl -L -s "$URL" | tar xzv -C "$TARGET" | ||
23 | } | ||
24 | 12 | ||
25 | travis_install() { | 13 | travis_install() { |
26 | install_tool TokTok/hs-tokstyle tokstyle "$HOME/.local" | 14 | bash <(curl -s "$TRAVIS_TOOL") download |
15 | travis-haskell download TokTok/hs-tokstyle tokstyle "$HOME/.local" | ||
27 | 16 | ||
28 | which coveralls || { | 17 | which coveralls || { |
29 | # Install cpp-coveralls to upload test coverage results. | 18 | # Install cpp-coveralls to upload test coverage results. |
@@ -48,7 +37,7 @@ run_static_analysis() { | |||
48 | pylint -E other/analysis/check_recursion | 37 | pylint -E other/analysis/check_recursion |
49 | 38 | ||
50 | export CPPFLAGS="-isystem $CACHEDIR/include" | 39 | export CPPFLAGS="-isystem $CACHEDIR/include" |
51 | export LDFLAGS="-L $CACHEDIR/lib" | 40 | export LDFLAGS="-L$CACHEDIR/lib" |
52 | cat toxav/*.c toxcore/*.c toxencryptsave/*.c \ | 41 | cat toxav/*.c toxcore/*.c toxencryptsave/*.c \ |
53 | | clang `pkg-config --cflags libsodium opus vpx` \ | 42 | | clang `pkg-config --cflags libsodium opus vpx` \ |
54 | -Itoxav -Itoxcore -Itoxencryptsave -S -emit-llvm -xc - -o- \ | 43 | -Itoxav -Itoxcore -Itoxencryptsave -S -emit-llvm -xc - -o- \ |