-
Notifications
You must be signed in to change notification settings - Fork 40
/
.travis.yml
41 lines (41 loc) · 2.12 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
language: cpp
sudo: required
dist: trusty
env:
matrix:
- DISTRO=ubuntu-16.04 CONFIG=Debug
- DISTRO=ubuntu-16.04 CONFIG=Release
- DISTRO=ubuntu-18.04 CONFIG=Debug
- DISTRO=ubuntu-18.04 CONFIG=Release
- DISTRO=ubuntu-20.04 CONFIG=Debug
- DISTRO=ubuntu-20.04 CONFIG=Release
- DISTRO=debian-10 CONFIG=Debug
- DISTRO=debian-10 CONFIG=Release
- DISTRO=opensuse-15 CONFIG=Debug
services:
- docker
before_install:
- docker build config/docker/${DISTRO} -t dev/zookeeper-cpp/${DISTRO}
script:
- echo ${COVERALLS_REPO_TOKEN} > ${TRAVIS_BUILD_DIR}/coveralls-repo-token
- if [[ ${CONFIG} == "Debug" ]]; then ./config/dev-env ${DISTRO} -- ./config/run-tests; fi
- if [[ ${CONFIG} == "Release" ]]; then ./config/make-package --dockerize ${DISTRO}; fi
after_success:
- if [[ ${DISTRO} != "ubuntu-20.04" ]]; then echo "Skipping documentation publishing due to non-main build environment"; exit 0; fi
- if [[ ${CONFIG} != "Debug" ]]; then echo "Skipp documentation publishing due to non-debug build"; exit 0; fi
- GIT_CURRENT_HASH=$(git rev-parse HEAD)
- GIT_MASTER_HASH=$(git rev-parse master)
- GIT_REMOTE_NAME=$(git remote)
- GIT_REMOTE_FETCH_PATH=$(git remote --verbose | grep -P '^'${GIT_REMOTE_NAME}'.*\(fetch\)$'
| awk '{print $2}')
- GIT_EXPECTED_PATH=https://github.com/tgockel/zookeeper-cpp.git
- echo "GIT_CURRENT_HASH=${GIT_CURRENT_HASH} GIT_REMOTE_NAME=${GIT_REMOTE_NAME} GIT_REMOTE_FETCH_PATH=${GIT_REMOTE_FETCH_PATH}"
- if [[ ${GIT_CURRENT_HASH} != ${GIT_MASTER_HASH} ]]; then echo "Skipping documentation publishing due to non-master ${GIT_CURRENT_HASH} (master=${GIT_MASTER_HASH})"; exit 0; fi
- if [[ ${GIT_REMOTE_FETCH_PATH} != ${GIT_EXPECTED_PATH} ]]; then echo "Skipping documentation publishing due to non-mainline remote ${GIT_REMOTE_FETCH_PATH}"; exit 0; fi
- sudo add-apt-repository --yes ppa:libreoffice/ppa
- sudo apt-get update
- sudo apt-get install --yes doxygen graphviz texlive-full
- openssl aes-256-cbc -K $encrypted_513b1ad04072_key -iv $encrypted_513b1ad04072_iv -in config/travisci_rsa.enc -out config/travisci_rsa -d
- chmod 0600 config/travisci_rsa
- cp config/travisci_rsa ~/.ssh/id_rsa
- "./config/publish-doxygen"