Files
OpenPrestige/.github/workflows/injector.yml
T
aidanandClaude Opus 5.5 05d169a2dd Sync local working tree: injector, engine, mixin and build updates
Add compatibility notes, resource-provider and hook checks, and payload
bundling script. Remove generated engine mixin stubs, engine target lists
and prebuilt binaries now produced by the build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-10 17:27:24 -06:00

171 lines
5.9 KiB
YAML

name: Injector
on:
workflow_dispatch:
push:
paths:
- "injector/**"
- "src/**"
- "scripts/**"
- "build.gradle"
- "settings.gradle"
- "stonecutter.gradle"
- "gradle.properties"
- "versions/**/gradle.properties"
- "gradle/**"
- "check/**"
- ".github/workflows/injector.yml"
jobs:
core-imgui:
name: ImGui (${{ matrix.platform }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: windows-x86_64
toolchain: windows-x86_64
- os: ubuntu-latest
platform: windows-aarch64
toolchain: windows-aarch64
- os: ubuntu-latest
platform: linux-x86_64
- os: ubuntu-latest
platform: linux-aarch64
toolchain: linux-aarch64
- os: macos-14
platform: macos-universal
toolchain: macos-universal
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- name: Install native build tools
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y cmake g++ g++-aarch64-linux-gnu
- name: Install Windows cross compiler
if: startsWith(matrix.platform, 'windows-')
run: |
curl -fL --retry 3 https://github.com/mstorsjo/llvm-mingw/releases/download/20261020/llvm-mingw-20261020-ucrt-ubuntu-22.04-x86_64.tar.xz -o "$RUNNER_TEMP/llvm-mingw.tar.xz"
tar -xf "$RUNNER_TEMP/llvm-mingw.tar.xz" -C "$RUNNER_TEMP"
echo "$RUNNER_TEMP/llvm-mingw-20261020-ucrt-ubuntu-22.04-x86_64/bin" >> "$GITHUB_PATH"
- name: Build core-only ImGui
env:
TOOLCHAIN: ${{ matrix.toolchain }}
run: |
if [ -n "$TOOLCHAIN" ]; then
python3 scripts/build_imgui_core.py --output "build/core-natives/${{ matrix.platform }}" --toolchain "scripts/imgui-core/toolchains/$TOOLCHAIN.cmake"
else
python3 scripts/build_imgui_core.py --output "build/core-natives/${{ matrix.platform }}"
fi
- name: Exercise core JNI with the UI font
if: matrix.platform == 'linux-x86_64' || matrix.platform == 'macos-universal'
run: |
java -Dimgui.library.path="$PWD/build/core-natives/${{ matrix.platform }}" -cp build/imgui-core/deps/imgui-java-binding-1.92.7.1.jar scripts/imgui-core/SmokeTest.java src/main/resources/prestige_ui/fonts/DMSans-Regular.ttf
- uses: actions/upload-artifact@v4
with:
name: imgui-${{ matrix.platform }}
path: build/core-natives/*
if-no-files-found: error
payload:
name: Payload jar
needs: core-imgui
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check release packaging
run: |
python3 scripts/test_release.py
python3 check/bundle_payloads_check.py
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- uses: actions/download-artifact@v4
with:
pattern: imgui-*
merge-multiple: true
path: build/core-natives
- name: Build remapped jar
run: |
chmod +x ./gradlew
./gradlew bundlePayloads -PpythonExecutable=python3 --console=plain
- name: Upload jar
uses: actions/upload-artifact@v4
with:
name: payload-bundle
path: build/bundle
if-no-files-found: error
injector:
name: OpenPrestige (${{ matrix.platform.target }})
needs: payload
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- os: windows-latest
target: x86_64-pc-windows-msvc
name: windows-x86_64
files: |
injector/target/release/OpenPrestigeInjector.exe
injector/target/release/prestige_native.dll
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
name: linux-x86_64
files: |
injector/target/release/OpenPrestigeInjector
injector/target/release/libprestige_native.so
- os: windows-11-arm
target: aarch64-pc-windows-msvc
name: windows-aarch64
files: |
injector/target/release/OpenPrestigeInjector.exe
injector/target/release/prestige_native.dll
- os: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
name: linux-aarch64
files: |
injector/target/release/OpenPrestigeInjector
injector/target/release/libprestige_native.so
- os: macos-13
target: x86_64-apple-darwin
name: macos-x86_64
files: |
injector/target/release/OpenPrestigeInjector
injector/target/release/libprestige_native.dylib
- os: macos-14
target: aarch64-apple-darwin
name: macos-aarch64
files: |
injector/target/release/OpenPrestigeInjector
injector/target/release/libprestige_native.dylib
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform.target }}
- name: Download payload jar
uses: actions/download-artifact@v4
with:
name: payload-bundle
path: build/bundle
- name: Build
run: cargo build --release --manifest-path injector/Cargo.toml
- name: Test
run: cargo test --manifest-path injector/Cargo.toml
- name: Upload injector
uses: actions/upload-artifact@v4
with:
name: openprestige-${{ matrix.platform.name }}
path: ${{ matrix.platform.files }}
if-no-files-found: error