diff --git a/.travis.yml b/.travis.yml index 1fa353e73..e537797a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,12 @@ language: cpp git: submodules: false +jobs: + include: + - os: osx + osx_image: xcode11.3 + env: BUILD_SUIT=autotools + addons: apt: sources: @@ -34,31 +40,21 @@ addons: - gcc-9 - g++-9 -env: -- '' -- BUILD_SUIT=autotools -- CC=gcc-9 CXX=g++-9 -- BUILD_SUIT=autotools CC=gcc-9 CXX=g++-9 - install: -- sudo luarocks install busted > /dev/null -- sudo luarocks install moonscript > /dev/null -- sudo luarocks install uuid > /dev/null -# Remove the CMake provided by travis -- sudo rm -rf /usr/local/cmake* -- if [ "$BUILD_SUIT" = "autotools" ]; then - sudo pip install -U cpp-coveralls; - git submodule --quiet init; - git submodule --quiet update vendor/googletest; - else - pushd /usr/src/googletest; - sudo cmake .; - sudo make install -j2; - popd; - fi +- ./.travis/install.sh script: -- if [ "$BUILD_SUIT" = "autotools" ]; then +- if [ $TRAVIS_OS_NAME = 'osx' ]; then + export PATH="/usr/local/opt/gettext/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/icu4c/bin:$PATH"; + export CPPFLAGS="-I/usr/local/opt/gettext/include -I/usr/local/opt/icu4c/include"; + export LDFLAGS="-L/usr/local/opt/gettext/lib -L/usr/local/opt/icu4c/lib"; + export ACLOCAL_PATH="/usr/local/opt/gettext/share/aclocal" + export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"; + ./autogen.sh; + ./configure --enable-debug || cat config.log; + make -j2 || travis_terminate 1; + make test || travis_terminate 1; + elif [ "$BUILD_SUIT" = "autotools" ]; then export CPPFLAGS="-fprofile-arcs -ftest-coverage"; export LIBS="-lgcov"; ./autogen.sh; diff --git a/.travis/install.sh b/.travis/install.sh new file mode 100755 index 000000000..ac5f29acd --- /dev/null +++ b/.travis/install.sh @@ -0,0 +1,23 @@ +#! /bin/bash + +set -e + +if [ $TRAVIS_OS_NAME = 'osx' ]; then + brew install autoconf ffmpeg freetype gettext ffms2 fftw fribidi libass m4 icu4c boost wxmac lua +else + sudo luarocks install busted > /dev/null + sudo luarocks install moonscript > /dev/null + sudo luarocks install uuid > /dev/null + # Remove the CMake provided by travis + sudo rm -rf /usr/local/cmake* + if [ "$BUILD_SUIT" = "autotools" ]; then + sudo pip install -U cpp-coveralls; + git submodule --quiet init; + git submodule --quiet update vendor/googletest; + else + pushd /usr/src/googletest; + sudo cmake .; + sudo make install -j2; + popd; + fi +fi diff --git a/Makefile.target b/Makefile.target index 516ef3c24..235d19587 100644 --- a/Makefile.target +++ b/Makefile.target @@ -7,7 +7,7 @@ COMMANDS := all install clean distclean test depclean osx-bundle osx-dmg test-au ifeq (yes, $(BUILD_DARWIN)) CFLAGS += -mmacosx-version-min=10.8 -gfull CXXFLAGS += -mmacosx-version-min=10.8 -gfull -LDFLAGS += -mmacosx-version-min=10.8 -Wl,-dead_strip -pagezero_size 10000 -image_base 100000000 +LDFLAGS += -mmacosx-version-min=10.8 -Wl,-dead_strip LIB_SHARED_LINK = $(LIB_SHARED_LINK_OSX) endif diff --git a/vendor/luajit/src/Makefile b/vendor/luajit/src/Makefile index 37c7da8ec..06e6d0fd3 100644 --- a/vendor/luajit/src/Makefile +++ b/vendor/luajit/src/Makefile @@ -305,7 +305,7 @@ ifeq (Darwin,$(TARGET_SYS)) TARGET_DYNXLDOPTS= TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).$(RELVER) ifeq (x64,$(TARGET_LJARCH)) - TARGET_XLDFLAGS+= -pagezero_size 10000 -image_base 100000000 + XCFLAGS+= -DLUAJIT_ENABLE_GC64 TARGET_XSHLDFLAGS+= -image_base 7fff04c4a000 endif else