-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
103 lines (93 loc) · 3.65 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
# We pretend to be Java because we need GNU Octave which is not
# available (as of January 2016)
language: java
###############################################################################
cache:
# Downloading octave takes a while, so let's cache apt
apt: true
directories:
# Cache octave packages
- $HOME/octave
# Cache other packages
- $HOME/external_cache
###############################################################################
env:
matrix:
- COVERAGE="false"
- COVERAGE="true"
matrix:
allow_failures:
- env: COVERAGE="true"
fast_finish: true
###############################################################################
# Command to install dependencies
before_install:
# Remember the directory where our repository to test is located
- REPOPATH="$(pwd)" && pwd
# ---------------------------------------------------------------------------
# Check whether we need to upgrade the gcc and g++ versions. We do need to if
# the version is less the 4.8 and we need to install the image package from
# Octave Forge (possibly for other packages as well).
# For now, lets just always say we do need to do this.
- UPGRADE_GCC="true"
# ---------------------------------------------------------------------------
# Add repository for octave
- travis_retry sudo add-apt-repository -y ppa:octave/stable
# Add repository for installing g++-4.8 on Ubuntu 12.04
- if [ "$UPGRADE_GCC" = "true" ]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
fi
# Update apt-get to include the contents from the new locations
- travis_retry sudo apt-get update -qq
# Install octave with apt-get
- travis_retry sudo apt-get install -y octave liboctave-dev
# Add a C++11 compiler so we can install image package
- if [ "$UPGRADE_GCC" = "true" ]; then
travis_retry sudo apt-get install -y gcc-4.8 g++-4.8;
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50;
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50;
fi;
# Check which versions of g++ and gcc we are using
- which g++;
g++ --version;
which gcc;
gcc --version;
# ---------------------------------------------------------------------------
# Go up one level and retrieve MOxUnit from its repository
- cd ..;
ls -alh;
# Remove directory if it is already there from previous build
- rm -rf MOxUnit;
- git clone https://github.com/MOxUnit/MOxUnit.git
# Install MOxUnit, which adds itself to the startup path
- make -C MOxUnit install
# Install MOcov, which adds itself to the startup path
- if [ "$COVERAGE" = "true" ]; then
rm -rf MOcov;
git clone https://github.com/MOcov/MOcov.git;
make -C MOcov install;
fi;
# Go back to the repository directory
- cd ${REPOPATH}
###############################################################################
install:
# Ensure external packages folder exists and is empty
- echo "Install"
###############################################################################
before_script:
- echo "before script"
###############################################################################
script:
- echo "Check for regression test result"
- ls
###############################################################################
after_script:
# Check where we ended up and what's going on where we are
- pwd
- ls -alh
###############################################################################
after_success:
- echo "After success"
###############################################################################
# Enable archiving of artifacts on Shippable (does nothing on Travis)
archive: true