Fix Travis-CI build

While here, refactor a bit so that a failing libnfc build does not
indicate a failure of the libfreefare build.
This commit is contained in:
Romain Tartière 2017-06-26 11:15:12 +02:00
parent feb0f15f3e
commit a884eb3dca
2 changed files with 25 additions and 33 deletions

View file

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

View file

@ -6,7 +6,7 @@ compiler:
env: env:
- BLD=cmake - BLD=cmake
- BLD=autoconf - BLD=autotools
addons: addons:
apt: apt:
@ -15,4 +15,7 @@ addons:
- cmake - cmake
- libcutter-dev - libcutter-dev
script: ./.travis-ci-build install:
- git clone https://github.com/nfc-tools/libnfc
- ./.travis-ci-build libnfc
script: ./.travis-ci-build .