File: .travis.yml

package info (click to toggle)
libdigidoc 3.10.4+ds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,436 kB
  • sloc: ansic: 29,037; makefile: 15
file content (68 lines) | stat: -rw-r--r-- 2,257 bytes parent folder | download
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
language: c++
matrix:
  include:
  - os: linux
    env: TARGET=ubuntu:16.04
    sudo: false
  - os: linux
    env: TARGET=ubuntu:18.04
    sudo: false
  - os: linux
    env: TARGET=i386/ubuntu:16.04
    sudo: false
  - os: osx
    env: TARGET=osx
sudo: required
dist: trusty
osx_image: xcode9.2
services:
- docker
cache: ccache
env:
  global:
  - BUILD_NUMBER=${TRAVIS_BUILD_NUMBER}
before_install: if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
    brew update;
    brew install openssl;
  fi
script: case ${TARGET} in
  *osx*)
    mkdir build && cd build && cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl ..;
    make all pkgbuild;
    cd ..;
    ;;
  *)
    docker run -e BUILD_NUMBER=${BUILD_NUMBER} -e COVERITY_SCAN_TOKEN=${COVERITY_SCAN_TOKEN} -e TRAVIS_BRANCH=${TRAVIS_BRANCH} -e TARGET=${TARGET} -v $(pwd):$(pwd) -t "${TARGET}" /bin/bash -c "cd $(pwd);"'
      apt-get update -qq;
      apt-get install -y dh-make devscripts dpkg-dev cdbs cmake libxml2-dev libssl-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 libdigidoc_${VERSION};
      dch --distribution $(lsb_release -cs) -v ${VERSION} "Release ${VERSION}.";
      dpkg-buildpackage -rfakeroot -us -uc;
      if [ "${TARGET}" = "ubuntu:16.04" ]; then
        export COVERITY_SCAN_PROJECT_NAME="open-eid/libdigidoc";
        export COVERITY_SCAN_NOTIFICATION_EMAIL="raul@metsma.ee";
        export COVERITY_SCAN_BRANCH_PATTERN=coverity_scan;
        export COVERITY_SCAN_BUILD_COMMAND_PREPEND="mkdir coverity && cd coverity && cmake ..";
        export COVERITY_SCAN_BUILD_COMMAND=make;
        wget -O - https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh | bash;
      fi;
      git clean -dxf';
    ;;
  esac

before_deploy:
- export VERSION=${TRAVIS_TAG:1}
- cd ..
- mv libdigidoc libdigidoc-${VERSION}
- tar czf libdigidoc-${VERSION}.tar.gz --exclude-vcs libdigidoc-${VERSION}
deploy:
  provider: releases
  api_key: ${GITHUB_ACCESS_TOKEN}
  file: libdigidoc-${VERSION}.tar.gz
  skip_cleanup: true
  on:
    tags: true
    condition: "$TRAVIS_OS_NAME = linux"