forked from MethodicalAcceleratorDesign/MAD-NG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (61 loc) · 2.13 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
# Travis-CI currently does not support language=lua. For an up-to-date list
# of supported languages, see: https://docs.travis-ci.com/user/languages/
language: c
# Build on Ubuntu 14.04 LTS Server Edition 64 bit (Trusty Tahr) which is
# currently on beta (instead of precise which is current default):
dist: trusty
# Build inside docker containers instead of virtual machines. These are
# faster, start quicker and support caching. Downside: sudo is not supported
sudo: false
# We cannot use 'sudo apt-get' to install missing apt-packages, see:
# - https://docs.travis-ci.com/user/installing-dependencies/
# - https://github.com/travis-ci/apt-package-whitelist
addons:
apt:
packages:
- gfortran
env:
global:
- PREFIX=$TRAVIS_BUILD_DIR/install
- PATH=$PREFIX/bin:$PATH
# Build dependencies:
before_install:
- env
- source ./tests/travis/build_common.sh
# Although the archives are included, need some dev files for now:
- SILENT ./tests/travis/build_luajit.sh
- SILENT ./tests/travis/build_lpeg.sh
- SILENT ./tests/travis/build_fftw3.sh
# - SILENT ./tests/travis/build_lapack.sh
- SILENT ./tests/travis/build_nfft3.sh
# - SILENT ./tests/travis/build_nlopt2.sh
# For coverage:
- SILENT ./tests/travis/build_luarocks.sh
- SILENT luarocks install luacov
- SILENT luarocks install cluacov
- SILENT luarocks install luacov-coveralls
# Build MAD:
install:
- cd src
- make -f Makefile.linux
- cd ..
# Symlink 'mad' in PATH:
- mkdir -p $PREFIX/bin
- ln -s $(readlink -f ./src/mad) $PREFIX/bin
# Run tests:
script:
- cd tests/utests
- mad all.mad -x Test_
# Run coverage on subset:
- echo "require('luacov'); return dofile('$TRAVIS_BUILD_DIR/src/madl_main.mad')" > madl_main.mad
- export LUA_PATH=$PREFIX/share/lua/5.1/?.lua
- export LUA_CPATH=$PREFIX/lib/lua/5.1/?.so
- mad -joff all.mad -x Test_ -x LHC
# Submit coverage report, etc:
after_success:
# Make pathes relative to root directory and submit from there - for best
# integration with coveralls.io:
- sed -rn -e "/[0-9]+:\//{s#:$TRAVIS_BUILD_DIR/#:#;p;n;p}" -i luacov.stats.out
- mv luacov.stats.out ../..
- cd ../..
- luacov-coveralls