From 311c35e3b907b76858058b7ba0bf4685b502d21d Mon Sep 17 00:00:00 2001 From: "Dmitrij D. Czarkoff" Date: Sat, 22 Oct 2016 12:37:43 +0200 Subject: Enable tests Once cmocka is built, it is cached, so that subsequent builds only need to install it and update linker configuration. --- .travis.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index 440da38..56d26b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,16 @@ compiler: - clang - gcc +cache: + directories: + - $HOME/cmocka + env: - - V=yes CFLAGS="-W -Wall -Wextra -Wpedantic -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -Werror" + - CFLAGS="-W -Wall -Wextra -Wpedantic -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -Werror" script: - - make -# - make check + - make V=yes + - CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" make check notifications: email: false @@ -22,4 +26,16 @@ addons: packages: - libfreeimage-dev - libsdl2-ttf-dev -# - libcmocka-dev + +install: + # Note: travis concatinates lines belonging to the same item + - if [ ! -d $HOME/cmocka/cmocka-1.1.0 ]; + then + curl "https://cmocka.org/files/1.1/cmocka-1.1.0.tar.xz" | tar xJf - -C $HOME/cmocka && + cd $HOME/cmocka && + env CFLAGS="-O2 -pipe" cmake cmocka-1.1.0 && + env CFLAGS="-02 -pipe" make && + cd -; + fi + - sudo make -C $HOME/cmocka install + - sudo ldconfig -- cgit v1.2.3