Test build using Travis-CI

This commit is contained in:
Romain Tartière 2017-06-26 11:09:17 +02:00
parent 91c2c5986a
commit feb0f15f3e
2 changed files with 51 additions and 0 deletions

33
.travis-ci-build Executable file
View file

@ -0,0 +1,33 @@
#!/bin/sh
build_install()
{
(
cd $1
if [ "$BLD" = autotools ]; then
set -x
autoreconf -vis
mkdir build-autotools
cd build-autotools
../configure --prefix=$HOME/.local
make
make install
set +x
elif [ "$BLD" = cmake ]; then
set -x
mkdir build-cmake
cd build-cmake
cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local ..
make
make install
set +x
else
echo "Unsupported build system: '$BLD'" >&2
exit 1
fi
)
}
git clone https://github.com/nfc-tools/libnfc
build_install libnfc
build_install .

18
.travis.yml Normal file
View file

@ -0,0 +1,18 @@
language: c
compiler:
- clang
- gcc
env:
- BLD=cmake
- BLD=autoconf
addons:
apt:
packages:
- libusb-dev
- cmake
- libcutter-dev
script: ./.travis-ci-build