TRAVIS Continuous Integration

.. initial import from gcoco fork
.. will almost certainly not work
This commit is contained in:
Mark Liversedge
2015-10-29 17:49:49 +00:00
parent d095eee34e
commit 164dafbd0c
10 changed files with 242 additions and 0 deletions

23
.travis.yml Normal file
View File

@@ -0,0 +1,23 @@
os:
- linux
- osx
env:
- QT=4
- QT=5
before_install:
- git clone --depth=1 https://github.com/GoldenCheetah/GoldenCheetah.git GoldenCheetah
- cp -R travis-ci GoldenCheetah/
- cd GoldenCheetah
- pwd
- sh travis-ci/$TRAVIS_OS_NAME/before_install_QT$QT.sh $TRAVIS_OS_NAME $QT
before_script:
- sh travis-ci/$TRAVIS_OS_NAME/before_script_QT$QT.sh $TRAVIS_OS_NAME $QT
script:
- sh travis-ci/$TRAVIS_OS_NAME/script_QT$QT.sh $TRAVIS_OS_NAME $QT
after_success:
- sh travis-ci/$TRAVIS_OS_NAME/after_success_QT$QT.sh $TRAVIS_OS_NAME $QT

View File

@@ -0,0 +1,11 @@
#!/bin/bash
echo
echo "# arguments called with ----> ${@} "
echo "# \$1 ----------------------> $1 "
echo "# \$2 ----------------------> $2 "
echo "# path to me ---------------> ${0} "
echo "# parent path --------------> ${0%/*} "
echo "# my name ------------------> ${0##*/} "
echo
exit

View File

@@ -0,0 +1,11 @@
#!/bin/bash
echo
echo "# arguments called with ----> ${@} "
echo "# \$1 ----------------------> $1 "
echo "# \$2 ----------------------> $2 "
echo "# path to me ---------------> ${0} "
echo "# parent path --------------> ${0%/*} "
echo "# my name ------------------> ${0##*/} "
echo
exit

View File

@@ -0,0 +1,49 @@
#!/bin/bash
cat ${0}
# Update brew
brew update
# Install QT
brew install qt$QT
# Install libical support
brew install libical
# Install libusb support
brew install libusb libusb-compat
# Install SRM support
brew install srmio
# Install libmkl support
brew install --HEAD https://raw.github.com/gcoco/CI-for-GoldenCheetah/master/libkml.rb
# Allo write to brew files for later deployment
sudo chmod -R +w /usr/local
# Install qwtplot3d support
git clone --depth 1 https://github.com/sintegrial/qwtplot3d.git qwtplot3d
cd qwtplot3d
CC=clang CXX=clang++ /usr/local/opt/qt$QT/bin/qmake -makefile -recursive QMAKE_CXXFLAGS_WARN_ON+=-Wno-unused-private-field
CC=clang CXX=clang++ make -j2
cd ..
# Install kQOAuth support
git clone --branch 0.98 https://github.com/kypeli/kQOAuth.git kQOAuth-0.98
cd kQOAuth-0.98
CC=clang CXX=clang++ /usr/local/opt/qt$QT/bin/qmake -makefile -recursive QMAKE_CXXFLAGS_WARN_ON+=-Wno-unused-private-field
CC=clang CXX=clang++ make -j2 qmake_all
CC=clang CXX=clang++ sudo make install
cd ..
# Install D2XX support
curl -O http://www.ftdichip.com/Drivers/D2XX/MacOSX/D2XX1.2.2.dmg
hdiutil mount D2XX1.2.2.dmg
mkdir D2XX
cp /Volumes/release/D2XX/Object/10.5-10.7/x86_64/libftd2xx.1.2.2.dylib D2XX
sudo cp /Volumes/release/D2XX/Object/10.5-10.7/x86_64/libftd2xx.1.2.2.dylib /usr/local/lib
cp /Volumes/release/D2XX/bin/*.h D2XX
exit

View File

@@ -0,0 +1,11 @@
#!/bin/bash
echo
echo "# arguments called with ----> ${@} "
echo "# \$1 ----------------------> $1 "
echo "# \$2 ----------------------> $2 "
echo "# path to me ---------------> ${0} "
echo "# parent path --------------> ${0%/*} "
echo "# my name ------------------> ${0##*/} "
echo
exit

View File

