forked from bareos/bareos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
77 lines (68 loc) · 3.34 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
language: cpp
compiler:
- gcc
- clang
# This project also uses Coverity Scan https://scan.coverity.com/
# However, the Travis coverity scan addon (as of 19.02.2014) does not fit our needs,
# because then all builds are done as covertiy scans and results send to the server.
# Therefore we reused the old method
# (setting environment variables, download and execute a script).
env:
global:
# -- BEGIN Coverity Scan ENV
# The build command with all of the arguments that you would apply to a manual `cov-build`
# Usually this is the same as STANDARD_BUILD_COMMAND, exluding the automated test arguments
- COVERITY_SCAN_BUILD_COMMAND="make"
# Name of the project
- COVERITY_SCAN_PROJECT_NAME="bareos/bareos"
# Email address for notifications related to this build
- COVERITY_SCAN_NOTIFICATION_EMAIL="coverity@bareos.org"
# Regular expression selects on which branches to run analysis
# Be aware of quotas. Do not run on every branch/commit
- COVERITY_SCAN_BRANCH_PATTERN="master"
# COVERITY_SCAN_TOKEN via "travis encrypt" using the repo's public key
- secure: "EMFCxVpjP2SBZIGqRxwdxcxxdg373w+sXIm109N7ZGMouOFVCeHq4PMBV9m6EyQ6wyb02oa6Re0GfZM9Yvc1vLc+fWpIV7y8kmVLXZhyAhGhLnCKXfirahgJkEIJTqddU/aWroub4oPPkqqNcxNAWYgrwi8jpcBkO50FGxxI9rg="
- COVERITY_SCAN_BUILD_URL="https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh"
- COVERITY_SCAN_BUILD="curl -s $COVERITY_SCAN_BUILD_URL | bash"
# -- END Coverity Scan ENV
matrix:
- DB=postgresql
- DB=mysql
- DB=sqlite3
- DB=postgresql COVERITY_SCAN=1
matrix:
# covertiy scan should only run once and it might fail,
# because the number of times its runs is limited per week.
# We only check when compiled with gcc.
exclude:
- compiler: clang
env: DB=postgresql COVERITY_SCAN=1
allow_failures:
- env: DB=postgresql COVERITY_SCAN=1
before_install:
# install build dependencies
# use files instead of shell variables, because travis has some problems supporting variables
- sudo apt-get -qq update
- dpkg-checkbuilddeps 2> /tmp/dpkg-builddeps || true
- sed "s/.*:.*:\s//" /tmp/dpkg-builddeps > /tmp/build_depends
- yes "" | sudo xargs --arg-file /tmp/build_depends apt-get -q --assume-no install
before_script:
# changelog file is required (and normally generated by OBS)
- cp -a platforms/packaging/bareos.changes debian/changelog
# build Debian packages
- if [ -z "${COVERITY_SCAN}" ]; then fakeroot debian/rules binary; else debian/rules override_dh_auto_configure; eval "$COVERITY_SCAN_BUILD"; fi
# create Debian package repository
- cd ..
- if [ -z "${COVERITY_SCAN}" ]; then dpkg-scanpackages . /dev/null | gzip > Packages.gz; fi
- if [ -z "${COVERITY_SCAN}" ]; then printf 'deb file:%s /\n' $PWD > /tmp/bareos.list; fi
- if [ -z "${COVERITY_SCAN}" ]; then sudo cp /tmp/bareos.list /etc/apt/sources.list.d/bareos.list; fi
- cd -
# install Bareos packages
- if [ -z "${COVERITY_SCAN}" ]; then sudo apt-get -qq update; fi
- if [ -z "${COVERITY_SCAN}" ]; then sudo apt-get install -y --force-yes bareos bareos-database-$DB; fi
script:
# run test script
- if [ -z "${COVERITY_SCAN}" ]; then sudo -E $PWD/test/all; fi
addons:
hosts:
- bareos.example.com