This repository has been archived by the owner on Oct 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.travis.yml
62 lines (60 loc) · 2.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
language: c++
sudo: false
dist: trusty
osx_image: xcode9.3
services:
- docker
matrix:
include:
- os: osx
env: IMAGE=OSX
sudo: true
- os: linux
env: IMAGE=ubuntu:16.04
- os: linux
env: IMAGE=ubuntu:18.04
- os: linux
env: IMAGE=i386/ubuntu:16.04
env:
global:
- BUILD_NUMBER=${TRAVIS_BUILD_NUMBER}
before_install:
- git submodule update --init --recursive && if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew update && brew install --force qt5 openssl;
fi
script: if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
mkdir build && cd build && cmake -DQt5_DIR=/usr/local/opt/qt5/lib/cmake/Qt5 -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl ..;
make zipdebug macdeployqt zip && cd ..;
else
docker run -e BUILD_NUMBER=${BUILD_NUMBER} -e COVERITY_SCAN_TOKEN=${COVERITY_SCAN_TOKEN} -e TRAVIS_BRANCH=${TRAVIS_BRANCH} -e IMAGE=${IMAGE} -v ${HOME}:${HOME} -t "${IMAGE}" /bin/bash -c "cd $(pwd);"'
apt-get update -qq;
apt-get install -y apt-transport-https curl dh-make devscripts cdbs cmake libpcsclite-dev libssl-dev qttools5-dev-tools qttools5-dev git curl wget ruby;
export VERSION=$(grep project CMakeLists.txt | egrep -o "([0-9]{1,}\.)+[0-9]{1,}").${BUILD_NUMBER};
export DEBFULLNAME="Travis";
export DEBEMAIL="travis-ci@travis";
dh_make --createorig --addmissing --defaultless -y -p qesteidutil_${VERSION};
dch --distribution $(lsb_release -cs) -v ${VERSION} "Release ${VERSION}.";
dpkg-buildpackage -rfakeroot -us -uc;
if [ "${IMAGE}" = "ubuntu:16.04" ]; then
export COVERITY_SCAN_PROJECT_NAME="open-eid/qesteidutil";
export COVERITY_SCAN_NOTIFICATION_EMAIL="[email protected]";
export COVERITY_SCAN_BRANCH_PATTERN=coverity_scan;
export COVERITY_SCAN_BUILD_COMMAND_PREPEND="cmake .";
export COVERITY_SCAN_BUILD_COMMAND=make;
wget -O - https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh | bash;
fi;
git clean -d -x -f';
fi
before_deploy:
- export VERSION=${TRAVIS_TAG:1}
- cd ..
- mv qesteidutil qesteidutil-${VERSION}
- tar czf qesteidutil-${VERSION}.tar.gz --exclude-vcs qesteidutil-${VERSION}
deploy:
provider: releases
api_key: ${GITHUB_ACCESS_TOKEN}
file: qesteidutil-${VERSION}.tar.gz
skip_cleanup: true
on:
tags: true
condition: "$TRAVIS_OS_NAME = linux"