-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
116 lines (109 loc) · 3.2 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
matrix:
include:
- language: python
python:
- 3.6
before_install:
- cd py_src
install:
- pip install -r requirements.txt
script:
- coverage run test.py
after_success:
- codecov
- cd ..
- language: node_js
node_js:
- 10.15
before_install:
- cd js_src/
install:
- npm install
- npm install -g codecov
- npm install -g jest
script:
- npm run problem001
- npm run test
after_success:
- codecov
- cd ..
- language: c
before_install:
- ldd --version # check if glibc is installed
- gcc --version # check gcc version
before_script:
- cd c_src
script:
- make
- make test
after_success:
- bash <(curl -s https://codecov.io/bash)
- cd ..
- language: cpp
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-7
- g++-7
- lcov
before_script:
- cd cpp_src
- export CC=gcc-7
- export CXX=g++-7
- export GCOV=gcov-7
- sudo ln -sf /usr/bin/gcov-7 /usr/local/bin/gcov
script:
- cmake -DGCOV=ON .
- make
- make tests
- ./get_code_cov.sh
after_success:
# Upload to codecov.io
- bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"
- language: go
before_install:
- cd go_src/goeulerproject
install:
- go get github.com/DanielSchuette/goeulerproject
- make
script:
- go test . -v -cover -race -coverprofile=coverage.txt -covermode=atomic
- sh install.sh
after_success:
- bash <(curl -s https://codecov.io/bash)
- cd ../..
- language: rust
sudo: required
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- cmake
- gcc
- binutils-dev
- libiberty-dev
before_script:
- cd rust_src
after_success:
- wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz
- tar xzf master.tar.gz
- cd kcov-master
- mkdir build
- cd build
- cmake ..
- make
- make install DESTDIR=../../kcov-build
- cd ../..
- rm -rf kcov-master
- options="1,2,3:22,24,67"
- for file in target/debug/rust_src*; do [ -x "${file}" ] || continue; mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-line=#no_code --exclude-pattern=/.cargo,/usr,/lib64 --verify "target/cov/$(basename $file)" "$file" $options; done
- for file in target/debug/rust_src*; do [ -x "${file}" ] || continue; mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-line=#no_code --exclude-pattern=/.cargo,/usr,/lib64 --verify "target/cov/$(basename $file)" "$file"; done
- bash <(curl -s https://codecov.io/bash)
- echo "Uploaded code coverage"
notifications:
email: false