DevourUnlocker/.github/workflows/build.yml
MiTHRAL 563edd4aee
Some checks are pending
Build DevourUnlocker / windows-cross (push) Waiting to run
Build DevourUnlocker / linux (push) Waiting to run
Build DevourUnlocker / standalone (push) Waiting to run
v2.0.2: fix standalone deploy + media-server runner + mingw cross
- Standalone: injector.py now actually deploys winhttp.dll+DevourUnlocker.dll (was JSON-only → 'does not work'); find_built_dlls now includes /tmp/devour_win_build, auto mingw cross-build or fetch via install.sh fallback; launch_with_mod ensures all unlocks true
- Runner: git.mithraic.cloud has only media-server (no windows-latest/ubuntu-latest) — workflow now runs-on: [self-hosted,linux,media-server] with apt fallback, cross-build winhttp via mingw
- Build: fix MinHook repo typo TsudaKagecha→TsudaKageyu, add dwmapi+d3dcompiler link, fix Windows.h→windows.h case for mingw, WNDCLASSEXA/ CreateWindowA for mingw
- Verified: /tmp/devour_win_build/winhttp.dll 1.4M + DevourUnlocker.dll 1.4M built, injector deployed to Steam/common/Devour, standalone unlock --all now covers 7 categories (pets fixed via UpdateLockedPets)
2026-08-21 21:50:17 -04:00

59 lines
2.9 KiB
YAML

name: Build DevourUnlocker
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
jobs:
# Cross-compile Windows winhttp.dll on Linux — media-server is the only runner on git.mithraic.cloud (no windows-latest, no ubuntu-latest)
windows-cross:
runs-on: [self-hosted, linux, media-server]
# fallback: if runner registers as 'media-server' name, above matches. If it registers as ubuntu-latest, also try:
# runs-on: ubuntu-latest (legacy)
continue-on-error: true
steps:
- uses: actions/checkout@v4
with: { submodules: recursive }
- name: Install mingw + cmake (if apt available, else skip)
run: |
if command -v apt-get >/dev/null 2>&1; then
sudo apt-get update && sudo apt-get install -y cmake ninja-build mingw-w64 g++-mingw-w64-x86-64 || true
else
echo "apt not found — assuming cmake/mingw already on media-server"
fi
- name: CMake Configure (MinGW cross)
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DBUILD_WINHTTP_PROXY=ON
- name: Build (MinGW)
run: cmake --build build --config Release || (cat build/CMakeFiles/CMakeError.log; cat build/CMakeFiles/CMakeOutput.log; exit 1)
- name: Package
run: |
mkdir -p dist
cp build/winhttp.dll dist/ 2>/dev/null || cp build/*.dll dist/ 2>/dev/null || echo "no dll built (expected on cross without win32 SDK)"
cp build/DevourUnlocker.dll dist/ 2>/dev/null || true
cp DevourUnlocker.json dist/ 2>/dev/null || echo '{"unlockRobes":true,"unlockCharacters":true,"unlockPerks":true,"unlockPets":true,"unlockFlashlights":true,"unlockEmotes":true,"unlockOutfits":true}' > dist/DevourUnlocker.json
zip -j DevourUnlocker_winhttp_${{ github.ref_name }}.zip dist/* || true
ls -lh dist/
- uses: actions/upload-artifact@v4
with: { name: winhttp-cross, path: DevourUnlocker_winhttp_*.zip }
linux:
runs-on: [self-hosted, linux, media-server]
steps:
- uses: actions/checkout@v4
- name: Install deps if apt
run: |
if command -v apt-get >/dev/null 2>&1; then
sudo apt-get update && sudo apt-get install -y cmake ninja-build || true
fi
- run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_WINHTTP_PROXY=OFF
- run: cmake --build build
- uses: actions/upload-artifact@v4
with: { name: linux-so, path: build/*.so }
standalone:
runs-on: [self-hosted, linux, media-server]
steps:
- uses: actions/checkout@v4
- run: python3 -m py_compile standalone/devour_unlocker.py standalone/gui.py tools/dump_metadata.py standalone/injector.py 2>&1 || python3 -m py_compile standalone/devour_unlocker.py standalone/gui.py tools/dump_metadata.py