From feb0f15f3ec8fc2bab5995a5e07a2a378919cb38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Mon, 26 Jun 2017 11:09:17 +0200 Subject: [PATCH] Test build using Travis-CI --- .travis-ci-build | 33 +++++++++++++++++++++++++++++++++ .travis.yml | 18 ++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100755 .travis-ci-build create mode 100644 .travis.yml diff --git a/.travis-ci-build b/.travis-ci-build new file mode 100755 index 0000000..bea5bc2 --- /dev/null +++ b/.travis-ci-build @@ -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 . diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1a0b58e --- /dev/null +++ b/.travis.yml @@ -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