-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
147 lines (137 loc) · 4.62 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
136
137
138
139
140
141
142
143
144
145
146
147
language: c++
cache:
ccache: true
addons:
apt:
update: true
packages:
- clang
- clang-format
- llvm
- llvm-dev
- lcov
- ruby
- gcc-12
- g++-12
- golang-go
env:
global:
- CMAKE_C_COMPILER_LAUNCHER=ccache
- CMAKE_CXX_COMPILER_LAUNCHER=ccache
jobs:
include:
- name: "Static Analysis"
os: linux
dist: jammy
env:
- CC=clang
- CXX=clang++
before_script:
- cmake -DCMAKE_BUILD_TYPE=Debug -DSTATIC_ANALYSIS=ON .
script:
- cmake --build . --config Debug --parallel 3
- name: "Sanitizer"
os: linux
dist: jammy
env:
- CC=clang
- CXX=clang++
before_script:
- sudo sysctl vm.mmap_rnd_bits=28 # https://stackoverflow.com/questions/77850769/fatal-threadsanitizer-unexpected-memory-mapping-when-running-on-linux-kernels
- mkdir build-address
- pushd build-address
- cmake -DCMAKE_BUILD_TYPE=Debug -DSANITIZER=Address ..
- cmake --build . --config Debug --parallel 3
- popd
- mkdir build-stack
- pushd build-stack
- cmake -DCMAKE_BUILD_TYPE=Debug -DSANITIZER=Stack ..
- cmake --build . --config Debug --parallel 3
- popd
- mkdir build-thread
- pushd build-thread
- cmake -DCMAKE_BUILD_TYPE=Debug -DSANITIZER=Thread ..
- cmake --build . --config Debug --parallel 3
- popd
script:
- pushd build-address/tests
- ctest -j1 --output-on-failure
- popd
- pushd build-stack/tests
- ctest -j1 --output-on-failure
- popd
- pushd build-thread/tests
- ctest -j1 --output-on-failure
- name: "Coverage"
os: linux
dist: jammy
env:
- CC=clang
- CXX=clang++
install:
- sudo gem install coveralls-lcov
before_script:
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON ..
script:
- cmake --build . --config Debug --parallel 3 --target coverage
after_success:
- coveralls-lcov --repo-token $COVERALLS_REPO_TOKEN --service-name travis-pro --service-job-id $TRAVIS_JOB_ID ./coverage.info
- name: "GCC Unit Tests"
os: linux
dist: jammy
env:
- CC=gcc-12
- CXX=g++-12
before_script:
- cmake -DCMAKE_BUILD_TYPE=Release .
- cmake --build . --config Release --parallel 3
script:
- cd tests
- ctest -j3 --output-on-failure
- name: "Clang Unit Tests and Formatting"
os: linux
dist: jammy
env:
- CC=clang
- CXX=clang++
before_script:
- cmake -DCMAKE_BUILD_TYPE=Release .
- cmake --build . --config Release --parallel 3
script:
- cmake --build . --config Release --parallel 3 --target format.check
- cd tests
- ctest -j3 --output-on-failure
- name: "Docker and Integration Tests"
os: linux
dist: jammy
services:
- docker
env:
- TAG=`if [ $TRAVIS_BRANCH == "master" ]; then echo -n latest; else echo -n $TRAVIS_BRANCH; fi`
- CHAIN_TAG=$TAG
install:
- git clone https://github.com/koinos/koinos-integration-tests.git
- pushd koinos-integration-tests
- go get ./...
- popd
before_script:
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
- cp -R ~/.ccache ./ccache
- docker build . -t build --target builder
- docker build . -t $TRAVIS_REPO_SLUG:$TAG
- docker run -td --name extract-ccache build
- docker cp extract-ccache:/build/.ccache ~/.ccache
script:
- pushd koinos-integration-tests
- ./run.sh
after_success:
- |
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
docker push $TRAVIS_REPO_SLUG:$TAG
fi
notifications:
slack:
secure: jA1UWnXRjaqTxqPDNhQhZXAk7mC7xLAuI6NLSFPh+ybYv+goM1wefZp6IkdX5u1EHB0UCF4jbmczQxjVEhvBCBx8sy9DmxFICfjDtbsEnHksRsROpKPePF4DTwZMsjKn5+oPF7fBHr0ShzpdcZ7rmbFWQnfXI6Bin6znDV6xd8XNV5jI26FAaL0eIQd/+bjKHpDCDRzu2MJY44+Awpf0tbdwfWqj9EZ9SHl1wMsyvp1BSOlOtErEiv0EUWjmM1VTE2nPYzn2N7YoRv6nwtTpqJ+Y1xgm0mJ0DtV39xyo4+AhyxJAoJqkjkrP5AIepUyz+1o+m/4j/98FjfTi3JugMOzWAJqiAyWLVJG74W7Zs3h+M+W+eRSDhMfybgwEWz2+IFrP0Re9C7XI+KGLLAZ734lzESNKs6grisIRnk226YawffeDMJ/zT1uyWs3VIw9TuXI/0SnSnE+Gno0Xbho37jTT1lqRHsrMRzbC44rF+dBqMJE+m70naHj9MrR+0fHNGct19X73nDadIJeJNlMdV5OgddxLvCZL7RsD8c1MDQDWrASfConS6P/TPVsYeLxia3uSl8NoXwSRX7+j91bQnI0YFzpgKyJdYE2WtNJULgqOTftKr+7orzMqMqjBNdlRhsB7Yh6pepKWbLX1N1N3UoDhtia9JoWz04vQcq2l42w=
on_success: never