-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
63 lines (57 loc) · 2.22 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
# vim ft=yaml
# travis-ci.org definition for MOxUnit build (based on CoSMoMVPA,
# which is based on PyMVPA, which is based on nipype configuration,
# which in turn was based on nipy)
#
# We pretend to be java because we need GNU Octave which is not
# available (as of April 2015)
language: java
dist: trusty
sudo: required
cache:
- apt
env:
global:
- OCTAVE=octave
matrix:
- WITH_COVERAGE=
- WITH_COVERAGE=true
before_install:
# to prevent IPv6 being used for APT
- sudo bash -c "echo 'Acquire::ForceIPv4 \"true\";' > /etc/apt/apt.conf.d/99force-ipv4"
- travis_retry sudo apt-get -y -qq update
- travis_retry sudo apt-get install -y -qq software-properties-common python-software-properties
- travis_retry sudo apt-add-repository -y ppa:octave/stable
- travis_retry sudo apt-get -y -qq update
# get Octave 4,0
- travis_retry sudo apt-get -y -qq install octave liboctave-dev
# install MOxUnit
- cd ..
- rm -rf MOxUnit
- git clone https://github.com/MOxUnit/MOxUnit.git
- make -C MOxUnit install
# install MOcov
- rm -rf MOcov
- git clone https://github.com/MOcov/MOcov.git
- make -C MOcov install
# cd back to original directory
- cd MOdox
# show .octaverc
- cat ~/.octaverc
script:
- if [[ "$WITH_COVERAGE" == "true" ]]; then
TEST_ARGS=WITH_COVERAGE=true;
COVER_ARGS=COVER=`pwd`/MOdox;
if [[ "$SHIPPABLE" == "true" ]]; then
OUTPUT_ARGS=COVER_XML_FILE=${SHIPPABLE_BUILD_DIR}/shippable/codecoverage/coverage.xml;
AFTER_SCRIPT="find ${SHIPPABLE_BUILD_DIR}/shippable/;cat ${SHIPPABLE_BUILD_DIR}/shippable/codecoverage/coverage.xml;which reports";
elif [[ "$TRAVIS" == "true" ]]; then
OUTPUT_ARGS=COVER_JSON_FILE=`pwd`/coveralls.json;
AFTER_SCRIPT="curl --verbose -F json_file=@`pwd`/coveralls.json https://coveralls.io/api/v1/jobs";
fi;
elif [[ "$SHIPPABLE" == "true" ]]; then
RESULT_ARGS=JUNIT_XML_FILE=${SHIPPABLE_BUILD_DIR}/shippable/testresults/test_results.xml;
fi
- echo Test arguments $TEST_ARGS $COVER_ARGS $OUTPUT_ARGS $RESULT_ARGS
- make test $TEST_ARGS $COVER_ARGS $OUTPUT_ARGS $RESULT_ARGS
- eval $AFTER_SCRIPT