forked from inet-framework/inet
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
126 lines (107 loc) · 5.25 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
sudo: required
language: generic
notifications:
email:
recipients:
# This is the string "[email protected]" encrypted in such a way that Travis will only decrypt it if the build is running from
# the inet-framework/inet repo, and not if from a fork. So we won't get spammed by forks even if Travis CI is enabled on them.
- secure: "fWDp+W5lxF3B2bm0+ADjGDeG5uMtaWCBUlR58e+9drpquIGn2Ljh5ENknb/kpIt+HVLaww9eJf70ha8sKwgSwNbMFGAsRMz0KwBImiQBqCeNPFgrEcfS262riosQo7+Uuj4p6evzrmilpO0x6JoY4Dph2XNO74tgXH8xWfPwwp4="
services:
- docker
before_install:
- docker pull omnetpp/travis-inet:5.4.1-180629
cache:
directories:
- $HOME/docker_ccache
# This is not used directly by Travis (the name doesn't matter), we just reuse it in script: nodes.
docker_command: &DOCKER_COMMAND travis_wait 30 sleep infinity &
docker run -ti --env TARGET_PLATFORM --env MODE --env TRAVIS_REPO_SLUG
-v /home/travis/build/$TRAVIS_REPO_SLUG:/$TRAVIS_REPO_SLUG
-v $HOME/docker_ccache:/root/.ccache omnetpp/travis-inet:5.4.1-180629
/bin/bash /$TRAVIS_REPO_SLUG/_scripts/travis/travis-stage-$STAGE.sh $INNER_ARGS
# the last two (STAGE and INNER_ARGS) come from export statements, not env: lines
# The "build" stage inherits this, so we won't have to repeat it 6 more times.
# The "fingerprints" stage overwrites it for all of its jobs.
script:
- export STAGE=build # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
# Note that the "env:" values must match EXACTLY (the whole string, even the spaces between the assignments)
# between the jobs in the "build" stage (which prepare the cache) and the corresponding jobs in the
# "fingerprints" stage (which use the cache). See: https://github.com/travis-ci/travis-ci/issues/9043
jobs:
include:
- stage: build
env: TARGET_PLATFORM=linux MODE=release
- env: TARGET_PLATFORM=linux MODE=debug
- env: TARGET_PLATFORM=windows MODE=release
- env: TARGET_PLATFORM=windows MODE=debug
- env: TARGET_PLATFORM=macosx MODE=release
- env: TARGET_PLATFORM=macosx MODE=debug
# The following atrocity was necessitated by the timeout limits on Travis.
# release mode fingerprints, split into three arbitrary parts using filters, to avoid freaking timeouts
- stage: fingerprints
script:
- export STAGE=fingerprints INNER_ARGS="-n 2 -i 0" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=release
- script:
- export STAGE=fingerprints INNER_ARGS="-n 2 -i 1" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=release
- script:
- export STAGE=fingerprints INNER_ARGS="-n 8 -i 0" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=debug
- script:
- export STAGE=fingerprints INNER_ARGS="-n 8 -i 1" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=debug
- script:
- export STAGE=fingerprints INNER_ARGS="-n 8 -i 2" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=debug
- script:
- export STAGE=fingerprints INNER_ARGS="-n 8 -i 3" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=debug
- script:
- export STAGE=fingerprints INNER_ARGS="-n 8 -i 4" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=debug
- script:
- export STAGE=fingerprints INNER_ARGS="-n 8 -i 5" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=debug
- script:
- export STAGE=fingerprints INNER_ARGS="-n 8 -i 6" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=debug
- script:
- export STAGE=fingerprints INNER_ARGS="-n 8 -i 7" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=debug
- stage: moduletests
script:
- export STAGE=moduletests INNER_ARGS="" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=debug
# TODO add release mode when the runner script supports it
- stage: unittests
script:
- export STAGE=unittests INNER_ARGS="" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=debug
# TODO add release mode when the runner script supports it
- stage: packettests
script:
- export STAGE=packettests INNER_ARGS="" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=debug
# TODO add release mode when the runner script supports it
- stage: queueingtests
script:
- export STAGE=queueingtests INNER_ARGS="" # not env, so it doesn't affect the cache key
- *DOCKER_COMMAND
env: TARGET_PLATFORM=linux MODE=debug
# TODO add release mode when the runner script supports it
# "Look what you made me do", Travis.