-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
80 lines (77 loc) · 2.63 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
language: cpp
dist: xenial
sudo: true
compiler:
- clang
- gcc
before_install:
- sudo add-apt-repository http://packages.cor-lab.de/ubuntu/
- wget -q http://packages.cor-lab.de/keys/cor-lab.asc -O- | sudo apt-key add -
- sudo apt-get update -q
- sudo apt-get install spread cmake g++ git libboost-date-time-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-signals-dev libboost-system-dev libboost-thread-dev libprotobuf-dev protobuf-compiler lcov gcovr make unzip wget
before_script:
- mkdir upstream
- cd upstream
- wget "https://dl.bintray.com/open-rsx/travis-artifacts/rsc-${CC}-master.tar.gz"
- "tar -xzf rsc-*.tar.gz"
- wget "https://dl.bintray.com/open-rsx/travis-artifacts/rsb-cpp-${CC}-master.tar.gz"
- "tar -xzf rsb-cpp-*.tar.gz"
- cd ..
script:
- mkdir -p build && cd build
- export CXXFLAGS="-Werror"
- cmake -DCMAKE_INSTALL_PREFIX=/rsb-spread-cpp -DCMAKE_PREFIX_PATH="$(pwd)/../upstream/rsc;$(pwd)/../upstream/rsb-cpp" -DCMAKE_BUILD_TYPE=coverage ..
- make -j3
- make test
after_success:
- bash <(curl -s https://codecov.io/bash)
jobs:
include:
- &deploy-stage
compiler: clang
stage: archive
script:
- mkdir -p build && cd build
- cmake -DCMAKE_INSTALL_PREFIX=/rsb-spread-cpp -DCMAKE_PREFIX_PATH="$(pwd)/../upstream/rsc;$(pwd)/../upstream/rsb-cpp" ..
- make -j3
- make DESTDIR=install_dir install
- tar -C install_dir -czf "rsb-spread-cpp-${CC}.tar.gz" rsb-spread-cpp
- |
cat << EOF > bintray.json
{
"package": {
"name": "rsb-spread-cpp",
"repo": "travis-artifacts",
"subject": "open-rsx",
"desc": "Travis artifact for branch ${TRAVIS_BRANCH}",
"vcs_url": "https://github.com/open-rsx/rsb-spread-cpp.git",
"licenses": ["LGPL-3.0"]
},
"version": {
"name": "travis-${TRAVIS_BRANCH}",
"vcs_tag": "${TRAVIS_BRANCH}"
},
"files": [
{
"includePattern": "\./(rsb-spread-cpp-.*).tar.gz",
"uploadPattern": "\$1-${TRAVIS_BRANCH}.tar.gz",
"matrixParams": {
"override": 1
}
}
],
"publish": true
}
EOF
after_success:
deploy:
provider: bintray
file: "bintray.json"
user: "languitar"
key: '${BINTRAY_KEY}'
skip_cleanup: true
on:
repo: open-rsx/rsb-spread-cpp
all_branches: true
- <<: *deploy-stage
compiler: gcc