Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Travis builds (#816)
- Loading branch information
1 parent
a5be1e0
commit b062643
Showing
4 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require: sudo | ||
services: | ||
- docker | ||
|
||
install: | ||
- ./tests/travis/build_linux.sh ${TEST_ARGS} | ||
|
||
script: | ||
- docker exec -it xiphos_test /xiphos/tests/${TEST}.sh ${TEST_ARGS} | ||
|
||
env: | ||
# Current version of Fedora | ||
- TEST=build_gtk3 TEST_ARGS="fedora 25" | ||
- TEST=build_gtk3 TEST_ARGS="fedora 26" | ||
- TEST=build_gtk3 TEST_ARGS="fedora rawhide" | ||
# Current EPEL/CentOS/RHEL version | ||
- TEST=build_gtk3 TEST_ARGS="centos 7" | ||
# Current version of Ubuntu | ||
- TEST=build_gtk3_webkiteditor TEST_ARGS="ubuntu 17.04" | ||
# LTS Ubuntu releases | ||
- TEST=build_gtk3_webkiteditor TEST_ARGS="ubuntu 16.04" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -ve | ||
src="$(readlink -f "$(dirname "${0}")/../")" | ||
distro="${1}" | ||
tag="${2}" | ||
cd "${src}" | ||
if [[ "${distro}" == "ubuntu" ]]; then | ||
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/lib/x86_64-linux-gnu/pkgconfig/; | ||
fi | ||
./waf configure --enable-webkit2 --gtk=3 | ||
./waf build -j2 | ||
./waf install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -ve | ||
src="$(readlink -f "$(dirname "${0}")/../")" | ||
distro="${1}" | ||
tag="${2}" | ||
cd "${src}" | ||
if [[ "${distro}" == "ubuntu" ]]; then | ||
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/lib/x86_64-linux-gnu/pkgconfig/; | ||
fi | ||
./waf configure --enable-webkit-editor --gtk=3 | ||
./waf build -j2 | ||
./waf install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/bin/bash | ||
|
||
set -ve | ||
distro="${1}" | ||
tag="${2}" | ||
version="${distro}:${tag}" | ||
srcdir="$(readlink -f "$(dirname "${0}")/../../")" | ||
container=xiphos_test | ||
# First, create the container | ||
docker pull "${version}" | ||
# Install necessary packages | ||
docker run --name "${container}" --volume "${srcdir}:/xiphos" -t -d "${version}" /bin/bash | ||
case "${distro}" in | ||
fedora|centos) | ||
if [ "${distro}" == "centos" ]; then | ||
mgr=yum | ||
docker exec -it "${container}" yum install -y epel-release | ||
else | ||
mgr=dnf | ||
fi | ||
installer="${mgr} install -y sword-devel \ | ||
gcc-c++ \ | ||
gtk3-devel \ | ||
biblesync-devel \ | ||
dbus-glib-devel \ | ||
docbook-utils \ | ||
GConf2-devel \ | ||
gettext \ | ||
libglade2-devel \ | ||
gnome-doc-utils \ | ||
intltool \ | ||
libgsf-devel \ | ||
libuuid-devel \ | ||
rarian-compat \ | ||
gtkhtml3-devel" | ||
if [[ "${tag}" == "7" || "${tag}" == "25" ]]; then | ||
installer="${installer} webkitgtk3-devel" | ||
else | ||
installer="${installer} webkitgtk4-devel" | ||
fi | ||
;; | ||
ubuntu) | ||
docker exec -t "${container}" apt-get update | ||
installer="apt-get install -y | ||
libsword-dev \ | ||
gcc \ | ||
g++ \ | ||
libgtk-3-dev \ | ||
libdbus-glib-1-dev \ | ||
docbook-utils \ | ||
libgconf2-dev \ | ||
gettext \ | ||
libglade2-dev \ | ||
gnome-doc-utils \ | ||
intltool \ | ||
libgsf-1-dev \ | ||
uuid-dev \ | ||
rarian-compat \ | ||
libwebkitgtk-3.0-dev \ | ||
libbiblesync-dev" | ||
;; | ||
esac | ||
docker exec -t "${container}" ${installer} |