From 7d6b2d21358230bd1bf4d3a613331fe651cc71da Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 7 Feb 2017 14:35:34 +0100 Subject: [PATCH] Add Travis support. We now build static/dynamic on ubuntu(native) and win32(cross-compilation). --- .travis.yml | 10 ++++++++++ README.md | 3 +++ travis/compile_all.sh | 8 ++++++++ travis/install_extra_deps.sh | 17 +++++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 .travis.yml create mode 100755 travis/compile_all.sh create mode 100755 travis/install_extra_deps.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..9b67184 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: cpp +dist: trusty +sudo: required +install: travis/install_extra_deps.sh +script: travis/compile_all.sh +env: + - STATIC_BUILD=true BUILD_TARGET=native + - STATIC_BUILD=true BUILD_TARGET=win32 + - STATIC_BUILD=false BUILD_TARGET=native + - STATIC_BUILD=false BUILD_TARGET=win32 diff --git a/README.md b/README.md index 2ee7ba9..50f01d9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +Build status : [![Build Status](https://travis-ci.org/kiwix/kiwix-build.svg?branch=master)](https://travis-ci.org/kiwix/kiwix-build) + + Kiwix is an offline reader for Web content. It's especially thought to make Wikipedia available offline. This is done by reading the content of the project stored in a file format ZIM, a high compressed open diff --git a/travis/compile_all.sh b/travis/compile_all.sh new file mode 100755 index 0000000..700809d --- /dev/null +++ b/travis/compile_all.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +OPTION="" +if [ "${STATIC_BUILD}" = "true" ]; then + OPTION="--build-static" +fi + +./kiwix-build.py --build-target=${BUILD_TARGET} ${OPTION} diff --git a/travis/install_extra_deps.sh b/travis/install_extra_deps.sh new file mode 100755 index 0000000..f3578cd --- /dev/null +++ b/travis/install_extra_deps.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +orig_dir=$(pwd) + +sudo apt-get update -qq +sudo apt-get install -qq uuid-dev libicu-dev libctpp2-dev automake libtool python3-pip zlib1g-dev lzma-dev libbz2-dev cmake +pip3 install meson + +# ninja +git clone git://github.com/ninja-build/ninja.git +cd ninja +git checkout release +./configure.py --bootstrap +sudo cp ninja /bin + +cd $orig_dir +