forked from bareos/bareos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
66 lines (57 loc) · 4.28 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
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 CONFIGURE_DB="--with-postgresql"
- DB=mysql CONFIGURE_DB="--with-mysql"
- DB=sqlite CONFIGURE_DB="--with-sqlite3"
- DB=postgresql CONFIGURE_DB="--with-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 CONFIGURE_DB="--with-postgresql" COVERITY_SCAN=1
allow_failures:
- env: DB=postgresql CONFIGURE_DB="--with-postgresql" COVERITY_SCAN=1
before_install:
- sudo apt-get -qq update
- yes "" | sudo apt-get -q --assume-no install acl-dev autotools-dev bc debhelper dpkg-dev hostname libacl1-dev libcap-dev liblzo2-dev libqt4-dev libreadline-dev libssl-dev libwrap0-dev libx11-dev libsqlite3-dev libmysqlclient-dev libpq-dev lsb-release mtx ncurses-dev pkg-config po-debconf python-dev zlib1g-dev
before_script:
- ./configure --prefix=/usr --with-sbin-perm=755 --sysconfdir=/etc/bareos --docdir=/usr/share/doc/bareos --htmldir=/usr/share/doc/bareos/html --with-archivedir=/var/lib/bareos/storage --with-scriptdir=/usr/lib/bareos/scripts --with-plugindir=/usr/lib/bareos/plugins --with-working-dir=/var/lib/bareos --with-pid-dir=/var/lib/bareos --with-bsrdir=/var/lib/bareos --with-logdir=/var/log/bareos --with-subsys-dir=/var/lock --enable-smartalloc --disable-conio --enable-readline --enable-batch-insert --enable-dynamic-cats-backends --enable-acl --enable-bat --enable-traymonitor --enable-xattr --enable-scsi-crypto --enable-ipv6 --with-tcp-wrappers --with-openssl --with-dir-user=bareos --with-dir-group=bareos --with-sd-user=bareos --with-sd-group=bareos --with-fd-user=root --with-fd-group=bareos --with-dir-password="XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX" --with-fd-password="XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX" --with-sd-password="XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX" --with-mon-dir-password="XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX" --with-mon-fd-password="XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX" --with-mon-sd-password="XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX" --with-basename="XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX" --with-hostname="XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX" ${CONFIGURE_DB}
# --enable-ndmp
- if [ "${COVERITY_SCAN}" = '1' ]; then eval "$COVERITY_SCAN_BUILD"; else make; fi
- for script in $PWD/debian/bareos*.preinst; do echo "$script"; sudo /bin/sh $script install; done
- sudo make install
- for script in $PWD/debian/bareos*.postinst; do echo "$script"; sudo /bin/sh $script configure; done
# test script
script:
- if [ "${COVERITY_SCAN}" != '1' ]; then sudo -E $PWD/test/all; fi
addons:
hosts:
- bareos.example.com