mirror of
https://github.com/wesnoth/wesnoth
synced 2024-09-20 16:00:09 +00:00
Add mingw crosscompile job to travis.
Of note: * The image now created by Dockerfile-base-mingw is available on wesnoth's Docker Hub. * Strict building is disabled, as there are a couple warnings that show up when crosscompiling.
This commit is contained in:
parent
4acb95d557
commit
d83fd5d9c8
|
@ -32,6 +32,8 @@ matrix:
|
|||
- compiler: clang
|
||||
env: TOOL=cmake CXXSTD=14 NLS=false LTS=1604 BRANCH=master
|
||||
|
||||
- env: CXXSTD=14 NLS=false LTS=mingw BRANCH=master STRICT=false
|
||||
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env: TOOL=scons CXXSTD=14 NLS=false OPT=-O0
|
||||
|
|
|
@ -1,20 +1,6 @@
|
|||
FROM rwgrim/msys2-cross
|
||||
FROM wesnoth/wesnoth:mingw-master
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y scons g++-mingw-w64-x86-64 pkg-config python3-pefile && \
|
||||
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists
|
||||
|
||||
RUN pacman-cross -S --noconfirm \
|
||||
mingw-w64-x86_64-boost \
|
||||
mingw-w64-x86_64-SDL2 \
|
||||
mingw-w64-x86_64-SDL2_image \
|
||||
mingw-w64-x86_64-SDL2_mixer \
|
||||
mingw-w64-x86_64-SDL2_ttf \
|
||||
mingw-w64-x86_64-pango
|
||||
|
||||
COPY get_dlls.py /scripts/get_dlls.py
|
||||
|
||||
ENTRYPOINT mkdir -p /build && cd /build && scons -j `nproc` arch=x86-64 prefix=/windows/mingw64 gtkdir=/windows/mingw64 host=x86_64-w64-mingw32 -Y /wesnoth && cp /build/wesnoth.exe /output/ && cp /build/wesnothd.exe /output/ && cd /output && python3 /scripts/get_dlls.py
|
||||
|
|
16
utils/dockerbuilds/travis/Dockerfile-base-mingw
Normal file
16
utils/dockerbuilds/travis/Dockerfile-base-mingw
Normal file
|
@ -0,0 +1,16 @@
|
|||
FROM rwgrim/msys2-cross
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y scons g++-mingw-w64-x86-64 pkg-config python3-pefile expect && \
|
||||
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists
|
||||
|
||||
RUN pacman-cross -S --noconfirm \
|
||||
mingw-w64-x86_64-boost \
|
||||
mingw-w64-x86_64-SDL2 \
|
||||
mingw-w64-x86_64-SDL2_image \
|
||||
mingw-w64-x86_64-SDL2_mixer \
|
||||
mingw-w64-x86_64-SDL2_ttf \
|
||||
mingw-w64-x86_64-pango
|
|
@ -26,6 +26,7 @@ BOOST_TEST="${11}"
|
|||
LTO="${12}"
|
||||
SAN="${13}"
|
||||
VALIDATE="${14}"
|
||||
TYPE="${15}"
|
||||
|
||||
if [ "$OPT" == "-O0" ]; then
|
||||
STRICT="true"
|
||||
|
@ -53,6 +54,8 @@ echo "MP_TEST: $MP_TEST"
|
|||
echo "BOOST_TEST: $BOOST_TEST"
|
||||
echo "LTO: $LTO"
|
||||
echo "SAN: $SAN"
|
||||
echo "VALIDATE: $VALIDATE"
|
||||
echo "TYPE: $TYPE"
|
||||
|
||||
echo "STRICT: $STRICT"
|
||||
echo "build_timeout(mins): $build_timeout"
|
||||
|
@ -65,6 +68,11 @@ if [ "$NLS" == "true" ]; then
|
|||
make clean
|
||||
|
||||
scons translations build=release --debug=time nls=true jobs=2
|
||||
elif [ "$TYPE" == "mingw" ]; then
|
||||
scons wesnoth wesnothd build=release \
|
||||
cxx_std=$CXXSTD opt="$OPT" strict="$STRICT" \
|
||||
nls=false enable_lto="$LTO" sanitize="$SAN" jobs=2 --debug=time \
|
||||
arch=x86-64 prefix=/windows/mingw64 gtkdir=/windows/mingw64 host=x86_64-w64-mingw32
|
||||
else
|
||||
SECONDS=0
|
||||
|
||||
|
|
|
@ -44,5 +44,5 @@ else
|
|||
--volume "$HOME"/build-cache:/home/wesnoth-travis/build \
|
||||
--volume "$HOME"/.ccache:/root/.ccache \
|
||||
--tty wesnoth-repo:"$LTS"-"$BRANCH" \
|
||||
unbuffer ./utils/travis/docker_run.sh "$NLS" "$TOOL" "$CC" "$CXX" "$CXXSTD" "$OPT" "$WML_TESTS" "$WML_TEST_TIME" "$PLAY_TEST" "$MP_TEST" "$BOOST_TEST" "$LTO" "$SAN" "$VALIDATE"
|
||||
unbuffer ./utils/travis/docker_run.sh "$NLS" "$TOOL" "$CC" "$CXX" "$CXXSTD" "$OPT" "$WML_TESTS" "$WML_TEST_TIME" "$PLAY_TEST" "$MP_TEST" "$BOOST_TEST" "$LTO" "$SAN" "$VALIDATE" "$LTS"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user