View Issue Details

IDProjectCategoryView StatusLast Update
0013472ScribusBuild Systempublic2015-10-27 22:16
ReporterKunda Assigned Tocbradney  
PrioritynormalSeveritytweakReproducibilityhave not tried
Status closedResolutionfixed 
Product Version1.5.1svn 
Target Version1.5.1Fixed in Version1.5.1svn 
Summary0013472: [PATCH] Add OSX build option to travis-ci
DescriptionPatch: https://patch-diff.githubusercontent.com/raw/scribusproject/scribus/pull/29.diff

Currently Travis-CI builds Scribus on Linux with clang and gcc. This patch adds OSX with clang. See successful test of all 3 builds at https://travis-ci.org/luzpaz/scribus/builds/87397004
TagsNo tags attached.
PatchYes

Activities

Kunda

2015-10-26 12:10

updater  

travis-ci-osx.patch (4,119 bytes)   
diff --git a/.travis.yml b/.travis.yml
index 0445bc1..8ec7cdf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,36 +1,77 @@
-language: cpp
+language: c++
 
-compiler:
-  - gcc
-  - clang
-
-dist: trusty
+matrix:
+  include:
+    - os: linux
+      dist: trusty
+      sudo: required
+      compiler:
+        - gcc
+    - os: linux
+      dist: trusty
+      sudo: required
+      compiler:
+        - clang
+    - os: osx
+      compiler: clang
+  exclude:
+    - os: osx
+      compiler: gcc
+    - os: linux
+      dist: precise
 
 before_install:
-  - sudo apt-get update -qq
-  - sudo apt-get install cmake libboost-python-dev libcups2-dev libhunspell-dev
-    libhyphen-dev liblcms2-dev libpodofo-dev libtiff-dev libxml2-dev
-    python-all-dev zlib1g-dev qtbase5-dev qtdeclarative5-dev libqt5opengl5-dev
-    qttools5-dev qttools5-dev-tools libgraphicsmagick++1-dev
-    libopenscenegraph-dev libpoppler-dev libcairo2-dev libwpg-dev libmspub-dev
-    libcdr-dev libvisio-dev
+# Linux
+- if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get update -qq; 
+      sudo apt-get install -y cmake libboost-python-dev libcups2-dev libhunspell-dev
+      libhyphen-dev liblcms2-dev libpodofo-dev libtiff-dev libxml2-dev
+      python-all-dev zlib1g-dev qtbase5-dev qtdeclarative5-dev libqt5opengl5-dev
+      qttools5-dev qttools5-dev-tools libgraphicsmagick++1-dev
+      libopenscenegraph-dev libpoppler-dev libcairo2-dev libwpg-dev libmspub-dev
+      libcdr-dev libvisio-dev;
+    fi
+# OSX
+# - if [ $TRAVIS_OS_NAME == osx ]; then brew --env && brew config && brew list; fi
+- if [ $TRAVIS_OS_NAME == osx ]; then brew update; 
+      brew outdated cmake --verbose || brew upgrade cmake; 
+      brew tap homebrew/dupes && brew install homebrew/dupes/zlib && brew link --force zlib;
+      brew install xz little-cms2 cairo qt5 hunspell ghostscript graphicsmagick poppler podofo; 
+      brew outdated jpeg --verbose || brew upgrade jpeg;
+      brew outdated libtiff --verbose || brew upgrade libtiff; 
+      brew outdated fontconfig --verbose || brew upgrade fontconfig; 
+      brew install openssl && brew link --force openssl; 
+      brew outdated pkg-config --verbose || brew upgrade pkg-config; 
+      brew outdated boost || brew upgrade boost; 
+      brew outdated freetype || brew upgrade freetype; 
+      brew install librevenge libwpg libvisio libmspub libcdr libpagemaker libfreehand open-scene-graph; 
+    fi
+  # - export LDFLAGS+=-L/usr/local/opt/zlib/lib:-L/usr/local/opt/gettext/lib:-L/usr/local/opt/libffi/lib:-L/usr/local/opt/qt5/lib:-L/usr/local/opt/sqlite/lib:-L/usr/local/opt/openssl/lib:-L/usr/local/opt/icu4c/lib
+  # - export CXXFLAGS+=-I/usr/local/opt/zlib/include:-I/usr/local/opt/gettext/include:-I/usr/local/opt/qt5/include:-I/usr/local/opt/sqlite/include:-I/usr/local/opt/openssl/include:-I/usr/local/opt/icu4c/include 
 
 script:
-  - if [[ $CC == gcc ]]; then
-      export NPROC=8;
-    else
-      export NPROC=1;
+  - if [ $TRAVIS_OS_NAME == linux ]; then
+      if [[ $CC == gcc ]]; then
+        export NPROC=8;
+      else
+        export NPROC=1;
+      fi;
+    cmake . -DWANT_HUNSPELL=1 -DWITH_PODOFO=1 -DWANT_GRAPHICSMAGICK=1 -DWANT_DEBUG=0 -DWANT_SVNVERSION=0 -DWANT_GUI_LANG=en_US;
+    make -j"$NPROC";
     fi
+  
 
-  - cmake .
-  - make -j$NPROC
-
+  - if [ $TRAVIS_OS_NAME = osx -a $CC = clang ]; then
+      cmake . -DCMAKE_PREFIX_PATH=/usr/local/opt/zlib -DBUILD_OSX_BUNDLE=1 -DQT_PREFIX=/usr/local/opt/qt5 -DWANT_HUNSPELL=1 -DWITH_PODOFO=1 -DWANT_GRAPHICSMAGICK=1 -DWANT_DEBUG=0 -DWANT_SVNVERSION=0 -DWANT_GUI_LANG=en_US;
+      make -j8; 
+      make install;
+    fi
+    
 notifications:
-  email: false
-  irc:
-    channels:
-      - "chat.freenode.net#scribus-dev"
-    template:
-      - "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}"  
-    on_success: always
-    on_failure: always
+  - email: false
+  - irc:
+    -  channels:
+    - "chat.freenode.net#scribus-dev"
+    -  template:
+    - "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}"  
+    -  on_success: always
+    -  on_failure: always
travis-ci-osx.patch (4,119 bytes)   

Kunda

2015-10-26 16:39

updater   ~0036948

Please merge. If I find ways to refine it aka make the code look prettier, or speed the builds up faster; then I'll submit another patch.

Kunda

2015-10-27 22:16

updater   ~0037000

Committed in r20505 by MrB. Thanks!

Issue History

Date Modified Username Field Change
2015-10-26 05:47 Kunda New Issue
2015-10-26 12:09 Kunda Patch No => Yes
2015-10-26 12:09 Kunda Summary Add OSX build option to travis-ci => [PATCH] Add OSX build option to travis-ci
2015-10-26 12:09 Kunda Additional Information Updated
2015-10-26 12:10 Kunda File Added: travis-ci-osx.patch
2015-10-26 16:39 Kunda Note Added: 0036948
2015-10-27 22:12 cbradney Status new => resolved
2015-10-27 22:12 cbradney Fixed in Version => 1.5.1svn
2015-10-27 22:12 cbradney Resolution open => fixed
2015-10-27 22:12 cbradney Assigned To => cbradney
2015-10-27 22:16 Kunda Note Added: 0037000
2015-10-27 22:16 Kunda Status resolved => closed