wesnoth/utils/travis/steps/install.sh
pentarctagon 1ef1704fd9 Adds the opt/OPT option to scons/cmake.
Travis now also makes use of this to set the optimization level for the -O0 builds, rather than extra_flags_*.  This additionally fixes an issue where using -O0 in the release build with LTO resulted in the individual *.o files being compiled with -O0, but LTO then still linked with release's default -O3.

(cherry-picked from commit 63ff641662d4192401a49f9a002d7872000a3f02)
2018-10-07 03:19:35 +00:00

37 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
date
export WML_TESTS=true
export PLAY_TEST=true
export MP_TEST=true
export WML_TEST_TIME=15
export BOOST_TEST=true
if [ "$OPT" = "-O0" ]; then
export PLAY_TEST=false
export MP_TEST=false
export WML_TEST_TIME=20
fi
if [ "$LTO" == "" ]; then
export LTO=false
fi
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
if [ "$TOOL" = "xcodebuild" ]; then
brew install ccache
travis_wait ./projectfiles/Xcode/Fix_Xcode_Dependencies
else
brew install scons cairo pango moreutils sdl2_image sdl2_ttf sdl2_mixer openssl
export CXXFLAGS="-I/usr/local/opt/openssl/include $CFLAGS"
export LDFLAGS="-L/usr/local/opt/openssl/lib $LDFLAGS"
fi
else
echo "FROM wesnoth/wesnoth:$LTS-$BRANCH" > docker/Dockerfile-travis-"$LTS"-"$BRANCH"
echo "COPY ./ /home/wesnoth-travis/" >> docker/Dockerfile-travis-"$LTS"-"$BRANCH"
echo "WORKDIR /home/wesnoth-travis" >> docker/Dockerfile-travis-"$LTS"-"$BRANCH"
docker build -t wesnoth-repo:"$LTS"-"$BRANCH" -f docker/Dockerfile-travis-"$LTS"-"$BRANCH" .
fi