Build and package Dreierpack Manager for macOS arm64

A workflow builds the dreierpack target on Apple Silicon, runs the
synthetic interface checks and uploads a package with the program, the
interface assets, licences and a start script. The world and the image
resources are copied in by the player.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-14 08:53:01 +01:00
1 parent dd42b0a98e
commit 78f45fb188
2 files changed
+88

No files matched your search

+61
View File
@@ -0,0 +1,61 @@
# SPDX-License-Identifier: GPL-3.0-only
name: Dreierpack macOS arm64
on:
workflow_dispatch:
push:
branches: ['finish/**']
paths:
- 'src/**'
- 'assets/modern/**'
- 'assets/launcher/**'
- 'CMakeLists.txt'
- 'docs/release/dreierpack/**'
- '.github/workflows/dreierpack-macos.yml'
permissions:
contents: read
concurrency:
group: dreierpack-macos-${{ github.ref }}
cancel-in-progress: true
jobs:
package:
runs-on: macos-14
timeout-minutes: 90
env:
SDL_VIDEODRIVER: dummy
SDL_AUDIODRIVER: dummy
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Configure arm64
run: |
test "$(uname -m)" = arm64
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DOPENBMH_BUILD_MODERN_UI=ON -DOPENBMH_BUILD_EDITOR=OFF -DBMH_DATA=
- name: Build the program and its synthetic checks
run: cmake --build build --target dreierpack modern_ui_core_tests modern_live_ui_tests modern_post_match_ui_tests modern_opening_ui_tests modern_entry_ui_tests modern_control_layout_tests modern_engine_dto_tests --parallel 3
- name: Run the synthetic checks
run: ctest --test-dir build -R "^modern_(ui_core|live_ui|post_match_ui|opening_ui|entry_ui|control_layout|engine_dto)_tests$" -LE external-data --output-on-failure
- name: Assemble the package
run: |
set -euo pipefail
out="dist/Dreierpack-Manager-macos-arm64"
mkdir -p "$out/assets"
cp build/Dreierpack "$out/"
cp -R build/assets/modern "$out/assets/modern"
cp -R build/assets/launcher "$out/assets/launcher"
cp LICENSE THIRD_PARTY_NOTICES.md "$out/"
cp -R docs/licenses "$out/licenses"
cp docs/release/dreierpack/LIESMICH-macos.txt "$out/LIESMICH.txt"
printf '#!/bin/sh\ncd "$(dirname "$0")" && exec ./Dreierpack "$@"\n' > "$out/Dreierpack starten.command"
chmod +x "$out/Dreierpack" "$out/Dreierpack starten.command"
file "$out/Dreierpack" | grep -q arm64
codesign --force --sign - "$out/Dreierpack"
"$out/Dreierpack" --version
otool -L "$out/Dreierpack"
(cd dist && ditto -c -k --keepParent "Dreierpack-Manager-macos-arm64" "Dreierpack-Manager-macos-arm64.zip")
- name: Upload the package
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: Dreierpack-Manager-macos-arm64
path: dist/Dreierpack-Manager-macos-arm64.zip
if-no-files-found: error