-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
70 lines (67 loc) · 2.42 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
dist: xenial
os: linux
language: cpp
compiler:
- gcc
jobs:
include:
- os: linux
dist: focal # 20.04
- os: linux
dist: bionic # 18.04
- os: linux
dist: xenial # 16.04
# earlier distributions are lacking libgsl-dev (i.e. use libgsl0-dev) AND are no longer supported by Ubuntu
- os: osx
osx_image: xcode11
addons:
apt:
packages:
- flex
- bison
- make
- libboost-all-dev
- libgsl-dev
- ghc
- python3
- python3-pip
homebrew:
packages:
- bison@2.7
- cmake
- boost
- gsl
- gnu-sed
- libomp
- gmp
install:
- ./configure
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then gsed -E "s|^YACC = .+$|YACC = /usr/local/opt/bison@2.7/bin/bison|" -i config.mf; gsed -E "s|^SED = .+$|SED = /usr/local/opt/gnu-sed/libexec/gnubin/sed|" -i config.mf; gsed -E "s/ -D_XOPEN_SOURCE=500 / /" -i config.mf; gsed -E "s/ -std=c\+\+17 / -std=c\+\+11 /" -i config.mf; fi
- cat config.mf
- make
- sudo make install
before_script:
# install missing ghc/haskell modules
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install cabal-install; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install cabal-install -y; fi
- cabal update
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cabal install --lib random; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cabal install random; fi
# obtain truth data from secondary github repository
- git clone https://github.com/jlab/gapc-test-suite.git $HOME/gapc-test-suite
# install c++ linter
- pip3 install cpplint
script:
# c++ code style checks
#- cpplint src/* rtlib/*
# manually compiling an example to check for raised warnings ...
- cp testdata/grammar/elm.gap . && gapc -p "buyer * pretty2" elm.gap && make -f out.mf 2>&1 > /dev/null | tee make.stderr
# ... and test if "warning: dynamic exception specifications are deprecated" are no longer triggered
- test $(grep "warning:.dynamic exception specifications are deprecated" make.stderr -c) -eq 0
# run compiler test suite
- make test-unit
- make test-paral
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make test-mod TRUTH_DIR=$HOME/gapc-test-suite/Truth TRUTH_SUFFIX=_ubuntu; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then make test-mod TRUTH_DIR=$HOME/gapc-test-suite/Truth TRUTH_SUFFIX=_osx; fi
- make test-regress TRUTH_DIR=$HOME/gapc-test-suite/Truth
- make test-ambiguity TRUTH_DIR=$HOME/gapc-test-suite/Truth