Initial public OpenBMH 0.1 source (by Codex)
This commit is contained in:
commit
558fbf166b
613 files changed
+168029
No files matched your search
@@ -0,0 +1,93 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
name: Build without game data
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- runner: ubuntu-24.04
|
||||
platform: linux-x64
|
||||
- runner: windows-2022
|
||||
platform: windows-x64
|
||||
- runner: macos-14
|
||||
platform: macos-arm64
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 90
|
||||
env:
|
||||
SDL_VIDEODRIVER: dummy
|
||||
SDL_AUDIODRIVER: dummy
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- name: Install Linux build dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get update && sudo apt-get install -y build-essential git cmake ninja-build pkg-config libgtk-3-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxfixes-dev libxss-dev libasound2-dev libpulse-dev libgl1-mesa-dev libudev-dev
|
||||
- name: Verify source export
|
||||
run: python3 tools/public_release/check_public_tree.py --root . --history
|
||||
- name: Set up MSVC x64
|
||||
if: runner.os == 'Windows'
|
||||
uses: ilammy/msvc-dev-cmd@a102174a2b586eec2ea151a69e6fd14404a8ce7c # v1.13.0
|
||||
with:
|
||||
arch: x64
|
||||
- name: Configure Windows x64
|
||||
if: runner.os == 'Windows'
|
||||
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBMH_DATA= -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||
- name: Configure Linux
|
||||
if: runner.os == 'Linux'
|
||||
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBMH_DATA= -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSDL_ALSA=ON -DSDL_PULSEAUDIO=ON -DSDL_X11=ON
|
||||
- name: Verify Linux audio and video backends
|
||||
if: runner.os == 'Linux'
|
||||
shell: python
|
||||
run: |
|
||||
import pathlib, re
|
||||
required = ['SDL_AUDIO_DRIVER_ALSA', 'SDL_AUDIO_DRIVER_PULSEAUDIO', 'SDL_VIDEO_DRIVER_X11']
|
||||
headers = list(pathlib.Path('build/_deps/sdl2-build').rglob('SDL_config.h'))
|
||||
assert any(all(re.search(r'^#define\s+' + macro + r'\s+1\s*$', p.read_text(), re.M) for macro in required) for p in headers), 'ALSA/PulseAudio/X11 were not configured into SDL'
|
||||
- name: Configure macOS arm64
|
||||
if: runner.os == 'macOS'
|
||||
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 -DBMH_DATA= -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||
- name: Build every target
|
||||
run: cmake --build build --config Release --parallel 2
|
||||
- name: Run synthetic tests and report data tests as skipped
|
||||
run: ctest --test-dir build -C Release --output-on-failure --output-junit test-results.xml
|
||||
- name: Package products and licenses
|
||||
run: python3 tools/package/make_package.py --build build --out dist --platform ${{ matrix.platform }}
|
||||
- name: Package corresponding source and pinned dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: python3 tools/package/make_source_package.py --source . --build build --out source-dist
|
||||
- name: Upload corresponding source
|
||||
if: runner.os == 'Linux'
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: OpenBMH-source
|
||||
path: source-dist/*.zip
|
||||
if-no-files-found: error
|
||||
- name: Upload package
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: OpenBMH-${{ matrix.platform }}
|
||||
path: dist/*.zip
|
||||
if-no-files-found: error
|
||||
- name: Upload test report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: tests-${{ matrix.platform }}
|
||||
path: build/test-results.xml
|
||||
if-no-files-found: warn
|
||||
@@ -0,0 +1,40 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
name: Prepare release packages
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/ci.yml
|
||||
draft:
|
||||
needs: build
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||
with:
|
||||
pattern: OpenBMH-*
|
||||
path: dist
|
||||
merge-multiple: true
|
||||
- name: Create draft for review
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
RELEASE_TAG: ${{ github.ref_name }}
|
||||
run: |
|
||||
for package in dist/*.zip; do
|
||||
case "$(basename "$package")" in
|
||||
OpenBMH-${RELEASE_TAG#v}-*.zip) ;;
|
||||
*) echo "Release tag and package version differ" >&2; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
gh release create "$RELEASE_TAG" dist/*.zip --draft --verify-tag --title "OpenBMH $RELEASE_TAG" --notes-file docs/release/0.1/RELEASE_NOTES.md
|
||||
Reference in new issue
Block a user