-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.travis.yml
125 lines (113 loc) · 4.19 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
branches:
except:
- doc
- benchmarks
language: cpp
os: linux
dist: xenial
sudo: required
addons:
apt:
sources: &basic_sources
- ubuntu-toolchain-r-test
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main"
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main"
key_url: "http://llvm.org/apt/llvm-snapshot.gpg.key"
packages: &basic_deps
- libssl-dev
- libgmp-dev
- lcov
env:
global:
- ENABLE_COVERAGE=Off
- BUILD_TYPE=Debug
- secure: "duw9VsNsbzKZ/tPkL1D0u7TfCvkfh8XEIg9VM//YX4HNkKJqBhC6zFE5MDLJ1bFLpNUkC8NaIZmXEVTMWAnjDKTIaWTmDu3gTQsdNFIIiQKSY4avaHqnJvj7H8g/hEpJIZODlTTwnqS67FVKGbRPruk9gG7aO6F0xRkvr6GOGee2pWKi81b+kB2S08h5Biasr+9ZrRsd86MGgrKFLH4p+dwpSTTFLgJtgpcfJD5T0CTxACuBjYDodiVlfXYvU6NvyC38cPegRcE/D6wcxOet4+sIqgKCqzrIjA+d3mAXcdAOq0Fg8qb320PvGS/yfIdAbc13YkZ2wxteHsYm52hU3HGtEOSXuIZeUdZzag68mC6AOzSStWRiFOgwXwU+8dUGFOF8ccvLie0Se5hemX+A/lKeeutVq7G3Fs68RpISgSx9L7k/WOAf5QqBGToxqLuKwNt4h1NySQquCb2X2ctMu+MO+ODTMNOXEhA/jO0Se/1vx9esTAv0MLMLi119g/TvT5o+1oZAMLzeffN6hT7YbnbIWa8U4hwm9W6xOhmb/IOBXW0wftKK6Xx1+XBxHyUQU0tCx+u36+Jox7fpaIvW4uulC3rUhyzgTVjpE3JSNI6aomRVKRhBU/JPasarPkgoHQnnRdM3Mm998lij50uLup/zC/r/u+PXFtHxHJhgoH4="
install:
- cd install_dependencies
- ./install_libsodium.sh
- ./install_relic_easy.sh
- cd ..
- gem install coveralls-lcov
- sudo ldconfig
before_script:
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DENABLE_COVERAGE=${ENABLE_COVERAGE} -DSANITIZE_ADDRESS=On -DSANITIZE_UNDEFINED=On ..
matrix:
include:
- env:
- STATIC_ANALYSIS=false
- RUN_CHECKS=true
- COMPILER=gcc
- ENABLE_COVERAGE=On
compiler: gcc
addons:
apt:
sources: *basic_sources
packages:
- *basic_deps
after_success:
- cd $TRAVIS_BUILD_DIR
- if [ "${TRAVIS_BRANCH}" != "coverity_scan" ]; then ./coverage/gen_coverage.sh; fi # get the code coverage
- if [ "${TRAVIS_BRANCH}" != "coverity_scan" ]; then ./coverage/upload_report.sh; fi # upload the report to coveralls
- env:
- STATIC_ANALYSIS=false
- RUN_CHECKS=true
- COMPILER=clang
compiler: clang
addons:
apt:
sources: *basic_sources
packages:
- *basic_deps
- env:
- STATIC_ANALYSIS=true
- RUN_CHECKS=false
- CLANG_TIDY=clang-tidy-10
addons:
apt:
sources: *basic_sources
packages:
- *basic_deps
- cppcheck
- libclang-common-10-dev # to get the headers right
- clang-tidy-10
script:
- cd $TRAVIS_BUILD_DIR
- ./scripts/cppcheck.sh
- ./scripts/tidy.sh
- env:
- STATIC_ANALYSIS=false
- RUN_CHECKS=false
- CLANG_FORMAT=clang-format-10
addons:
apt:
sources: *basic_sources
packages:
- clang-format-10
install: # do not compile the dependencies
before_script: # do not run cmake
script:
- cd $TRAVIS_BUILD_DIR
- ./scripts/check_format.sh
# - env:
# - STATIC_ANALYSIS=false
# - RUN_CHECKS=false
# - COMPILER=gcc
# - ENABLE_COVERAGE=Off
# compiler: gcc
# addons:
# apt:
# sources: *basic_sources
# packages:
# - *basic_deps
# coverity_scan:
# project:
# name: "OpenSSE/crypto-tk"
# description: "Cryptographic toolkit for searchable encryption."
# notification_email: [email protected]
# build_command: "make -j2"
# branch_pattern: coverity_scan
script:
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ] && [ "${TRAVIS_BRANCH}" != "coverity_scan" ]; then VERBOSE=1 cmake --build .; fi
- if [ "${RUN_CHECKS}" == "true" ] && [ "${TRAVIS_BRANCH}" != "coverity_scan" ]; then ./tests/check; fi