-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.travis.yml
98 lines (90 loc) · 4.32 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
language: cpp
# For Linux builds:
dist: trusty
sudo: required
#compiler:
# - gcc
# - clang
#env:
# - CFG_CC= CFG_CXX= # default (gcc clang wrapper on OSX)
# - CFG_CC=clang CFG_CXX=clang++ # clang with GNU std libs.
# - CFG_CC='clang -std=gnu11' CFG_CXX='clang++ -std=gnu++1z -stdlib=libc++' # clang with native std libs.
# Build matrix:
matrix:
include:
- os: linux
compiler: gcc
- os: linux
compiler: clang
- os: osx
osx_image: xcode8.2
- os: osx
osx_image: xcode8.2
env: CFG_CC='clang -std=gnu11' CFG_CXX='clang++ -std=gnu++1z -stdlib=libc++'
- os: osx
osx_image: xcode8.1
- os: osx
osx_image: xcode8
env: CFG_CC='clang -std=gnu11' CFG_CXX='clang++ -std=gnu++1z'
- os: osx
osx_image: xcode8
env: CFG_CC='clang -std=gnu11' CFG_CXX='clang++ -std=gnu++1z -stdlib=libc++'
- os: osx
osx_image: xcode7.3
- os: osx
osx_image: xcode6.4
env: CFG_CC='clang -std=gnu11' CFG_CXX='clang++ -std=gnu++1z'
- os: osx
osx_image: xcode6.4
env: CFG_CC='clang -std=gnu11' CFG_CXX='clang++ -std=gnu++1z -stdlib=libc++'
before_install:
- if [ $TRAVIS_OS_NAME == osx ]; then brew update; fi
# Travis CI has a broken libtool/sed issue in the OSX image(s) <see e.g. https://github.com/libgd/libgd/issues/266#issuecomment-234697932>.
# This is the recommended work-around until they fix it.
- if [ $TRAVIS_OS_NAME == osx ]; then brew uninstall libtool && brew install libtool; fi
- if [ $TRAVIS_OS_NAME == osx ]; then brew install pcre2 the_silver_searcher; fi
# Install gnu grep to test against. @todo Make things work so this can be installed only after a successful build.
- if [ $TRAVIS_OS_NAME == osx ]; then brew tap homebrew/dupes; brew install grep; fi
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get update -qq; fi
- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get install -qq libpcre3-dev && sudo apt-get install -qq silversearcher-ag; fi
before_script:
- echo "g++ --version:" && g++ --version && autoreconf --version && automake --version && echo "===="
- # pwd ==> /home/travis/build/gvansickle/ucg
- getconf OPEN_MAX
- #if [ $TRAVIS_OS_NAME == osx ]; then sysctl -a hw; fi
- #if [ $TRAVIS_OS_NAME == linux ]; then cat /proc/cpuinfo | grep flags; fi
- # lscpu = Doesn't exist on OSX or Cygwin
- # free -ht = Doesn't exist on OSX or Cygwin
- # df main.cpp # df does exist on Cygwin. Also on OSX, but params are different, no --output, -T is different.
- #mount | fgrep -w "`df . | grep '%' | sed -e 's/.*% *//'`"
- git fetch --unshallow # Travis limits its pull by default to 50 revs. The build then can't do a proper "git describe".
script:
- #if [ $TRAVIS_OS_NAME == osx ]; then find /usr -type d ! -perm -g+r,u+r,o+r -prune -o -type f -iname 'libpcre*.dylib' -exec ls -lF \{\} \; && echo -n "brew --prefix pcre=" && brew --prefix pcre && brew --help; fi
- #if [ $TRAVIS_OS_NAME == osx ]; then ls -l -R $(brew --prefix pcre); fi
- #pkg-config --list-all | grep argp || true
- #find /usr -iname '*argp*' || true
- pkg-config --list-all | grep pcre
- #pkg-config libpcre2 --print-variables
- #pkg-config libpcre2 --print-provides
- # Actual build starts here.
- autoreconf -i
- mkdir build
- cd build
- echo "CFG_CC=$CFG_CC CFG_CXX=$CFG_CXX"
- ../configure CC="$CFG_CC" CXX="$CFG_CXX"
- make
- make check 'TESTSUITEFLAGS=--keywords=!benchmark'
- find . -iname '*.log' -exec cat "{}" \;
- echo "====" && echo "build_info.cpp:" && cat build_info.cpp && echo "===="
- #make distcheck 'TESTSUITEFLAGS=--keywords=!benchmark,!characterize'
after_success:
- # We're still in '/home/travis/build/gvansickle/ucg/build' at this point.
- cd ../../ # Back to our home dir.
- mkdir TestCorpus && cd TestCorpus && wget http://downloads.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.bz2 && tar xjf boost_1_58_0.tar.bz2 && cd ..
- cd ucg/build
- make check #TESTSUITEFLAGS='-v -d -x'
- cat tests/testsuite.log
- cat tests/perf_test_results.txt
- if [ $TRAVIS_OS_NAME == osx ]; then otool -L ucg && otool -l ucg; fi
- if [ $TRAVIS_OS_NAME == linux ]; then LD_DEBUG=all && ldd -v ucg; fi
- #find . -iname '*.log' -exec cat "{}" \;