-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
147 lines (137 loc) · 4.65 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`
- MEMPOOL_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 --build-arg BUILD_THREADS=3
- 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: cTHSV2ZeQgQWJ/l9RWHshOsg6X9QQFw3W1HcuD1TmPxAreWJqd2uXY5OqOlXUWfHE1zVKjXf2BY3egZn6ugaXZHXq4DaMb9uCdI/PlsY/srCL955wHpUX/wqrZgFrBptaiBvGOfsVEjEpfR/qPOUDdSFp/W//xshNWj7qLvqD/bHacioLYlpUlMdAq6nYYq5ekggw0A90NSP+UBtgGZHk95UCw1VVEU69CoaZeBKSSbempp2aFm6v1YIGmzbF6DD7VDKjwIH5avvpIJ7HVfLiICmqEEgBN3Yugi1aLs+8Jv5GffbkgEtFcQPjBhkqHDYGyOOsg3NJD9DORA41lJHYTug+zt6ZO/ItmaCxitnavKp6/0rai7pWV5QocnaRfavMcsaNKFHM/dyu+pkuiNrvmsKphTJetyFR6f+tIzxMbXOgcm6OA1WzQ0GozvpVpLeUeReQXl4TncSrWlYUPY+jZsQp7QOHRBA4sqaOpjkMEjC3gzMbHU/Ec/n3Nau28bGZjMupw3XUHeWbxdLWZ/hO0II9TYPe5PzEkoQOhZ4smOPKMhIuGi5oar0kzDb/3EsFdRyZ6Zxnf2Ihx8HhZuTx2MjnMfVvLWUrrcnRa1shcxBHjd1KyfcLoDEzLGarQmoeaWH6Z1EShivMtQ/PyMD1QzM3o7Ct4YJaqa174qg3ig=
on_success: never