forked from UnitexGramLab/unitex-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
136 lines (125 loc) · 4.91 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# add by martinec
# =============================================================================
# based on:
# https://github.com/mapbox/protozero/blob/master/.travis.yml
# https://github.com/dftlibs/xcfun/blob/master/.travis.yml
# https://github.com/clMathLibraries/clBLAS/blob/master/.travis.yml
# https://github.com/Automattic/_s/blob/master/.travis.yml
# =============================================================================
# - To install the Travis CI command line client, which requires
# Ruby 1.9.3 and RubyGems, type:
# $ gem install travis --no-rdoc --no-ri
# - To run the command line lint tool, type:
# $ travis lint
# =============================================================================
# language: instructs travis what compilers && environment to set up in build matrix
language: cpp
# sudo: false instructs Travis to build our project in a docker VM (faster)
sudo: required
# only available on private builds
cache:
- apt
# Travis CI clones repositories to a depth of 50 commits
git:
depth: 3
# Save common build configurations as shortcuts, so we can reference them later.
addons_shortcuts:
#addons_clang35: &clang35
#apt:
#sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5' ]
#packages: [ 'clang-3.5', 'cmake', 'cppcheck', 'valgrind' ]
#addons_clang38: &clang38
#apt:
#sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise' ]
#packages: [ 'clang-3.8', 'cmake', 'cppcheck', 'valgrind' ]
addons_gcc49: &gcc47
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'g++-4.7', 'gcc-4.7', 'cmake', 'cppcheck', 'valgrind' ]
addons_gcc48: &gcc48
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'g++-4.8', 'gcc-4.8', 'cmake', 'cppcheck', 'valgrind' ]
addons_gcc49: &gcc49
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'g++-4.9', 'gcc-4.9', 'cmake', 'cppcheck', 'valgrind' ]
addons_gcc49: &gcc5
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'g++-5', 'gcc-5', 'cmake', 'cppcheck', 'valgrind' ]
matrix:
# if a rows in the build matrix fails, set
# the build to finish as soon as possible
fast_finish: true
include:
#- os: linux
#dist: trusty
#compiler: "clang"
#env: CXX=clang++-3.5
#addons: *clang35
#- os: linux
#dist: trusty
#compiler: "clang"
#env: CXX=clang++-3.8
#addons: *clang38
- os: linux
dist: trusty
compiler: "gcc"
env: CXX=g++-4.7
addons: *gcc47
- os: linux
dist: trusty
compiler: "gcc"
env: CXX=g++-4.8
addons: *gcc48
- os: linux
dist: trusty
compiler: "gcc"
env: CXX=g++-4.9
addons: *gcc49
- os: linux
dist: trusty
compiler: "gcc"
env: CXX=g++-5
addons: *gcc5
- os: osx
# OS X 10.9
osx_image: xcode6.1
compiler: clang
- os: osx
# OS X 10.10
osx_image: xcode6.4
compiler: clang
- os: osx
# OS X 10.11
osx_image: xcode7.3
compiler: clang
# allow_failures:
# - os: osx
notifications:
email:
recipients:
on_success: change
on_failure: always
slack:
secure: Czf+dd6CyKvEvRTYi3E70lrsDoDZHXdyXSI7+PyQdJpjErU9LeTA0BXNlH5RYBaM7GOXftxQZuvkh0nXTF8e0xqz5qhO3bUdT7iJqivfmzLVuA5LPaKUg8vIv796RsG2RE9TH4SaOhQjJXfzWT5RgwQZeOldGL8scWzNtsnmgkv5QTdScwEU2m9qyo/WZXY6hnh6uKe2gtDgeeG0csRCk/n8SkPHY3AwBLrcLT9XhgQN7GbHOigfkSqF0OF6K8MCl2TxGGuO85cNZx1MXAYI8800F63+zGEz3AlNUZIS61/POaHIYD5fCjheyUDxtC7+GDIcOy8n6eN3nXB9ewIh0okg/Bg4yEfIfdBeKprEvTjKw4qcYOKoVsSoQ8C0pRyMQRdcSisivweaatvr0s/hAQwsrzyZvbfTqUsYaJD3gShe29UULfMWalc5tK9PQtNYtia5Dxn1776kIcGJ+z/lgFLboWsE6uluenMKwVVPc27ArknZZ6YcgC4C8rdMxc2yvZFNMQjmuwqUswq9Iuv3GB80/1YJO/mihjP6nXn6CZ1jk/eUuKrZDXqe3kruKn3atMOsXsLl15MhX0QAdz/ASbLu/GqHhOwUgsOwLQMaajWAn1L/8+GnMjODM75hlr06qrm8MIXvb+ERP5zAujeMTUWCpkYBdi3F1W1ahOrUTcE=
before_install:
- cmake --version
- ${CC} --version
- ${CXX} --version
- export UNITEX_CORE_VERSION_GIT_COMMIT_HASH=$(git describe --always HEAD) && echo ${UNITEX_CORE_VERSION_GIT_COMMIT_HASH}
install:
- git clone -b master --depth 1 https://github.com/UnitexGramLab/unitex-core-tests
- cd unitex-core-tests && "./shellcheck-install.sh" && "./shellcheck-check.sh" && cd ..
# overwrite the default build step
script:
# workaround for an issue related with the default export of the CC environment variable on Travis
# https://github.com/travis-ci/travis-ci/issues/4682
# https://github.com/travis-ci/docs-travis-ci-com/commit/fbca7ce4
- test -n $CC && unset CC
- mkdir -p bin && cd build && make ADDITIONAL_CFLAG+=-DUNITEX_CORE_VERSION_GIT_COMMIT_HASH=${UNITEX_CORE_VERSION_GIT_COMMIT_HASH} DEBUG=yes UNITEXTOOLLOGGERONLY=yes && cd ..
- export UNITEX_BIN="$PWD/bin/UnitexToolLogger" && echo ${UNITEX_BIN}
- cd unitex-core-tests
- "./unitex-core-test.sh -w80 -p1"