forked from frankmorgner/vsmartcard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
81 lines (74 loc) · 3.2 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
77
78
79
80
81
language: C
matrix:
include:
#- compiler: clang
- compiler: gcc
#- compiler: gcc
# env: HOST=i686-w64-mingw32
env:
global:
- PKG_CONFIG_PATH=/tmp/install/lib/pkgconfig
- PREFIX=/tmp/install
- PYTHONPATH=$PYTHONPATH:$PREFIX/lib/python2.7/site-packages/
# 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="
before_install:
- sudo apt-get update
install:
- sudo apt-get install help2man gengetopt libpcsclite-dev libusb-dev swig python-dev
- if [ ! -z "$HOST" ]; then
sudo apt-get install mingw-w64 binutils-mingw-w64-i686 gcc-mingw-w64-i686;
fi
before_script:
# libnpa requires OpenPACE and OpenSC
- if [ ! -z "$HOST" ]; then
unset CC;
unset CXX;
unset RANLIB;
unset AR;
unset AS;
unset LD;
unset DLLTOOL;
unset NM;
unset OBJDUMP;
unset PKG_CONFIG;
unset RC;
unset STRIP;
fi
- git clone https://github.com/frankmorgner/openpace && cd openpace && autoreconf -vsi && ./configure --enable-openssl-install --enable-python --prefix=$PREFIX && make install
- cd $TRAVIS_BUILD_DIR/npa/src/opensc && autoreconf -vsi && ./configure --host=$HOST --prefix=$PREFIX --enable-sm && make install
# Configure libnpa
- cd $TRAVIS_BUILD_DIR/npa && autoreconf -vsi && ./configure --host=$HOST OPENSC_LIBS="-L$PREFIX/lib -lopensc -lcrypto"
# Configure virtualsmartcard
- cd $TRAVIS_BUILD_DIR/virtualsmartcard && autoreconf -vsi && ./configure --host=$HOST
# pcsc-relay requires libnfc
- git clone https://code.google.com/p/libnfc && cd libnfc && autoreconf -i && ./configure --host=$HOST --prefix=$PREFIX && make install
# Configure pcsc-relay
- cd $TRAVIS_BUILD_DIR/pcsc-relay && autoreconf -vsi && ./configure --host=$HOST
- if [ -z "$HOST" ]; then
cd $TRAVIS_BUILD_DIR/ccid && autoreconf -vsi && ./configure OPENSSL_CFLAGS="-I$PREFIX/include" OPENSSL_LIBS="-L$PREFIX/lib -lcrypto" OPENSC_LIBS="-L$PREFIX/lib -lopensc";
fi
addons:
coverity_scan:
project:
name: "frankmorgner/vsmartcard"
description: "Umbrella project for various projects concerned with the emulation of different types of smart card readers or smart cards themselves"
notification_email: [email protected]
build_command: make -C $TRAVIS_BUILD_DIR/npa -C $TRAVIS_BUILD_DIR/virtualsmartcard -C $TRAVIS_BUILD_DIR/ccid -C $TRAVIS_BUILD_DIR/pcsc-relay
branch_pattern: coverity_scan
script:
# Build libnpa
- make -C $TRAVIS_BUILD_DIR/npa
# Build virtualsmartcard
- make -C $TRAVIS_BUILD_DIR/virtualsmartcard
# Verify virtualsmartcard
- if [ -z "$HOST" ]; 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
# Build pcsc-relay
- make -C $TRAVIS_BUILD_DIR/pcsc-relay
# Build ccid
- if [ -z "$HOST" ]; then
make -C $TRAVIS_BUILD_DIR/ccid;
fi