summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Grandin <grandinp@gmail.com>2018-10-17 23:28:46 -0700
committerPierre Grandin <grandinp@gmail.com>2018-10-17 23:28:46 -0700
commit2766381b5a867cf4b2ad14f290fecc278bf8cc03 (patch)
treeeb9cf614e939c59a18563f6d2ade9f3e6f3482a7
parent458ea81a42c647d437307194dfa8ca4d361a74f6 (diff)
downloadnavit-2766381b5a867cf4b2ad14f290fecc278bf8cc03.tar.gz
working on travis CI
-rw-r--r--.travis.yml9
-rwxr-xr-xcontrib/sailfish/build_sailfish_ci.sh5
2 files changed, 14 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000..4d1b665da
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,9 @@
+sudo: required
+
+services:
+ - docker
+
+before_install:
+- docker pull hoehnp/sailfishos-platform-sdk:2.2.1.18-r1
+- docker run -e VERSION_ID=2.2.1.18 hoehnp/sailfishos-platform-sdk:2.2.1.18-r1 /bin/bash -x /navit/contrib/sailfish/build_sailfish_ci.sh
+
diff --git a/contrib/sailfish/build_sailfish_ci.sh b/contrib/sailfish/build_sailfish_ci.sh
index 31e45f05e..65f0ec2c2 100755
--- a/contrib/sailfish/build_sailfish_ci.sh
+++ b/contrib/sailfish/build_sailfish_ci.sh
@@ -6,6 +6,11 @@
if [ -z ${VERSION_ID+x} ]; then echo "VERSION_ID not set. Forgot to export VERSION_ID?"; exit 1; fi
+# First we need to cd to the directory containing this script and the spec file.
+# Makes calling it directly from docker easier.
+SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
+cd $SCRIPTPATH
+
#arm devices
sb2 -t SailfishOS-${VERSION_ID}-armv7hl -m sdk-install -R zypper --non-interactive in $(grep "^BuildRequires: " navit-sailfish.spec | sed -e "s/BuildRequires: //")
sb2 -t SailfishOS-${VERSION_ID}-armv7hl -m sdk-build rpmbuild --define "_topdir /home/nemo/rpmbuild" --define "navit_source $(pwd)/../.." -bb navit-sailfish.spec