diff options
-rw-r--r-- | .travis.yml | 14 | ||||
-rwxr-xr-x | other/travis/phase | 22 |
2 files changed, 29 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml index d25afd13..2f22d495 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -2,14 +2,14 @@ language: c | |||
2 | 2 | ||
3 | matrix: | 3 | matrix: |
4 | include: | 4 | include: |
5 | - env: BUILD=hstox ENV=linux | 5 | - env: JOB=hstox ENV=linux |
6 | language: haskell | 6 | language: haskell |
7 | ghc: 7.8 | 7 | ghc: 7.8 |
8 | - env: BUILD=toxcore ENV=linux | 8 | - env: JOB=toxcore ENV=linux |
9 | compiler: clang | 9 | compiler: clang |
10 | - env: BUILD=toxcore ENV=linux | 10 | - env: JOB=toxcore ENV=linux |
11 | compiler: gcc | 11 | compiler: gcc |
12 | - env: BUILD=autotools ENV=linux | 12 | - env: JOB=autotools ENV=linux |
13 | compiler: clang | 13 | compiler: clang |
14 | 14 | ||
15 | addons: | 15 | addons: |
@@ -38,9 +38,9 @@ cache: | |||
38 | - $HOME/.ghc | 38 | - $HOME/.ghc |
39 | - $HOME/cache | 39 | - $HOME/cache |
40 | 40 | ||
41 | install: other/travis/${BUILD}-install | 41 | install: other/travis/phase $JOB $ENV install |
42 | script: other/travis/${BUILD}-script | 42 | script: other/travis/phase $JOB $ENV script |
43 | after_script: other/travis/${BUILD}-after_script | 43 | after_script: other/travis/phase $JOB $ENV after_script |
44 | 44 | ||
45 | notifications: | 45 | notifications: |
46 | irc: "chat.freenode.net#toktok-status" | 46 | irc: "chat.freenode.net#toktok-status" |
diff --git a/other/travis/phase b/other/travis/phase new file mode 100755 index 00000000..ac9bc3b4 --- /dev/null +++ b/other/travis/phase | |||
@@ -0,0 +1,22 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -e -u -x | ||
4 | |||
5 | JOB="$1" | ||
6 | ENV="$2" | ||
7 | PHASE="$3" | ||
8 | |||
9 | . "other/travis/env.sh" | ||
10 | . "other/travis/env-$ENV.sh" | ||
11 | |||
12 | try_source() { | ||
13 | SCRIPT="other/travis/$1" | ||
14 | if [ -f "$SCRIPT" ]; then | ||
15 | . "$SCRIPT" | ||
16 | fi | ||
17 | } | ||
18 | |||
19 | try_source "$PHASE" | ||
20 | try_source "$ENV-$PHASE" | ||
21 | try_source "$JOB-$PHASE" | ||
22 | try_source "$JOB-$ENV-$PHASE" | ||