Browse Source

fix macOS Travis CI

Le Tan 6 years ago
parent
commit
470a40c80b
2 changed files with 22 additions and 14 deletions
  1. 1 1
      .travis.yml
  2. 21 13
      .travis_macos.sh

+ 1 - 1
.travis.yml

@@ -8,7 +8,7 @@ matrix:
   include:
     - os: osx
       compiler: clang
-      osx_image: xcode8
+      osx_image: xcode9.4
     - os: linux
       compiler: g++
 

+ 21 - 13
.travis_macos.sh

@@ -10,23 +10,31 @@ fi
 
 brew update > /dev/null
 
-# Use Qt5.9.3 instead of 5.10
-cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
-git checkout 13d52537d1e0e5f913de4639012 qt.rb
-sed -i '' 's/:mysql/"mysql"/' qt.rb
-sed -i '' 's/:postgresql/"postgresql"/' qt.rb
-cat qt.rb
-brew install qt
-
-QTDIR="/usr/local/opt/qt"
-PATH="$QTDIR/bin:$PATH"
-LDFLAGS=-L$QTDIR/lib
-CPPFLAGS=-I$QTDIR/include
+brew install gnu-getopt
+export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"
 
-# Build your app
+# Download Qt from Qt Installer
 cd ${project_dir}
 mkdir build
 cd build
+
+export VERBOSE=1
+export QT_CI_PACKAGES="qt.qt5.597.clang_64,qt.qt5.597.qtwebengine"
+
+git clone https://github.com/tamlok/qtci.git
+source qtci/path.env
+
+install-qt 5.9.7
+source qt-5.9.7.env
+
+echo $PATH
+
+QTDIR="${project_dir}/build/Qt/5.9.7/clang_64"
+LDFLAGS=-L$QTDIR/lib
+CPPFLAGS=-I$QTDIR/include
+
+# Build your app
+cd ${project_dir}/build
 qmake -v
 qmake CONFIG-=debug CONFIG+=release ../VNote.pro
 make -j2