|
4 | 4 | # Build the Travis OSX artifacts |
5 | 5 | # |
6 | 6 |
|
7 | | -# bailout on errors and echo commands |
8 | | -curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall > uninstall |
9 | | -chmod 755 uninstall |
10 | | -./uninstall -f |
11 | | -/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
| 7 | +# As of travis-ci-macos-10.13-xcode9.4.1-1529955246, the travis osx image |
| 8 | +# contains a broken homebrew. Walk-around by reinstalling: |
| 9 | +if [ -n "$TRAVIS" ]; then |
| 10 | + curl -fsSL \ |
| 11 | + https://raw.githubusercontent.com/Homebrew/install/master/uninstall \ |
| 12 | + > uninstall |
| 13 | + chmod 755 uninstall |
| 14 | + ./uninstall -f |
| 15 | + inst="https://raw.githubusercontent.com/Homebrew/install/master/install" |
| 16 | + /usr/bin/ruby -e "$(curl -fsSL $inst)" |
| 17 | +fi |
12 | 18 |
|
| 19 | +# bailout on errors and echo commands |
13 | 20 | set -xe |
14 | 21 |
|
15 | | -for pkg in cairo cmake libarchive libexif python3 wget xz; do |
16 | | - brew list $pkg || brew install $pkg |
| 22 | +set -o pipefail |
| 23 | +for pkg in cairo cmake curl libarchive libexif python3 wget xz; do |
| 24 | + brew list $pkg 2>/dev/null | head -10 || brew install $pkg |
17 | 25 | done |
18 | | -curl --version >/dev/null || brew install curl |
19 | | -wget http://opencpn.navnux.org/build_deps/wx312_opencpn50_macos109.tar.xz |
| 26 | + |
| 27 | +wget -q http://opencpn.navnux.org/build_deps/wx312_opencpn50_macos109.tar.xz |
20 | 28 | tar xJf wx312_opencpn50_macos109.tar.xz -C /tmp |
21 | 29 | export PATH="/usr/local/opt/gettext/bin:$PATH" |
22 | 30 | echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile |
23 | 31 |
|
24 | | -mkdir build |
25 | | -cd build |
26 | | -test -z "$TRAVIS_TAG" && CI_BUILD=OFF || CI_BUILD=ON |
27 | | -cmake -DOCPN_CI_BUILD=$CI_BUILD \ |
28 | | - -DOCPN_USE_LIBCPP=ON \ |
| 32 | +mkdir build && cd build |
| 33 | +cmake \ |
29 | 34 | -DwxWidgets_CONFIG_EXECUTABLE=/tmp/wx312_opencpn50_macos109/bin/wx-config \ |
30 | 35 | -DwxWidgets_CONFIG_OPTIONS="--prefix=/tmp/wx312_opencpn50_macos109" \ |
31 | | - -DCMAKE_INSTALL_PREFIX=/tmp/opencpn -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \ |
| 36 | + -DCMAKE_INSTALL_PREFIX=/tmp/opencpn \ |
| 37 | + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \ |
32 | 38 | .. |
33 | 39 | make -sj2 |
34 | 40 | make package |
35 | | -rm -rf /usr/local/lib/ruby/gems/ && brew reinstall ruby |
36 | | -chmod 644 /usr/local/lib/lib*.dylib |
| 41 | + |
| 42 | +wget -q http://opencpn.navnux.org/build_deps/Packages.dmg |
| 43 | +hdiutil attach Packages.dmg |
| 44 | +sudo installer -pkg "/Volumes/Packages 1.2.5/Install Packages.pkg" -target "/" |
| 45 | +make install |
| 46 | +make create-pkg |
| 47 | + |
| 48 | +ls -l *.pkg *.tar.gz *.xml |
| 49 | + |
| 50 | +# As of travis-ci-macos-10.13-xcode9.4.1-1529955246, the travis osx image |
| 51 | +# contains a broken ruby setup used by deployment code. Walk around by |
| 52 | +# reinstalling: |
| 53 | +if [ -n "$TRAVIS" ]; then |
| 54 | + rm -rf /usr/local/lib/ruby/gems/ && brew reinstall ruby |
| 55 | +fi |
0 commit comments