Browse Source
A tool to run tests on a big-endian system. Uses an Alpine s390x Docker container.pull/5592/head
3 changed files with 35 additions and 0 deletions
@ -0,0 +1,13 @@
|
||||
FROM s390x/alpine |
||||
|
||||
# This command uses the `wget` from BusyBox. |
||||
RUN wget -nv -nc https://github.com/diasurgical/devilutionx-assets/releases/download/v2/spawn.mpq -P /opt/ |
||||
|
||||
# We use clang instead of GCC to have ASAN. GCC does not support ASAN with musl. |
||||
# We also need to install GCC because it provides crtbeginS.o: |
||||
# https://pkgs.alpinelinux.org/contents?file=crtbeginS.o&path=&name=gcc&branch=edge&repo=main&arch=s390x |
||||
RUN apk add --no-cache \ |
||||
clang15 gcc binutils musl-dev ninja cmake ccache sdl2-dev sdl2_image-dev fmt-dev \ |
||||
libpng-dev bzip2-dev gtest-dev |
||||
|
||||
ENV CC=/usr/bin/clang CXX=/usr/bin/clang++ |
||||
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash |
||||
|
||||
cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." |
||||
PARALLELISM="$(getconf _NPROCESSORS_ONLN)" |
||||
|
||||
set -xeuo pipefail |
||||
|
||||
if [[ "$(docker images -q devilutionx-s390x-test)" = "" ]]; then |
||||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes |
||||
docker build -f tools/Dockerfile.s390x -t devilutionx-s390x-test tools/ |
||||
fi |
||||
|
||||
# We disable ASAN and UBSAN for now because of: |
||||
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/14435 |
||||
docker run -u "$(id -u "$USER"):$(id -g "$USER")" --rm --mount "type=bind,source=${PWD},target=/host" devilutionx-s390x-test sh -c "cd /host && \ |
||||
export CCACHE_DIR=/host/.s390x-ccache && \ |
||||
cmake -S. -Bbuild-s390x-test -G Ninja -DASAN=OFF -DUBSAN=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ |
||||
-DNONET=ON -DNOSOUND=ON -DVERSION_NUM=1.0.0 -DVERSION_SUFFIX=FFFFFFF && \ |
||||
ln -sf /opt/spawn.mpq /host/build-s390x-test/spawn.mpq && \ |
||||
cmake --build build-s390x-test -j ${PARALLELISM} && \ |
||||
ctest --test-dir build-s390x-test --output-on-failure -j ${PARALLELISM}" |
||||
Loading…
Reference in new issue