This repository has been archived by the owner on Oct 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
112 lines (104 loc) · 3.23 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
notifications:
email:
on_success: never
on_failure: change
git:
depth: 15
linux: &linux
os: linux
dist: xenial
language: python
python: "3.7"
services:
- docker
osx: &osx
os: osx
sudo: false
language: generic
jobs:
fast_finish: true # don't wait for allow_failures to fail, gives faster response
allow_failures:
- os: osx
include:
- stage: "Building & Testing"
<<: *linux
env: COMPILER="clang" COMPILER_VERSION="5.0" BUILD_TYPE="Release" TARGET="compile" NIGHTLY="true"
- <<: *linux
env: COMPILER="gcc" COMPILER_VERSION="7" BUILD_TYPE="Release" TARGET="compile" NIGHTLY="true"
- stage: "Docs"
os: linux
sudo: false
dist: trusty
addons:
apt:
packages:
- doxygen
env: DOCKER="NODOCKER" TARGET="apidoc"
- stage: "Create GitHub Tag"
os: linux
sudo: false
dist: trusty
env: DOCKER="NODOCKER" TARGET="new_version_tagger"
branches:
only:
- master
before_install:
# Get our CI Docker image
- if [ -z "${DOCKER}" ]; then
docker_version=$(echo ${COMPILER_VERSION} | sed -e 's/\.//g');
DOCKER="conanio/"${COMPILER}${docker_version};
echo ${DOCKER};
fi;
if ! [[ "${DOCKER}" == 'NODOCKER' ]]; then
sudo docker pull ${DOCKER} ;
fi
script:
- set -e;
- if [ "${GLOBAL_NIGHTLY}" == "false" ]; then
NIGHTLY="false";
fi
- if [ "${GLOBAL_NIGHTLY}" == "conanforcerebuild" ]; then
TARGET="conanforcerebuild";
fi
- if [[ "${TRAVIS_REPO_SLUG}" == "inexorgame/inexor-core" ]]; then
if [[ ! "${TRAVIS_PULL_REQUEST}" == false ]]; then
echo >&2 -e "Skipping build, because this is a pull " \
"request with a branch in the main repo.\n" \
"This means, there should already be a CI job for " \
"this branch. No need to do things twice.";
exit 0;
fi;
fi;
if ! [[ "${DOCKER}" == "NODOCKER" ]]; then
sudo docker run -v $(pwd)':'/inexor --net=host -it ${DOCKER} /inexor/tool/travis.sh ${TARGET} ${COMPILER} ${COMPILER_VERSION} ${BUILD_TYPE} ${NIGHTLY};
fi;
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
bash tool/travis_macos.sh;
fi;
- if [ "${TARGET}" == "new_version_tagger" ]; then
if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
bash ./tool/travis.sh ${TARGET} ${COMPILER} ${COMPILER_VERSION} ${BUILD_TYPE} ${NIGHTLY};
else
echo >&2 -e "\n===============\n" \
"Skipping tag creation, because this is \n" \
"not a direct commit to master.\n" \
"===============\n";
exit 0;
fi
fi
- if [ "${TARGET}" == "apidoc" ]; then
chmod +x ./tool/documentation_create.sh && chmod +x ./tool/documentation_deploy.sh && source ./tool/documentation_deploy.sh;
fi
deploy:
skip_cleanup: true
provider: releases
api_key:
- secure: DgFzibKfjjD4v6zP51sjyP+chyBNKA6D3LHz4+pKN2mSBLSFeqK29z+38TlIOJHSpq6pWdvxqHjn+vQuYV1v/oqri0AVpo0kxFojtNaIFo1Dc/Sfv76V7X6p9+JaSRtKtqCjOV7QP9fftyUgSu1Bq67fwuv6QvDgOzdQIcV87bA=
file_glob: true
file: build/cpack/inexor-core-*.zip
overwrite: true
on:
# Deploy only if build was caused by a tag push.
tags: true
condition: "$COMPILER = clang"
repo: inexorgame/inexor-core