ci: Use new meson auto_features option

* Install lz4 dep from Ubuntu repo
* Use curl instead of wget
* Use xenial for meson and make meson build first
* Unset Travis preset CC and CXX value for meson to use ccache
* Be more verbose with "set -x"
This commit is contained in:
Lzu Tao 2018-11-30 21:10:06 +07:00
parent 24bc513ea1
commit ff1bca3fbd

View File

@ -51,7 +51,8 @@ matrix:
- if: tag =~ ^v[0-9]\.[0-9] - if: tag =~ ^v[0-9]\.[0-9]
env: Cmd='make -C tests checkTag && tests/checkTag $TRAVIS_BRANCH' env: Cmd='make -C tests checkTag && tests/checkTag $TRAVIS_BRANCH'
- env: BUILD_SYSTEM='meson' - dist: xenial
env: BUILD_SYSTEM='meson'
allow_failures: allow_failures:
- env: BUILD_SYSTEM='meson' - env: BUILD_SYSTEM='meson'
@ -69,22 +70,25 @@ script:
- printf 'JOB_NUMBER=%s TRAVIS_BRANCH=%s TRAVIS_EVENT_TYPE=%s TRAVIS_PULL_REQUEST=%s\n' - printf 'JOB_NUMBER=%s TRAVIS_BRANCH=%s TRAVIS_EVENT_TYPE=%s TRAVIS_PULL_REQUEST=%s\n'
"${JOB_NUMBER}" "${TRAVIS_BRANCH}" "${TRAVIS_EVENT_TYPE}" "${TRAVIS_PULL_REQUEST}" "${JOB_NUMBER}" "${TRAVIS_BRANCH}" "${TRAVIS_EVENT_TYPE}" "${TRAVIS_PULL_REQUEST}"
- if [ "${BUILD_SYSTEM}" = meson ]; then - if [ "${BUILD_SYSTEM}" = meson ]; then
sudo apt-get install -qq python3.5 wget tree set -x;
&& wget https://bootstrap.pypa.io/get-pip.py sudo apt-get install -qq liblz4-dev valgrind tree
&& python3.5 get-pip.py --user && curl -o get-pip.py 'https://bootstrap.pypa.io/get-pip.py'
&& python3 get-pip.py --user
&& rm get-pip.py && rm get-pip.py
&& pip3.5 install --user meson ninja; && pip3 install --user meson ninja
mkdir build/meson/build; && unset CC CXX
pushd "$_"; && meson --buildtype=debug
meson --buildtype=debug -D with-contrib=true -D with-tests=true -Dauto_features=enabled
-D with-contrib=true -D default_library=both .. -Dbuild_{programs,tests,contrib}=true
-Ddefault_library=both build/meson
builddir
&& cd "$_"
&& ninja && ninja
&& DESTDIR=./staging ninja install && DESTDIR=./staging ninja install
&& tree ./staging; && tree ./staging;
popd; travis_terminate "$?";
else
export FUZZERTEST=-T2mn;
export ZSTREAM_TESTTIME=-T2mn;
export DECODECORPUS_TESTTIME=-T1mn;
sh -c "${Cmd}" || travis_terminate 1;
fi fi
- export FUZZERTEST=-T2mn;
export ZSTREAM_TESTTIME=-T2mn;
export DECODECORPUS_TESTTIME=-T1mn;
sh -c "${Cmd}" || travis_terminate 1;