This repository has been archived by the owner on Jan 26, 2021. It is now read-only.
forked from zcnet4/warpcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
97 lines (88 loc) · 3.9 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
dist: trusty
sudo: false
language: cpp
os:
- linux
compiler:
- clang
- gcc
branches:
except:
- gh-pages
env:
matrix:
- BUILD_TYPE=Debug
- BUILD_TYPE=Release
# - BUILD_TYPE=RelWithDebInfo
# - BUILD_TYPE=MinSizeRel
global:
- PROJECT=warpcore
- secure: "IHICwP4oMbC6yzx9G4YIthU6ujpt0bJ4jOElN7ujs8xGODB7YQFlxIaBwLvCf8APjczUuarN1r0Vc/Ekyp8LVBVdI6oEK0ZyHkvXOsydtYAtKrK60iEZXLoMzqTR/DeZaLkQb/hh4tYLAfrzNs9ZZA6vU1rJUJdaNmxluM9kcF253tfxKZ7rZ8dveD+gwmfJYH47sNwvFiGVTmU6c9fDVVfE/R3c0aX3A4pI3oOAUMH6Vs/76ZdRh2knzLLDgcNiIDapJd1xlw8HFSyEbsfEgTLPl+9qeXyh8fU6kwU7tGKetdr60klrXChIdwqStOxNwp4ylto727oYtztj7zJxYWQxbXQwehH66Xj44KEfW9MEuBEbGCmlR/74vCTNnKVU6D857ZU7r0L43GTD9KfAqqHWKtdQJpoRZMkhRcFrZkHCG8GJJo+3swwXFWnPbqPDuGWnLaeg4dsFpcAhq4ujSFheJbJ+ilERGio8ksv+FndlImSsQVEHtErPyJlizE3y2QfdWfASpn5HYVJ5la0Vy5Tea0rPRymdtLQm3lCMX+qcAg9EQLFHsc52LsFUwnHrNu5WqzfCmN0b7kfT4SlEHVXOXtC6k5PYxAUBaHfyeVFspc4UN5ZTUmSj9Y2h47Oa5KV/DJRaNKalve3TYgysEvlnTqv6qJfqnbHO2Swl+GE="
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "WvYmhgy86txaO8D+yAVC2gYBtQZ2W8uWNhjarZlF5SpKnIsjsBx0UcmbmhmbaA3bMhbcbbnMoc7X8iTMrlieXPFr9VH+At2fDUns8LUUNW/Cd5EGhWbI/rD6itH/9Sjc0yrA182VD1GgaKxVaYOHNNMIHA/plaONByA1WMMKZuSfttu3XqoV/wt9B7/Fl2avFo1exyYl8Gj5QG6PyiVEXdCd0jLzAgOb1pg/oxcVrHowaExO6texwqMuBpTekomgo/gMt+8r0uLuxXRWdLOZSoQyHeKecgmmiMP8uTXxqw6IUBi4sKcdcaFULtpgSLDPYUzgygE6jL7gcnDUIDLehds6stU/8tH3b6UYjgWPLewkYqH6eKavHRz6rSewQl2UolIssttXVeVTvXZrW4d2srOysKmJCjyKd/4qBFEQSVLDmjJelTzH/Ze3frzX3iS7N6KfopY+AKfoSjS176FwxbFhCugkgnQ+bB5/IObkHSfJ/W1qGpgyYnt2Mf+Gh0wP4YKa60VjC+6/UoRc/Q8Zd0uSmmmsTxQme3C4VcKun6hk9YLPvpvhCpVo4SAuXJ597bPv5FlPYkW+2FkDCYlnw8NTfe+tHzg6ZMjHi6PKM6LM0wK/z964tmvvUF8oSvJnp3K4Vf95PlKXHDrC0w++qcNs+MNgyf31MVm+U+c3BRg="
addons:
apt:
packages:
- doxygen
- graphviz
- ninja-build
coverity_scan:
project:
name: "NTAP/$PROJECT"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: |
cd $TRAVIS_BUILD_DIR
rm -rf build
mkdir build
cd build
../bin/cmake -GNinja -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX:PATH=/tmp ..
build_command: ninja
branch_pattern: coverity
before_install:
# manually install latest cmake
- |
wget -q https://cmake.org/files/v3.9/cmake-3.9.4-Linux-x86_64.sh
sh cmake-3.9.4-Linux-x86_64.sh --skip-license
ls -lta
# download netmap headers, to build the relevant backend
- |
cd $TRAVIS_BUILD_DIR
mkdir -p lib/include/net
cd lib/include/net
wget -q \
https://raw.githubusercontent.com/luigirizzo/netmap/master/sys/net/netmap.h \
https://raw.githubusercontent.com/luigirizzo/netmap/master/sys/net/netmap_user.h
script:
- |
if [ "${COVERITY_SCAN_BRANCH}" = 1 ]; then exit 0 ; fi
cd $TRAVIS_BUILD_DIR
rm -rf build
mkdir build
cd build
../bin/cmake -GNinja -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX:PATH=/tmp ..
ninja
after_success:
# update the documentation
- |
cd $TRAVIS_BUILD_DIR/build
git clone -b gh-pages https://[email protected]/NTAP/$PROJECT.git gh-pages
cd gh-pages
git config --global push.default simple
git config user.name "Travis CI"
git config user.email "[email protected]"
rm -rf ./*
touch .nojekyll
doxygen $TRAVIS_BUILD_DIR/build/doc/Doxyfile 2>&1 | tee doxygen.log
if [ -d "html" ] && [ -f "html/index.html" ]; then
mv html/* .
git add --all
git commit -m "Update doxygen documentation on branch gh-pages." \
-m "Travis CI build ${TRAVIS_BUILD_NUMBER}." \
-m "Commit: ${TRAVIS_COMMIT}."
git push --force \
https://${GH_REPO_TOKEN}@github.com/NTAP/$PROJECT.git > /dev/null 2>&1
fi