@@ -0,0 +1,40 @@
#!/bin/bash
# Copy default files to actual build files
cp qwt/qwtconfig.pri.in qwt/qwtconfig.pri
cp src/gcconfig.pri.in src/gcconfig.pri
# Modify src/gcconfig.pri with build specifics
sed -i "" "s|#\(CONFIG += release.*\)|\1 static |" src/gcconfig.pri
sed -i "" "s|#\(QMAKE_LFLAGS\).*|\1_RELEASE += -mmacosx-version-min=10.7 |" src/gcconfig.pri
sed -i "" "s|#\(SRMIO_INSTALL =.*\)|\1 /usr/local|" src/gcconfig.pri
sed -i "" "s|#\(D2XX_INCLUDE =.*\)|\1 ../D2XX|" src/gcconfig.pri
sed -i "" "s|#\(D2XX_LIBS =.*\)|\1 -L../D2XX -lftd2xx.1.2.2|" src/gcconfig.pri
sed -i "" "s|#\(KQOAUTH_INSTALL =.*\)|\1 /usr/local|" src/gcconfig.pri
sed -i "" "s|#\(KQOAUTH_INCLUDE =.*\)|\1 \$\$[QT_INSTALL_LIBS]/kqoauth.framework/Headers|" src/gcconfig.pri
sed -i "" "s|#\(KQOAUTH_LIBS =.*\)|\1 -F\$\$[QT_INSTALL_LIBS] -framework kqoauth|" src/gcconfig.pri
sed -i "" "s|#\(QWT3D_INSTALL =.*\)|\1 ../../qwtplot3d|" src/gcconfig.pri
sed -i "" "s|#\(QWT3D_INCLUDE =.*\)|\1 /usr/local/include/qwtplot3d-$QT|" src/gcconfig.pri
sed -i "" "s|#\(QWT3D_LIBS =.*\)|\1 -L/usr/local/lib -lqwtplot3d-$QT|" src/gcconfig.pri
sed -i "" "s|#\(ICAL_INSTALL =.*\)|\1 /usr/local|" src/gcconfig.pri
sed -i "" "s|#\(ICAL_LIBS =.*\)|\1 -L/usr/local/lib -lical|" src/gcconfig.pri
sed -i "" "s|#\(LIBUSB_INSTALL =\).*|\1 /usr/local|" src/gcconfig.pri
sed -i "" "s|#\(LIBUSB_LIBS =.*\)|\1 -L/usr/local/lib -lusb|" src/gcconfig.pri
sed -i "" "s|#\(KML_INSTALL =.*\)|\1 /usr/local|" src/gcconfig.pri
sed -i "" "s|#\(KML_LIBS =.*\)|\1 -L/usr/local/lib -lkmlxsd -lkmlregionator -lkmldom -lkmlconvenience -lkmlengine -lkmlbase|" src/gcconfig.pri
sed -i "" "s|#\(QMAKE_CFLAGS_\).*|\1RELEASE += -mmacosx-version-min=10.7 -arch x86_64|" src/gcconfig.pri
sed -i "" "s|#\(QMAKE_CXXFLAGS_\).*|\1RELEASE += -mmacosx-version-min=10.7 -arch x86_64|" src/gcconfig.pri
sed -i "" "s|#\(DEFINES += GC_VIDEO_QUICKTIME.*\)|\1 |" src/gcconfig.pri
sed -i "" "s|#\(CONFIG += link_pkgconfig\)|\1|" src/gcconfig.pri
sed -i "" "s|#\(PKGCONFIG = .*\)|\1 libical libusb|" src/gcconfig.pri
# Allow D2XX to be included in the deployment bundle
sed -i "" "s|libftd2xx.dylib|@executable_path/../Frameworks/libftd2xx.1.2.2.dylib|" src/D2XX.cpp
# Update translations
/usr/local/opt/qt/bin/lupdate src/src.pro
exit

View File

@@ -0,0 +1,11 @@
#!/bin/bash
echo
echo "# arguments called with ----> ${@} "
echo "# \$1 ----------------------> $1 "
echo "# \$2 ----------------------> $2 "
echo "# path to me ---------------> ${0} "
echo "# parent path --------------> ${0%/*} "
echo "# my name ------------------> ${0##*/} "
echo
exit

64
travis/libkml.rb Normal file
View File

@@ -0,0 +1,64 @@
require 'formula'
class Libkml < Formula
homepage 'http://code.google.com/p/libkml/'
stable do
url "https://libkml.googlecode.com/files/libkml-1.2.0.tar.gz"
sha1 "3fa5acdc2b2185d7f0316d205002b7162f079894"
# Correct an issue where internal third-party libs (libminizip and liburiparser)
# are installed as dylibs. liburiparser conflicts with uriparser formula.
# libminizip conflicts with new formula, and some of its symbols have been
# renamed with prefixes of "libkml_", i.e, can't be linked against for other builds
# Fix just forces internal libs to be linked statically until the following
# is addressed upstream: https://code.google.com/p/libkml/issues/detail?id=50
patch do
url "https://gist.githubusercontent.com/dakcarto/7419882/raw/10ae08af224b3fee0617fa6288d806d3ccf37c0f/libkml-1.2-static-deps"
sha1 "eba47421e64e75bcf68026bbbe7c985b3bebcde5"
end
end
head do
url 'https://github.com/google/libkml.git',
:revision => "9b50572641f671194e523ad21d0171ea6537426e"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
# Fix compilation with clang and gcc 4.7+
# https://code.google.com/p/libkml/issues/detail?id=179
patch :DATA if build.stable?
def install
if build.head?
inreplace "third_party/Makefile.am" do |s|
s.sub! /(lib_LTLIBRARIES =) libminizip.la liburiparser.la/, "\\1"
s.sub! /(noinst_LTLIBRARIES = libgtest.la libgtest_main.la)/,
"\\1 libminizip.la liburiparser.la"
s.sub! /(libminizip_la_LDFLAGS =)/, "\\1 -static"
s.sub! /(liburiparser_la_LDFLAGS =)/, "\\1 -static"
end
system "./autogen.sh"
end
system "./configure", "--prefix=#{prefix}"
system "make install"
end
end
__END__
diff --git a/src/kml/base/file_posix.cc b/src/kml/base/file_posix.cc
index 764ae55..8ee9892 100644
--- a/src/kml/base/file_posix.cc
+++ b/src/kml/base/file_posix.cc
@@ -29,6 +29,7 @@
#include "kml/base/file.h"
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>

11
travis/script_QT4.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
echo
echo "# arguments called with ----> ${@} "
echo "# \$1 ----------------------> $1 "
echo "# \$2 ----------------------> $2 "
echo "# path to me ---------------> ${0} "
echo "# parent path --------------> ${0%/*} "
echo "# my name ------------------> ${0##*/} "
echo
exit

11
travis/script_QT5.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
echo
echo "# arguments called with ----> ${@} "
echo "# \$1 ----------------------> $1 "
echo "# \$2 ----------------------> $2 "
echo "# path to me ---------------> ${0} "
echo "# parent path --------------> ${0%/*} "
echo "# my name ------------------> ${0##*/} "
echo
exit