summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml14
-rwxr-xr-xother/travis/phase22
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
3matrix: 3matrix:
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
15addons: 15addons:
@@ -38,9 +38,9 @@ cache:
38 - $HOME/.ghc 38 - $HOME/.ghc
39 - $HOME/cache 39 - $HOME/cache
40 40
41install: other/travis/${BUILD}-install 41install: other/travis/phase $JOB $ENV install
42script: other/travis/${BUILD}-script 42script: other/travis/phase $JOB $ENV script
43after_script: other/travis/${BUILD}-after_script 43after_script: other/travis/phase $JOB $ENV after_script
44 44
45notifications: 45notifications:
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
3set -e -u -x
4
5JOB="$1"
6ENV="$2"
7PHASE="$3"
8
9. "other/travis/env.sh"
10. "other/travis/env-$ENV.sh"
11
12try_source() {
13 SCRIPT="other/travis/$1"
14 if [ -f "$SCRIPT" ]; then
15 . "$SCRIPT"
16 fi
17}
18
19try_source "$PHASE"
20try_source "$ENV-$PHASE"
21try_source "$JOB-$PHASE"
22try_source "$JOB-$ENV-$PHASE"