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 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'