Skip to content

Commit

Permalink
travis: Add Travis configuration file
Browse files Browse the repository at this point in the history
And Autotools test files.

Signed-off-by: Quentin Glidic <[email protected]>
  • Loading branch information
sardemff7 committed Apr 6, 2016
1 parent 909d74c commit 32b863a
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/tests/*.test

/configure.ac
/Makefile.am
/src/config.h
/src/config.h.in
30 changes: 30 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
dist: trusty
sudo: required

language: c
compiler:
- gcc
- clang

addons:
apt:
packages:
- autoconf
- automake
- make
- xsltproc
- uuid-dev
- libglib2.0-dev
before_script:
- mkdir -p m4
- autoreconf -fiv
- ./configure --disable-silent-rules
script:
- make check
# For now we cannot run tests as Travis Trusty env lacks IPv6 support
after_failure:
- cat test-suite.log


notifications:
email: false
11 changes: 11 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ACLOCAL_AMFLAGS = -I m4 -I . ${ACLOCAL_FLAGS}
AM_MAKEFLAGS = --no-print-directory

AM_CFLAGS = -Wall -Wextra

noinst_LTLIBRARIES =
check_PROGRAMS =
TESTS =
EXTRA_DIST =

include libnkutils.mk
33 changes: 33 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
AC_PREREQ([2.65])
AC_INIT([nkutils],[0])

AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_SRCDIR([src/token.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([.aux])

AM_INIT_AUTOMAKE([1.14 foreign subdir-objects parallel-tests dist-xz no-dist-gzip tar-ustar])
AM_SILENT_RULES([yes])

AC_ARG_VAR([XSLTPROC], [The xsltproc executable])

AC_PROG_CC
AC_PROG_CC_C99
AM_PROG_CC_C_O
LT_INIT([disable-static pic-only])
PKG_PROG_PKG_CONFIG
AC_PATH_PROG([XSLTPROC], [xsltproc])
if test -z "${XSLTPROC}"; then
AC_MSG_ERROR([xsltproc not found])
fi

AM_DOCBOOK_CONDITIONS=""

NK_INIT([uuid enum token/enum colour/alpha colour/double])

AC_SUBST([AM_DOCBOOK_CONDITIONS])

AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT

0 comments on commit 32b863a

Please sign in to comment.