Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: <stamp>" 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 #(?<n>[0-9]+)[^\n]*\n\n(?<t>[^\n]+)") | "- \(.t) (#\(.n))"' 2>/dev/null | tac || true)
fi
OLD=$(awk '/^<!-- nightly-changes: [0-9][0-9]* -->$/ { n++ } n && n < 30 && !/^To report a problem/' <<< "$BODY" | sed '/^<!-- nightly-round:/,$d')
if [ -n "$CHANGES" ] || [ -n "$OLD" ]; then
echo; echo "## Changes"; echo
if [ -n "$CHANGES" ]; then
echo "<!-- nightly-changes: $STAMP -->"
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)."
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}' }
Expand Down Expand Up @@ -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 }}' }
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions tools/test_data_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
5 changes: 3 additions & 2 deletions tools/test_delete_guard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Loading