Skip to content

Commit

Permalink
Add steam runtime job to travis.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pentarctagon committed Nov 19, 2019
1 parent 16f93cd commit 1a2be4b
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -33,6 +33,8 @@ matrix:
env: TOOL=cmake CXXSTD=14 NLS=false LTS=1604 BRANCH=master

- env: CXXSTD=14 NLS=false LTS=mingw BRANCH=master STRICT=false

- env: CXXSTD=14 NLS=false LTS=steamrt BRANCH=master CC=gcc-5 CXX=g++-5

- os: osx
compiler: clang
Expand Down
2 changes: 1 addition & 1 deletion utils/dockerbuilds/make_steam_build
Expand Up @@ -4,4 +4,4 @@ cd steamrt
docker build -t steamos-wesnoth .
rm -rf ../steambuild
mkdir ../steambuild
docker run -it -v "$PWD"/../../..:/wesnoth -v "$PWD"/../steambuild:/output --tmpfs /build:exec -u $UID steamos-wesnoth
docker run -it -v "$PWD"/../../..:/wesnoth -v "$PWD"/../steambuild:/output --tmpfs /build:exec -u "$UID" steamos-wesnoth
18 changes: 18 additions & 0 deletions utils/dockerbuilds/make_steam_image
@@ -0,0 +1,18 @@
#!/bin/sh -xe

VALVEFILE=com.valvesoftware.SteamRuntime.Sdk-amd64,i386-scout-sysroot.Dockerfile
VALVETAR=com.valvesoftware.SteamRuntime.Sdk-amd64,i386-scout-sysroot.tar.gz
DOCKERBASEIMAGE=steamrt_scout_amd64
DOCKERLOCALIMAGE=wesnoth/wesnoth:steamrt-master
DOCKERLOCALFILE=./travis/Dockerfile-base-steamrt

if [ ! -f $VALVEFILE ]; then
wget http://repo.steampowered.com/steamrt-images-scout/snapshots/0.20190608.0/$VALVEFILE
fi
if [ ! -f $VALVETAR ]; then
wget http://repo.steampowered.com/steamrt-images-scout/snapshots/0.20190608.0/$VALVETAR
fi

docker build -t $DOCKERBASEIMAGE -f $VALVEFILE .

docker build -t $DOCKERLOCALIMAGE -f $DOCKERLOCALFILE .
11 changes: 1 addition & 10 deletions utils/dockerbuilds/steamrt/Dockerfile
@@ -1,15 +1,6 @@
FROM steamrt_scout_amd64
FROM wesnoth/wesnoth:steamrt-master
ENV DEBIAN_FRONTEND=noninteractive
ARG BOOST_VERSION=1.66.0
ARG BOOST_VERSION_=1_66_0

RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y scons libicu-dev libreadline-dev

RUN wget --max-redirect 3 https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_}.tar.gz
RUN mkdir -p /src/boost && tar zxf boost_${BOOST_VERSION_}.tar.gz -C /src/boost --strip-components=1
RUN cd /src/boost && ./bootstrap.sh --with-libraries=iostreams,regex,system,filesystem,program_options,random,locale && ./b2 toolset=gcc-5 --layout=system link=static variant=release cxxflags='-fPIE -fstack-protector-strong' define=_FORTIFY_SOURCE=2 install

COPY start.sh /staging/start.sh
RUN mkdir /staging/lib64 && cp /lib/libicu*.so.* /lib/x86_64-linux-gnu/libhistory.so.6 /staging/lib64/

ENTRYPOINT mkdir -p /build && cd /build && scons -j `nproc` ctool=gcc-5 cxxtool=g++-5 boostdir=/usr/local/include boostlibdir=/usr/local/lib extra_flags_config=-lrt -Y /wesnoth && cp /build/wesnoth /output/ && cp /build/wesnothd /output/ && cp -r /staging/* /output/
12 changes: 12 additions & 0 deletions utils/dockerbuilds/travis/Dockerfile-base-steamrt
@@ -0,0 +1,12 @@
FROM steamrt_scout_amd64
ENV DEBIAN_FRONTEND=noninteractive
ARG BOOST_VERSION=1.66.0
ARG BOOST_VERSION_=1_66_0

RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y scons libicu-dev libreadline-dev expect-dev

RUN wget --max-redirect 3 https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_}.tar.gz
RUN mkdir -p /src/boost && tar zxf boost_${BOOST_VERSION_}.tar.gz -C /src/boost --strip-components=1
RUN cd /src/boost && ./bootstrap.sh --with-libraries=iostreams,regex,system,filesystem,program_options,random,locale && ./b2 toolset=gcc-5 --layout=system link=static variant=release cxxflags='-fPIE -fstack-protector-strong' define=_FORTIFY_SOURCE=2 install

RUN mkdir -p /staging/lib64 && cp /lib/libicu*.so.* /lib/x86_64-linux-gnu/libhistory.so.6 /staging/lib64/
4 changes: 4 additions & 0 deletions utils/travis/docker_run.sh
Expand Up @@ -73,6 +73,10 @@ elif [ "$TYPE" == "mingw" ]; then
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
elif [ "$TYPE" == "steamrt" ]; then
scons ctool=$CC cxxtool=$CXX boostdir=/usr/local/include boostlibdir=/usr/local/lib extra_flags_config=-lrt \
cxx_std=$CXXSTD opt="$OPT" strict="$STRICT" nls=false enable_lto="$LTO" sanitize="$SAN" jobs=2 --debug=time \
build=release
else
SECONDS=0

Expand Down

0 comments on commit 1a2be4b

Please sign in to comment.