forked from matsim-org/matsim-libs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
116 lines (101 loc) · 4.62 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
# Status: Somehow, a stage does not seem to pick up the result of the
# previous stage. For example, even after "mvn package", it attempts to
# download matsim snapshots from the internet. My next attempt would now be along the lines of
#
# mvn -o -f ~/git/matsim/pom.xml --projects contribs/otfvis --also-make install -DskipTests
# mvn -o -f ~/git/matsim/contribs/otfvis/pom.xml exec:java -Dexec.mainClass="org.matsim.contrib.otfvis.OTFVis" -Dexec.vmargs="-Xmx2000m" -Dexec.args="$*"
#
# Well, since the commit of this note will trigger another build, I am giving it a first shot, see below. kai
language: java
jdk: openjdk11
# addons:
# apt:
# packages:
# - oracle-java8-installer # https://github.com/travis-ci/travis-ci/issues/3259
# https://github.com/travis-ci/travis-ci/issues/10247
# This skips the mvn install that is otherwise run (implausibly, the setting has to be "true")
# https://docs.travis-ci.com/user/customizing-the-build/#Skipping-the-Installation-Step
install: true
if: type == push OR (fork == true AND type == pull_request)
# For the following, see
# https://blog.travis-ci.com/2017-09-12-build-stages-order-and-conditions.
# Note that you cannot get rid of the "test" stage, and it is the only
# stage that does get matrix-expanded. So the IT tests need to be run
# in stage called "test". kai, dec'17
# define the order of the stages:
stages:
# - package
- test
# yyyy It would be good to install matsim-main in the package stage
# (presumably including non-it tests), and then just run all other
# tests based on the installation. However, the travis forgets the
# result of mvn install and starts over; thus is this not very useful.
# kai, mar'19
# this is the script run in the "test" stage:
# 'failsafe:verify' triggers travis failures for errors/failures of integration tests.
script: mvn install --batch-mode --also-make --projects ${MODULE} -DskipTests -Dmaven.javadoc.skip && cd ${TRAVIS_BUILD_DIR}/${MODULE} && mvn surefire:test failsafe:integration-test failsafe:verify --batch-mode -Dmaven.test.redirectTestOutputToFile -Dmatsim.preferLocalDtds=true --fail-at-end -Dmaven.javadoc.skip -Dsource.skip -Dassembly.skipAssembly=true
# I just added -DskipTests here since I think that we only want to run
# the IT tests. kai, sep'18
# -DskipTests skips both normal _and_ integration tests :-(. There is
# now instead -Dskip.surefire.tests, which is resolved in the matsim
# pom.xml (and hopefully inherited). See
# https://stackoverflow.com/questions/6612344/prevent-unit-tests-but-allow-integration-tests-in-maven
# kai, mar'19
# this defines all other stages.
# jobs:
# include:
# - stage: package
# script: mvn package --batch-mode -Dmaven.test.redirectTestOutputToFile -Dmatsim.preferLocalDtds=true --fail-at-end -DskipTests
#-Dmaven.javadoc.skip # may need this for the weekly/monthly releases
#-Dsource.skip # may need this for the weekly/monthly releases
#-Dassembly.skipAssembly=true # if we skip this, then mvn package fails
# (Would be nice to run this also in parallel with the others. But it
# is either the matrix thing and then exactly the same command for
# each module. Or hand-written entries (see .travis.yml.nomatrix),
# which in particular has the disadvantage that one cannot see the
# failing module at the travis toplevel.)
cache:
directories:
- $HOME/.m2
env:
matrix:
- MODULE=matsim
# sorted from longest to shortest (to minimise the overall test stage duration)
- MODULE=contribs/vsp
- MODULE=contribs/common
- MODULE=contribs/taxi
- MODULE=contribs/minibus
- MODULE=contribs/signals
- MODULE=contribs/bicycle
- MODULE=contribs/cadytsIntegration
- MODULE=contribs/drt
- MODULE=contribs/discrete_mode_choice
- MODULE=contribs/carsharing
- MODULE=contribs/commercialTrafficApplications
- MODULE=contribs/av
- MODULE=contribs/locationchoice
- MODULE=contribs/ev
- MODULE=contribs/dvrp
- MODULE=contribs/emissions
- MODULE=contribs/decongestion
- MODULE=contribs/noise
- MODULE=contribs/accidents
- MODULE=contribs/freight
- MODULE=contribs/parking
- MODULE=contribs/matrixbasedptrouter
- MODULE=contribs/accessibility
- MODULE=contribs/integration
- MODULE=contribs/multimodal
- MODULE=contribs/protobuf
- MODULE=contribs/socnetsim
- MODULE=contribs/sumo
- MODULE=contribs/pseudosimulation
- MODULE=contribs/roadpricing
- MODULE=contribs/analysis
- MODULE=contribs/eventsBasedPTRouter
- MODULE=contribs/hybridsim
- MODULE=contribs/otfvis
- MODULE=contribs/osm
- MODULE=contribs/sbb-extensions
global:
- MAVEN_OPTS="-Xmx2g"