diff options
author | Dmitrij D. Czarkoff <czarkoff@gmail.com> | 2016-10-22 12:37:43 +0200 |
---|---|---|
committer | Dmitrij D. Czarkoff <czarkoff@gmail.com> | 2016-10-22 12:37:43 +0200 |
commit | 311c35e3b907b76858058b7ba0bf4685b502d21d (patch) | |
tree | a8744d4d21922951209e457480b5a4df3ff084bc /.travis.yml | |
parent | b510b04f07eb72d67d259abe81d5f05b852b959e (diff) | |
download | imv-311c35e3b907b76858058b7ba0bf4685b502d21d.tar.gz |
Enable tests
Once cmocka is built, it is cached, so that subsequent builds only need to
install it and update linker configuration.
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 24 |
1 files changed, 20 insertions, 4 deletions
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 |