From a86d7d08f0ea25693a16f1f3d1eed8765a8f5421 Mon Sep 17 00:00:00 2001 From: Peiikai <339721950+peiikai@users.noreply.github.com> Date: Sun, 15 Nov 2026 19:47:00 -0600 Subject: [PATCH 1/2] Nightly: signed update manifests and the Sparkle feed (as develop after #819) Scheduled nightlies run main's nightly.yml on develop's code, so main needs the same file. The scripts it calls (update_manifest.sh, sparkle_appcast.sh, nightly_publish.sh) come from the develop checkout. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/nightly.yml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index fa8db3dfa..a5a80a6f8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -78,9 +78,23 @@ jobs: echo "- Linux: \`linux-x86_64.AppImage\`, \`linux-aarch64.AppImage\`" echo "- Android: \`android.apk\`, installed as its own app, LAS Recomp Nightly, beside the release one" echo "- iPhone and iPad: \`iOS.laskit\`, made into the app with a nightly desktop build of the same date" + # Changes: the pull requests merged since the previous round, newest round first, with the earlier + # rounds' lists kept (the last 30), so a player several nightlies behind sees everything in the start + # screen's update dialog. Each round starts with a "nightly-changes: " line; the dialog shows the + # rounds newer than its own build (runtime/ui/update_notes.h). + CHANGES= if [ -n "$RSHA" ]; then - MERGES=$(gh api "repos/$GH_REPO/compare/$RSHA...$SHA" --jq '.commits[] | select(.parents | length > 1) | .commit.message | split("\n") | .[0]' 2>/dev/null | sed -n 's/^Merge pull request \(#[0-9]*\).*/\1/p' | tr '\n' ' ' || true) - [ -n "$MERGES" ] && { echo; echo "New since the previous nightly: $MERGES"; } + CHANGES=$(gh api "repos/$GH_REPO/compare/$RSHA...$SHA" --jq '.commits[] | select(.parents | length > 1) | .commit.message | capture("^Merge pull request #(?[0-9]+)[^\n]*\n\n(?[^\n]+)") | "- \(.t) (#\(.n))"' 2>/dev/null | tac || true) + fi + OLD=$(awk '/^$/ { n++ } n && n < 30 && !/^To report a problem/' <<< "$BODY" | sed '/^" + echo "**$(date -u -d "${STAMP::8}" '+%Y-%m-%d')**"; echo + echo "$CHANGES"; echo + fi + [ -n "$OLD" ] && echo "$OLD" fi echo echo "To report a problem, open an [issue]($URL/issues), say it's a nightly and which date, and attach the log (\`lasrecomp.log\` in the data folder)." @@ -161,6 +175,9 @@ jobs: find "$A" -type f \( -perm +111 -o -name '*.dylib' -o -name '*.so' \) | while read -r f; do if nm "$f" 2>/dev/null | grep ' _\{0,1\}f_70' >/dev/null; then echo "::error::game code in $f"; exit 1; fi done + - name: Sparkle feed + env: { UPDATE_SIGNING_KEY: '${{ secrets.UPDATE_SIGNING_KEY }}' } + run: tools/sparkle_appcast.sh nightly build/dist/*-macOS.dmg - name: Publish env: { GH_TOKEN: '${{ github.token }}', GH_REPO: '${{ github.repository }}' } run: tools/nightly_publish.sh build/dist/*-macOS.dmg macOS.dmg @@ -283,6 +300,9 @@ jobs: bad=$(find "$D" -type d \( -name extracted -o -name 'generated*' -o -name exefs -o -name romfs \); find "$D" -name '*.c' ! -path '*/zig/lib/*' ! -path '*/gamelib-src/gamelib_entry.c'; find "$D" -name 'lasgame*') [ -z "$bad" ] || { echo "::error::must not ship: $bad"; exit 1; } + - name: Update manifest + env: { UPDATE_SIGNING_KEY: '${{ secrets.UPDATE_SIGNING_KEY }}', VERSION: '${{ needs.plan.outputs.version }}' } + run: tools/update_manifest.sh "$VERSION" windows build/dist/*-windows.zip "build/dist/LAS Recomp" - name: Publish shell: bash # (Git Bash: gh is on its PATH, not MSYS2's) env: { GH_TOKEN: '${{ github.token }}', GH_REPO: '${{ github.repository }}' } @@ -349,6 +369,9 @@ jobs: bad=$(find "$D" -type d \( -name extracted -o -name 'generated*' -o -name exefs -o -name romfs \); find "$D" -name '*.c' ! -path '*/zig/lib/*' ! -path '*/gamelib-src/gamelib_entry.c'; find "$D" -name 'lasgame*') [ -z "$bad" ] || { echo "::error::must not ship: $bad"; exit 1; } + - name: Update manifest + env: { UPDATE_SIGNING_KEY: '${{ secrets.UPDATE_SIGNING_KEY }}', VERSION: '${{ needs.plan.outputs.version }}' } + run: tools/update_manifest.sh "$VERSION" windows-arm64 build/dist/*-windows-arm64.zip "build/dist/LAS Recomp" - name: Publish shell: bash # (Git Bash: gh is on its PATH, not MSYS2's) env: { GH_TOKEN: '${{ github.token }}', GH_REPO: '${{ github.repository }}' } @@ -404,6 +427,9 @@ jobs: find "$A" -type f \( -perm /111 -o -name '*.so*' \) | while read -r f; do if readelf -Ws --wide "$f" 2>/dev/null | grep ' f_70' >/dev/null; then echo "::error::game code in $f"; exit 1; fi done + - name: Update manifest + env: { UPDATE_SIGNING_KEY: '${{ secrets.UPDATE_SIGNING_KEY }}', VERSION: '${{ needs.plan.outputs.version }}' } + run: tools/update_manifest.sh "$VERSION" linux-${{ matrix.arch }} build/dist/*-linux-${{ matrix.arch }}.AppImage - name: Publish env: { GH_TOKEN: '${{ github.token }}', GH_REPO: '${{ github.repository }}' } run: tools/nightly_publish.sh build/dist/*-linux-${{ matrix.arch }}.AppImage linux-${{ matrix.arch }}.AppImage From f36d7cf01f48ffb2aea73787d762c552ed5f1d3e Mon Sep 17 00:00:00 2001 From: Peiikai <339721950+peiikai@users.noreply.github.com> Date: Sun, 15 Nov 2026 17:07:32 -0600 Subject: [PATCH 2/2] Tests: find SDL3 through pkgconf when pkg-config has no .exe MSYS2's pkgconf 3.0.11 installs pkg-config and the target-prefixed names as links without .exe; only pkgconf.exe keeps the extension. Bash still runs them, but Python's shutil.which on Windows only matches PATHEXT names, so the delete guard and data move tests built without SDL3 flags and failed to link on windows-arm64. Fall back to pkgconf. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 9db711d730678694dcbd5931b9f2fae4da5ff40e) Co-Authored-By: Claude Opus 5.5 --- tools/test_data_move.py | 5 +++-- tools/test_delete_guard.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/test_data_move.py b/tools/test_data_move.py index 07e35d846..6eee2f2db 100644 --- a/tools/test_data_move.py +++ b/tools/test_data_move.py @@ -17,8 +17,9 @@ deps = os.environ.get('DEPS') # (a prefix with SDL3, as for make DEPS=) if deps: flags = [f'-I{deps}/include', f'-L{deps}/lib', f'-Wl,-rpath,{deps}/lib', '-lSDL3'] -elif shutil.which('pkg-config') and subprocess.run(['pkg-config', '--exists', 'sdl3']).returncode == 0: - flags = shlex.split(subprocess.run(['pkg-config', '--cflags', '--libs', 'sdl3'], capture_output=True, text=True, +# MSYS2's pkgconf 3.0.11 installs pkg-config without .exe, which shutil.which can't find on Windows; pkgconf.exe stays +elif (pc := shutil.which('pkg-config') or shutil.which('pkgconf')) and subprocess.run([pc, '--exists', 'sdl3']).returncode == 0: + flags = shlex.split(subprocess.run([pc, '--cflags', '--libs', 'sdl3'], capture_output=True, text=True, check=True).stdout) elif sys.platform == 'darwin': brew = subprocess.run(['brew', '--prefix'], capture_output=True, text=True).stdout.strip() or '/opt/homebrew' diff --git a/tools/test_delete_guard.py b/tools/test_delete_guard.py index 893f123a6..d4051c2f1 100644 --- a/tools/test_delete_guard.py +++ b/tools/test_delete_guard.py @@ -14,8 +14,9 @@ deps = os.environ.get('DEPS') # (a prefix with SDL3, as for make DEPS=) if deps: flags = [f'-I{deps}/include', f'-L{deps}/lib', f'-Wl,-rpath,{deps}/lib', '-lSDL3'] -elif shutil.which('pkg-config') and subprocess.run(['pkg-config', '--exists', 'sdl3']).returncode == 0: - flags = shlex.split(subprocess.run(['pkg-config', '--cflags', '--libs', 'sdl3'], capture_output=True, text=True, +# MSYS2's pkgconf 3.0.11 installs pkg-config without .exe, which shutil.which can't find on Windows; pkgconf.exe stays +elif (pc := shutil.which('pkg-config') or shutil.which('pkgconf')) and subprocess.run([pc, '--exists', 'sdl3']).returncode == 0: + flags = shlex.split(subprocess.run([pc, '--cflags', '--libs', 'sdl3'], capture_output=True, text=True, check=True).stdout) elif sys.platform == 'darwin': brew = subprocess.run(['brew', '--prefix'], capture_output=True, text=True).stdout.strip() or '/opt/homebrew'