Files
ashlar/docker/ashlar-build.sh
claudeandClaude Opus 5.5 26cedd8beb
Build and test / Ubuntu (push) Failing after 1h6m25s
Reusable Windows workflow / windows-${{ inputs.image }} (push) Canceled after 0s
Build and test / MacOS (map[image:macos-26-intel]) (push) Canceled after 0s
Build and test / MacOS (map[image:macos-26]) (push) Canceled after 0s
Build and test / Windows (2022) (push) Canceled after 0s
Reusable MacOS workflow / ${{ inputs.image }} (push) Canceled after 0s
Start Ashlar: add project docs and Docker build
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 11:13:22 -05:00

37 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Builds the Ashlar engine and unit tests in Docker, then runs the tests.
set -euo pipefail
repo="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cache="${ASHLAR_CACHE_DIR:-$HOME/.cache/ashlar}"
jobs="${JOBS:-3}"
memory="${MEMORY:-6g}"
image="ashlar-build:trixie"
mkdir -p "$cache/build" "$cache/ccache"
docker build -t "$image" -f "$repo/docker/Dockerfile.ashlar" "$repo/docker"
docker run --rm \
--memory="$memory" \
--user "$(id -u):$(id -g)" \
--env HOME=/tmp \
--env CCACHE_DIR=/cache/ccache \
--volume "$repo:/src:ro" \
--volume "$cache:/cache" \
"$image" bash -euc "
cmake -S /src -B /cache/build -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DOPENMW_USE_SYSTEM_MYGUI=OFF \
-DBUILD_LAUNCHER=OFF \
-DBUILD_OPENCS=OFF \
-DBUILD_WIZARD=OFF \
-DBUILD_COMPONENTS_TESTS=ON \
-DBUILD_OPENMW_TESTS=ON
cmake --build /cache/build -j '$jobs'
cd /cache/build
./components-tests
./openmw-tests
"