114 lines
3.7 KiB
YAML
114 lines
3.7 KiB
YAML
language: c
|
|
|
|
addons:
|
|
apt_packages:
|
|
- binutils-mingw-w64-i686
|
|
- binutils-mingw-w64-x86-64
|
|
- docbook-xsl
|
|
- gcc-mingw-w64-i686
|
|
- gcc-mingw-w64-x86-64
|
|
- libpcsclite-dev
|
|
- mingw-w64
|
|
- wine
|
|
- xsltproc
|
|
- gengetopt
|
|
- libcmocka-dev
|
|
|
|
env:
|
|
global:
|
|
# The next declaration are encrypted envirnmet variables, created via the
|
|
# "travis encrypt" command using the project repo's public key
|
|
# COVERITY_SCAN_TOKEN
|
|
- secure: "UkHn7wy4im8V1nebCWbAetnDSOLRUbOlF6++ovk/7Bnso1/lnhXHelyzgRxfD/oI68wm9nnRV+RQEZ9+72Ug1CyvHxyyxxkwal/tPeHH4B/L+aGdPi0id+5OZSKIm77VP3m5s102sJMJgH7DFd03+nUd0K26p0tk8ad4j1geV4c="
|
|
# GH_TOKEN
|
|
- secure: "cUAvpN/XUPMIN5cgWAbIOhghRoLXyw7SCydzGaJ1Ucqb9Ml2v5iuLLuN57YbZHTiWw03vy6rYVzzwMDrHX8r3oUALsv7ViJHG4PzIe7fAFZsZpHECmGsp6SEnue7m7BNy3FT8KYbiXxnxDO0SxmFXlrPAYR0WMZCWx2TENYcafs="
|
|
- COVERITY_SCAN_BRANCH_PATTERN="(master|coverity.*)"
|
|
- COVERITY_SCAN_NOTIFICATION_EMAIL="viktor.tarasov@gmail.com"
|
|
- COVERITY_SCAN_BUILD_COMMAND="make -j 4"
|
|
- COVERITY_SCAN_PROJECT_NAME="$TRAVIS_REPO_SLUG"
|
|
- SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
include:
|
|
- compiler: clang
|
|
os: osx
|
|
env: DO_PUSH_ARTIFACT=yes
|
|
- compiler: gcc
|
|
os: osx
|
|
- compiler: clang
|
|
os: linux
|
|
env: ENABLE_DOC=--enable-doc
|
|
- compiler: gcc
|
|
os: linux
|
|
env: ENABLE_DOC=--enable-doc
|
|
- os: linux
|
|
env:
|
|
- HOST=x86_64-w64-mingw32
|
|
- DO_PUSH_ARTIFACT=yes
|
|
- os: linux
|
|
env:
|
|
- HOST=i686-w64-mingw32
|
|
- DO_PUSH_ARTIFACT=yes
|
|
- os: linux
|
|
env: DO_COVERITY_SCAN=yes
|
|
|
|
before_install:
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
|
brew update;
|
|
brew uninstall libtool;
|
|
brew install libtool;
|
|
brew install gengetopt help2man cmocka;
|
|
fi
|
|
|
|
before_script:
|
|
- ./bootstrap
|
|
- if [ -z "$HOST" ]; then
|
|
CFLAGS="-Werror" ./configure $ENABLE_DOC --enable-dnie-ui;
|
|
else
|
|
if [ ! -f "$(winepath 'C:/Program Files (x86)/Inno Setup 5/ISCC.exe')" ]; then
|
|
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16;
|
|
export DISPLAY=:99.0;
|
|
wget http://files.jrsoftware.org/is/5/isetup-5.5.6.exe;
|
|
wine isetup-5.5.6.exe /SILENT /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART;
|
|
fi;
|
|
unset CC;
|
|
unset CXX;
|
|
./configure --host=$HOST --disable-openssl --disable-readline --disable-zlib --disable-notify --prefix=${TRAVIS_BUILD_DIR}/win32/opensc || cat config.log;
|
|
fi
|
|
# Optionally try to upload to Coverity Scan
|
|
# On error (propably quota is exhausted), just continue
|
|
- if [ "${DO_COVERITY_SCAN}" = "yes" ]; then curl -s 'https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh' | bash || true; fi
|
|
|
|
script:
|
|
- if [ "${DO_COVERITY_SCAN}" != "yes" ]; then
|
|
if [ $TRAVIS_OS_NAME == osx ]; then
|
|
./MacOSX/build;
|
|
else
|
|
make;
|
|
fi;
|
|
fi
|
|
- if [ -z "$HOST" -a "${DO_COVERITY_SCAN}" != "yes" ]; then
|
|
make check && make dist;
|
|
fi
|
|
- if [ ! -z "$HOST" -a "${DO_COVERITY_SCAN}" != "yes" ]; then
|
|
make install;
|
|
wine "C:/Program Files (x86)/Inno Setup 5/ISCC.exe" win32/OpenSC.iss;
|
|
fi
|
|
|
|
after_script:
|
|
# kill process started during compilation to finish the build, see
|
|
# https://github.com/moodlerooms/moodle-plugin-ci/issues/33 for details
|
|
- if [ ! -z "$HOST" ]; then
|
|
killall services.exe;
|
|
fi
|
|
|
|
# keep in sync with appveyor.yml
|
|
- if [ "${DO_PUSH_ARTIFACT}" = "yes" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
|
git config --global user.email "builds@travis-ci.org";
|
|
git config --global user.name "Travis CI";
|
|
.github/push_artifacts.sh "Travis CI build ${TRAVIS_JOB_NUMBER}";
|
|
fi
|
|
|
|
cache: ccache
|