mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-12 23:59:08 +00:00

This allows having multiple Dockerfile-base-* files without also needing to add a separate Dockerfile-travis-* file due to the FROM line changing. (cherry-picked from commit 3f67c2fbf051aa9e322defb66c782477cd53b8bd)
39 lines
1.2 KiB
Bash
Executable File
39 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
date
|
|
|
|
export EXTRA_FLAGS_RELEASE=""
|
|
export WML_TESTS=true
|
|
export PLAY_TEST=true
|
|
export MP_TEST=true
|
|
export WML_TEST_TIME=15
|
|
export BOOST_TEST=true
|
|
export LTO=false
|
|
|
|
if [ "$OPT" = "-O0" ]; then
|
|
export EXTRA_FLAGS_RELEASE="-O0"
|
|
export PLAY_TEST=false
|
|
export MP_TEST=false
|
|
export WML_TEST_TIME=20
|
|
else
|
|
# change to true to enable LTO on optimized, non-xcode builds
|
|
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
|