1
0
Fork 0

Add macOS to travis

This commit is contained in:
wangqr 2020-02-10 15:27:07 -05:00
parent 50f63a54d0
commit f8bd53c479
4 changed files with 43 additions and 18 deletions

View File

@ -40,25 +40,27 @@ env:
- CC=gcc-9 CXX=g++-9
- BUILD_SUIT=autotools CC=gcc-9 CXX=g++-9
jobs:
include:
- os: osx
osx_image: xcode11.3
env: BUILD_SUIT=autotools
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;

23
.travis/install.sh Executable file
View File

@ -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

View File

@ -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

View File

@ -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