File: .travis.yml

package info (click to toggle)
vsmartcard 3.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 35,688 kB
  • sloc: javascript: 11,788; ansic: 6,644; python: 5,533; cpp: 3,319; java: 2,056; xml: 650; makefile: 531; sh: 439
file content (108 lines) | stat: -rw-r--r-- 3,891 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
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
language: C

matrix:
  include:
    - compiler: clang
    - compiler: gcc
    - compiler: i686-w64-mingw32-gcc
    - compiler: x86_64-w64-mingw32-gcc
    - env: DO_COVERITY_SCAN=yes

env:
  global:
    - PKG_CONFIG_PATH=/tmp/install/lib/pkgconfig
    - PREFIX=/tmp/install
    - PYTHONPATH=$PYTHONPATH:$PREFIX/lib/python2.7/site-packages/
    - ac_cv_func_malloc_0_nonnull=yes
    - ac_cv_func_realloc_0_nonnull=yes
    # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
    #   via the "travis encrypt" command using the project repo's public key
    - secure: "M+eNZPASDoFdWZUeSyu4whvPKaOwd0AlCmGWKc7SRbQPD8x8Ao8y3+kr++YonsWBnDUqQSNg3v4uWsJOo2Q57qMQ+FYcNlEjrYpXXSRdH4BnYnTH1WfNnTce7N5Bln9wxE+khe7cZJcxy+gvd+YiutQvHjT+bTzrs2MtHD0Odlw="
    - COVERITY_SCAN_BRANCH_PATTERN="(master|coverity.*)"
    - COVERITY_SCAN_NOTIFICATION_EMAIL="frankmorgner@gmail.com"
    - COVERITY_SCAN_BUILD_COMMAND="make -C $TRAVIS_BUILD_DIR/virtualsmartcard -C $TRAVIS_BUILD_DIR/ccid -C $TRAVIS_BUILD_DIR/pcsc-relay"
    - COVERITY_SCAN_PROJECT_NAME="$TRAVIS_REPO_SLUG"
    - SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)

sudo: false

addons:
  apt_packages:
    - libpcsclite-dev
    - libusb-dev
    - xutils-dev
    - gengetopt
    - help2man
    - swig
    - python-dev
    - binutils-mingw-w64
    - gcc-mingw-w64
    - python-crypto

install:
  - if [ "$CC" == i686-w64-mingw32-gcc -o "$CC" == x86_64-w64-mingw32-gcc ]; then
      export HOST=${CC%%-gcc};
    fi

before_script:
  # virtualsmartcard requires OpenPACE
  - if [ -z "$HOST" ]; then
      git clone https://github.com/frankmorgner/openpace;
      cd openpace && autoreconf -vis;
      ./configure --prefix=$PREFIX --enable-openssl-install --enable-python || cat config.log;
      make install;
    fi
  # ccid requires OpenSC
  - git clone https://github.com/frankmorgner/OpenSC
  - cd OpenSC && autoreconf -vsi
  - if [ -z "$HOST" ]; then
      ./configure --prefix=$PREFIX --with-completiondir=/tmp || cat config.log;
    else
      ./configure --prefix=$PREFIX --with-completiondir=/tmp --host=$HOST || cat config.log;
    fi
  - make install
  # Configure virtualsmartcard
  - cd $TRAVIS_BUILD_DIR/virtualsmartcard && autoreconf -vsi
  - if [ -z "$HOST" ]; then
      ./configure || cat config.log;
    else
      ./configure --host=$HOST --enable-libpcsclite || cat config.log;
    fi
  # pcsc-relay requires libnfc
  - if [ -z "$HOST" ]; then
      git clone https://github.com/nfc-tools/libnfc.git;
      cd libnfc && autoreconf -vsi;
      ./configure --prefix=$PREFIX || cat config.log;
      make install;
    fi
  # Configure pcsc-relay
  - cd $TRAVIS_BUILD_DIR/pcsc-relay && autoreconf -vsi
  - if [ -z "$HOST" ]; then
      ./configure || cat config.log;
    else
      ./configure --host=$HOST PCSC_CFLAGS="-I/usr/$HOST/include" PCSC_LIBS="-lwinscard" || cat config.log;
    fi
  # Configure ccid
  - if [ $TRAVIS_OS_NAME == linux -a -z "$HOST" ]; then
      cd $TRAVIS_BUILD_DIR/ccid && autoreconf -vsi;
      ./configure OPENSC_LIBS="-L$PREFIX/lib -lopensc" || cat config.log;
    fi
  # Optionally try to upload to Coverity Scan
  # On error (propably quota is exhausted), just continue
  - if [ -n "${DO_COVERITY_SCAN}" ]; then curl -s 'https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh' | bash || true; fi

script:
  - if [ -z "${DO_COVERITY_SCAN}" ]; then
      make -C $TRAVIS_BUILD_DIR/pcsc-relay;
      make -C $TRAVIS_BUILD_DIR/virtualsmartcard;
    fi
  - if [ -z "$HOST" -a -z "${DO_COVERITY_SCAN}" ]; then
      cd $TRAVIS_BUILD_DIR/virtualsmartcard/src/vpicc && export PYTHONPATH=$PYTHONPATH:`pwd` && export LD_LIBRARY_PATH=$PREFIX/lib/ && python -m unittest discover -s virtualsmartcard.tests -p *_test.py -v;
    fi
  - if [ $TRAVIS_OS_NAME == linux -a -z "$HOST" -a -z "${DO_COVERITY_SCAN}" ]; then
      make -C $TRAVIS_BUILD_DIR/ccid;
    fi

cache:
  apt: true
  ccache: true