-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (68 loc) · 2.31 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
language: cpp
addons:
apt:
packages:
- g++-9
- cmake
- cmake-data
jobs:
include:
# Unit Tests
- stage: "Test"
name: "Unit Tests"
os: linux
dist: focal
script:
- mkdir ${TRAVIS_BUILD_DIR}/build && cd ${TRAVIS_BUILD_DIR}/build
- cmake -DCMAKE_BUILD_TYPE=Release -G "CodeBlocks - Unix Makefiles" ..
- make
- make test
# Coverage Tests
- stage: "Coverage"
name: "Coverage Test"
os: linux
dist: focal
script:
- mkdir ${TRAVIS_BUILD_DIR}/build && cd ${TRAVIS_BUILD_DIR}/build
- cmake -DCMAKE_BUILD_TYPE=Release -G "CodeBlocks - Unix Makefiles" -DCMAKE_CXX_FLAGS=--coverage ..
- make
- make test
- ./mst ../data/rmat0406.gr ../data/rmat0406.extra /dev/null
- ./mst ../data/rmat0406.gr not-exists /dev/null 2>&1 | grep "Cannot open file" || false
- touch restricted-file && chmod 400 restricted-file
- ./mst ../data/rmat0406.gr ../data/rmat0406.extra restricted-file 2>&1 | grep "Cannot open file" || false
- ./mst 2>&1 | grep Usage || false
- ./test/test_mst-PRIM 2>&1 | grep Usage || false
- ./test/test_mst-PRIM ../data/rmat0406.gr not-exists ../test/results/rmat0406.out 2>&1 | grep "Cannot open file" || false
- ./test/test_mst-PRIM ../data/rmat0406.gr ../data/rmat0406.extra not-exists 2>&1 | grep "Cannot open file" || false
- ./test/test_mst-PRIM not-exist ../data/rmat0406.extra ../test/results/rmat0406.out 2>&1 | grep "Cannot open file" || false
after_success:
- bash <(curl -s https://codecov.io/bash)
# Deploy
- stage: "Deploy"
name: "Generate Docs"
branches:
only:
- master
os: linux
dist: focal
language: python
python: "3.8"
addons:
apt:
packages:
- doxygen
- graphviz
install:
- pip3 install -r docs/requirements.txt
script:
- mkdir ${TRAVIS_BUILD_DIR}/build && cd ${TRAVIS_BUILD_DIR}/build
- cmake -DCMAKE_BUILD_TYPE=Release -G "CodeBlocks - Unix Makefiles" ..
- make docs
- cd ${TRAVIS_BUILD_DIR}
deploy:
edge: true
provider: pages:git
local_dir: ./build/docs/sphinx
token: $GITHUB_TOKEN
verbose: true