Skip to content

Commit 58eeaee

Browse files
Ondřej Surýrkrejci
authored andcommitted
Use prepackaged cmocka instead of building custom version
1 parent 5b1f114 commit 58eeaee

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

.travis.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
language: c
2-
env:
3-
global:
4-
- CMOCKA_VERSION: 1.1.5
52

63
cache:
74
pip: true
@@ -55,6 +52,7 @@ addons:
5552
- w3m
5653
- curl
5754
- valgrind
55+
- libcmocka-dev
5856
- libpcre3-dev
5957
- python3-dev
6058
- python3-cffi
@@ -65,15 +63,10 @@ addons:
6563
homebrew:
6664
packages:
6765
- curl
66+
- cmocka
6867
update: true
6968

7069
before_install:
71-
- OLD_CMOCKA_VERSION=$(sed -n 's/project(cmocka VERSION \([0-9.]*\) LANGUAGES C)/\1/p' cmocka/CMakeLists.txt)
72-
- if [ -f "cmocka/CMakeLists.txt" ] && [ "$OLD_CMOCKA_VERSION" != "$CMOCKA_VERSION" ]; then echo "Purging the cmocka-$OLD_CMOCKA_VERSION from cache"; rm -rf cmocka; fi
73-
- if [ ! -d "cmocka" ] || [ ! -f "cmocka/CMakeLists.txt" ]; then echo "Downloading cmocka-$CMOCKA_VERSION"; rm -rf cmocka && curl -SLO https://cmocka.org/files/1.1/cmocka-$CMOCKA_VERSION.tar.xz && tar -xJf cmocka-$CMOCKA_VERSION.tar.xz && mv "cmocka-$CMOCKA_VERSION" cmocka; fi
74-
- if [ ! -d "cmocka/build" ] || [ ! -f "cmocka/build/Makefile" ]; then mkdir -p cmocka/build && (cd cmocka/build && cmake ..); fi
75-
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ ! -f "cmocka/build/src/libcmocka.dylib" ]; then (cd cmocka/build && make -j2); fi
76-
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ ! -f "cmocka/build/src/libcmocka.so" ]; then (cd cmocka/build && make -j2); fi
7770
- if [ "$DEPLOY_BUILD" = "TRUE" ]; then sudo snap install universal-ctags; fi
7871
- if [ "$DEPLOY_BUILD" = "TRUE" ]; then pip3 install --user codecov==2.0.22; export CFLAGS="-coverage"; fi
7972

0 commit comments

Comments
 (0)