Add Travis support.

We now build static/dynamic on ubuntu(native) and win32(cross-compilation).
This commit is contained in:
Matthieu Gautier 2017-02-07 14:35:34 +01:00
parent 5919e28a2f
commit 7d6b2d2135
4 changed files with 38 additions and 0 deletions

10
.travis.yml Normal file
View File

@ -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

View File

@ -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

8
travis/compile_all.sh Executable file
View File

@ -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}

17
travis/install_extra_deps.sh Executable file
View File

@ -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