Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21e2305b2a | ||
|
|
687ff0e2f1 | ||
|
|
d2d2d81faf | ||
|
|
d7d5cfb731 | ||
|
|
667e496704 | ||
|
|
1cf50721bf | ||
|
|
1a9cf60fb8 | ||
|
|
184906f22a | ||
|
|
c65393957c | ||
|
|
5adb50fd4b | ||
|
|
cc3adfaa20 | ||
|
|
85d1aea1f1 | ||
|
|
20f34c16ec | ||
|
|
67fabf417e | ||
|
|
7184affda2 | ||
|
|
cc9cd1fc17 | ||
|
|
340c573354 | ||
|
|
180c7bcfe6 | ||
|
|
476f762536 | ||
|
|
b78cb2f8c5 | ||
|
|
f20aab6490 | ||
|
|
451dc347e5 | ||
|
|
3645f5fb64 | ||
|
|
e2ca2f5db3 | ||
|
|
ff50d74ae2 | ||
|
|
dca5d8c23c | ||
|
|
28c9643945 | ||
|
|
71247c4cce | ||
|
|
dc0de23a20 | ||
|
|
b3d3338e7a | ||
|
|
c42bb95c9c | ||
|
|
fe9dfc0cee | ||
|
|
0152be3897 | ||
|
|
5815f8f9a7 | ||
|
|
b27167c272 | ||
|
|
3c279b3a6e | ||
|
|
53c83c1d3f | ||
|
|
49fb91c4da | ||
|
|
9472783ea2 | ||
|
|
afb26123a8 | ||
|
|
d07063a8a3 | ||
|
|
557d0fb96e | ||
|
|
92da74b1ef | ||
|
|
1d52df095d | ||
|
|
a76ec3f932 | ||
|
|
6bc60d05ec | ||
|
|
8c1e541ca0 | ||
|
|
c79139bba7 | ||
|
|
85f1b9f386 | ||
|
|
686550548b | ||
|
|
d9013c6ef8 | ||
|
|
a8856948fb | ||
|
|
e429d102d0 | ||
|
|
12e2f8cc9e | ||
|
|
ebda00417e | ||
|
|
f1b4642ff2 | ||
|
|
94242e5c8d | ||
|
|
a724e1cac9 | ||
|
|
801eb84c9a | ||
|
|
df980ada26 | ||
|
|
d66fb643d6 | ||
|
|
570937341a | ||
|
|
9870468e81 | ||
|
|
482cd10055 | ||
|
|
9b138709b2 | ||
|
|
8a520e406d | ||
|
|
2179d08d88 | ||
|
|
7b493fd8f1 | ||
|
|
ca6c14de9a | ||
|
|
f951538ae4 | ||
|
|
df650510f0 | ||
|
|
09854eb1fc | ||
|
|
6058dcee1a | ||
|
|
511c64d2cf | ||
|
|
5973c6a8aa | ||
|
|
c3b07b3ed5 | ||
|
|
deeea17749 | ||
|
|
4031323970 | ||
|
|
1e3c3d05e8 | ||
|
|
1d087b6f1f | ||
|
|
82a6af51bb | ||
|
|
ef50574096 | ||
|
|
42d9f4885d | ||
|
|
21f99a8473 | ||
|
|
11e4928d88 | ||
|
|
0840a7d42e | ||
|
|
cc41196527 | ||
|
|
d669cbe12f | ||
|
|
29d06e1f28 | ||
|
|
b5452a10aa | ||
|
|
68f979cd57 | ||
|
|
6b6c740d28 | ||
|
|
ceb8f0c138 | ||
|
|
2dd6388aca | ||
|
|
1dc3bcea0c | ||
|
|
8e38f813fd | ||
|
|
3771ac495f | ||
|
|
3a1ab37045 | ||
|
|
1e6b2bf70b | ||
|
|
1e3e3b90ac | ||
|
|
dce8f8aa67 | ||
|
|
8b7d7439ae | ||
|
|
ba989316ce | ||
|
|
66aed9c697 | ||
|
|
7661a9bef9 | ||
|
|
0c63b90dbc | ||
|
|
5d93a77a67 | ||
|
|
19b7937dcb | ||
|
|
371acbaf10 | ||
|
|
59a474471e | ||
|
|
34a015e91e | ||
|
|
8c17283691 | ||
|
|
e7995c94bf | ||
|
|
0ebd9d2f6b | ||
|
|
7c3594c601 | ||
|
|
7c87ff27ce | ||
|
|
c69183af80 | ||
|
|
1187a28b87 | ||
|
|
7dabd98719 | ||
|
|
22e21cefd3 | ||
|
|
d2d8c3e55c | ||
|
|
2024e270fd | ||
|
|
fb874acadf | ||
|
|
723c58e08c | ||
|
|
dbe5f75ab5 | ||
|
|
e22d26bf82 | ||
|
|
2a8cb689e0 | ||
|
|
af0365cc78 | ||
|
|
6a8206d4b5 | ||
|
|
2eb6e91717 | ||
|
|
b2a383111e | ||
|
|
b19e7d53ef | ||
|
|
b829dcde90 | ||
|
|
8d9cb8f4a2 |
No files matched your search
@@ -0,0 +1,299 @@
|
||||
name: Downloads
|
||||
run-name: Shovey downloads ${{ github.sha }}
|
||||
|
||||
# Shovey's own lane on the Build host builds, signs and plays our downloads
|
||||
# from the exact commit with the tools that machine has, and publishes only
|
||||
# after all of it passed. No container or VM: the jobs run one at a time as
|
||||
# the lane's account and hand their files on through its private state
|
||||
# (~/handoff), which no other repository's jobs can read. The F-Droid and
|
||||
# Google Play editions belong to the GitHub workflows: GitHub's Downloads
|
||||
# attaches them to the mirrored release and play-bundle.yml uploads the
|
||||
# bundle to Google Play.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
rehearse:
|
||||
description: Build, sign and play every download without publishing
|
||||
type: boolean
|
||||
default: true
|
||||
push:
|
||||
branches: [master]
|
||||
paths:
|
||||
- .gitea/workflows/downloads.yml
|
||||
- scripts/downloads-release.py
|
||||
- version.json
|
||||
permissions:
|
||||
contents: write
|
||||
concurrency:
|
||||
group: shovey-release
|
||||
cancel-in-progress: false
|
||||
env:
|
||||
JAVA_HOME: /usr/lib/jvm/java-21-openjdk-amd64
|
||||
ANDROID_HOME: /usr/local/lib/gitea-native/android-sdk
|
||||
ANDROID_SDK_ROOT: /usr/local/lib/gitea-native/android-sdk
|
||||
YUE_DESKTOP_RECOVERY: '0'
|
||||
HARMONY_DESKTOP_RECOVERY: '0'
|
||||
jobs:
|
||||
due:
|
||||
name: Decide whether this version needs its downloads
|
||||
runs-on: build-native-shovey
|
||||
timeout-minutes: 10
|
||||
outputs:
|
||||
build: ${{ steps.due.outputs.build }}
|
||||
version: ${{ steps.due.outputs.version }}
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
# This runner and Gitea share Build; keep source traffic on loopback.
|
||||
github-server-url: http://127.0.0.1:3000
|
||||
persist-credentials: false
|
||||
sparse-checkout: |
|
||||
scripts/downloads-release.py
|
||||
scripts/android-release.py
|
||||
tests/downloads_release_test.py
|
||||
version.json
|
||||
ziran.lock
|
||||
src/CHANGELOG.md
|
||||
sparse-checkout-cone-mode: false
|
||||
- name: Test publication gates
|
||||
run: |
|
||||
mkdir -p build
|
||||
python3 tests/downloads_release_test.py
|
||||
- name: Build only an unpublished version or a rehearsal
|
||||
id: due
|
||||
env:
|
||||
REHEARSE: ${{ inputs.rehearse == true || inputs.rehearse == 'true' }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
version=$(python3 -c 'import json; print(json.load(open("version.json"))["version"])')
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
# A draft is invisible without a token, so only a public release answers.
|
||||
state=$(curl --silent --show-error --max-time 30 --output /dev/null --write-out '%{http_code}' \
|
||||
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/releases/tags/v$version")
|
||||
case "$state:$REHEARSE" in
|
||||
200:false) echo "Shovey $version is already public; its downloads stay unchanged."
|
||||
echo 'build=false' >> "$GITHUB_OUTPUT"; exit 0 ;;
|
||||
200:true | 404:*) echo 'build=true' >> "$GITHUB_OUTPUT" ;;
|
||||
*) echo "::error::Gitea answered $state for release v$version"; exit 1 ;;
|
||||
esac
|
||||
# The package cache follows the lock; another lock's packages are never reused.
|
||||
lock=$(sha256sum ziran.lock | cut -d' ' -f1)
|
||||
mkdir -p "$XDG_CACHE_HOME"
|
||||
if [ "$(cat "$XDG_CACHE_HOME/shovey-lock" 2>/dev/null || true)" != "$lock" ]; then
|
||||
rm -rf "$XDG_CACHE_HOME/ziran" "$XDG_CACHE_HOME/ziran-native" "$XDG_CACHE_HOME/avif-tools"
|
||||
echo "$lock" > "$XDG_CACHE_HOME/shovey-lock"
|
||||
fi
|
||||
# A first build after a lock change fetches every package next to Gitea's own data.
|
||||
rm -rf "$HOME/handoff"
|
||||
free=$(df -B1M --output=avail "$HOME" | tail -n1)
|
||||
if [ "$free" -lt 6144 ]; then
|
||||
echo "::error::Build has $free MiB free; Shovey's downloads need 6 GiB"; exit 1
|
||||
fi
|
||||
mkdir -p "$HOME/handoff/$GITHUB_RUN_ID/downloads"
|
||||
echo "$GITHUB_SHA" > "$HOME/handoff/$GITHUB_RUN_ID/revision"
|
||||
|
||||
android:
|
||||
name: Signed APK of the normal edition
|
||||
needs: due
|
||||
if: needs.due.outputs.build == 'true'
|
||||
runs-on: build-native-shovey
|
||||
timeout-minutes: 115
|
||||
env:
|
||||
VERSION: ${{ needs.due.outputs.version }}
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
# This runner and Gitea share Build; keep source traffic on loopback.
|
||||
github-server-url: http://127.0.0.1:3000
|
||||
persist-credentials: false
|
||||
- name: Select the installed Android tools and the lane's package cache
|
||||
run: bash scripts/native-ci.sh android
|
||||
# The build is the normal edition; it has no self-update.
|
||||
- name: Verify every published level has a playable hint
|
||||
run: make -j1 hints-loading-test
|
||||
- name: Build the release APK
|
||||
run: make android-fdroid
|
||||
# Only the Google Play edition may name a Google library, in its build
|
||||
# files as in its APK.
|
||||
- name: Keep Google libraries out of the normal edition
|
||||
run: python3 "$KRYON/scripts/check-google-free.py" --source . build/fdroid/shovey.apk
|
||||
- name: Sign and check the APK
|
||||
env:
|
||||
KEYSTORE: ${{ secrets.SHOVEY_ANDROID_KEYSTORE }}
|
||||
PASSWORD: ${{ secrets.SHOVEY_ANDROID_KEYSTORE_PASSWORD }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
umask 077
|
||||
test -n "$KEYSTORE" && test -n "$PASSWORD"
|
||||
trap 'rm -f "$RUNNER_TEMP/shovey-release.p12" "$RUNNER_TEMP/password"' EXIT
|
||||
printf '%s' "$KEYSTORE" | base64 -d > "$RUNNER_TEMP/shovey-release.p12"
|
||||
printf '%s\n' "$PASSWORD" > "$RUNNER_TEMP/password"
|
||||
python3 scripts/android-release.py sign build/fdroid/shovey.apk --version "$VERSION" \
|
||||
--keystore "$RUNNER_TEMP/shovey-release.p12" --password-file "$RUNNER_TEMP/password" \
|
||||
--output "$HANDOFF/downloads/shovey-v$VERSION.apk"
|
||||
apksigner verify --print-certs "$HANDOFF/downloads/shovey-v$VERSION.apk" | grep 'SHA-256'
|
||||
|
||||
linux:
|
||||
name: Linux download, played on a private display
|
||||
needs: due
|
||||
if: needs.due.outputs.build == 'true'
|
||||
runs-on: build-native-shovey
|
||||
timeout-minutes: 90
|
||||
defaults:
|
||||
run:
|
||||
working-directory: waozixyz/shovey
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
# This runner and Gitea share Build; keep source traffic on loopback.
|
||||
github-server-url: http://127.0.0.1:3000
|
||||
path: waozixyz/shovey
|
||||
persist-credentials: false
|
||||
# The UI tests drive the player through Inner Breeze's test driver client.
|
||||
- uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
# This runner and Gitea share Build; keep source traffic on loopback.
|
||||
github-server-url: http://127.0.0.1:3000
|
||||
repository: waozi/breeze
|
||||
ref: fa9c8acab237278d81c9929fa97b3f2545842310
|
||||
path: waozixyz/breeze
|
||||
persist-credentials: false
|
||||
sparse-checkout: tests/ui_driver.py
|
||||
sparse-checkout-cone-mode: false
|
||||
- name: Build the locked compiler and fetch the locked packages
|
||||
run: bash scripts/native-ci.sh desktop
|
||||
- name: Build and pack the Linux download
|
||||
run: |
|
||||
make -j1 player-linux
|
||||
python3 scripts/native-payloads.py save
|
||||
- name: Unpack the download
|
||||
id: unpack
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rm -rf build/linux-check
|
||||
mkdir -p build/linux-check
|
||||
tar -xzf build/downloads/shovey-v*-linux-x86_64.tar.gz -C build/linux-check
|
||||
cp build/downloads/shovey-v*-linux-x86_64.tar.gz "$HANDOFF/downloads/"
|
||||
# The shipped tarball omits Kryon's test driver; rebuild only the host
|
||||
# binary with KRYON_TEST_DRIVER=1 so UI tests drive the unpacked files.
|
||||
KRYON_TEST_DRIVER=1 python3 -c "import sys; sys.path.insert(0, 'scripts'); import player; player.linux_host()"
|
||||
install -m 0755 build/player/linux/shovey build/linux-check/shovey/shovey
|
||||
# Each play-test runs even when an earlier one fails, so one run shows
|
||||
# every failure.
|
||||
- name: Play the unpacked download on a private display
|
||||
if: ${{ !cancelled() && steps.unpack.outcome == 'success' }}
|
||||
run: |
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY \
|
||||
SDL_AUDIODRIVER=dummy timeout 300s xvfb-run -a -n 400 -s '-screen 0 1280x1000x24' \
|
||||
python3 tests/shovey_standalone_ui_test.py --binary "$PWD/build/linux-check/shovey/shovey" \
|
||||
--inbe-source "$GITHUB_WORKSPACE/waozixyz/breeze"
|
||||
- name: Open local Classic and Profile with downloads off
|
||||
if: ${{ !cancelled() && steps.unpack.outcome == 'success' }}
|
||||
run: |
|
||||
env -u LISTEN_PID -u LISTEN_FDS -u LISTEN_FDNAMES -u NOTIFY_SOCKET -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY \
|
||||
SDL_AUDIODRIVER=dummy timeout 180s xvfb-run -a -n 400 -s '-screen 0 1024x900x24' \
|
||||
python3 tests/player_local_ui_test.py --binary "$PWD/build/linux-check/shovey/shovey" \
|
||||
--driver-source "$GITHUB_WORKSPACE/waozixyz/breeze/tests"
|
||||
- name: Verify public covers hide Island in English and German
|
||||
if: ${{ !cancelled() && steps.unpack.outcome == 'success' }}
|
||||
run: |
|
||||
env -u LISTEN_PID -u LISTEN_FDS -u LISTEN_FDNAMES -u NOTIFY_SOCKET -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY \
|
||||
SDL_AUDIODRIVER=dummy timeout 180s xvfb-run -a -n 400 -s '-screen 0 1024x900x24' \
|
||||
python3 tests/island_buy_ui_test.py --binary "$PWD/build/linux-check/shovey/shovey" \
|
||||
--driver-source "$GITHUB_WORKSPACE/waozixyz/breeze" --public
|
||||
- name: Reopen unclaimed and empty chests in the packaged game
|
||||
if: ${{ !cancelled() && steps.unpack.outcome == 'success' }}
|
||||
run: |
|
||||
make chest-fixture
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY \
|
||||
SDL_AUDIODRIVER=dummy timeout 180s xvfb-run -a -n 400 -s '-screen 0 1280x1000x24' \
|
||||
python3 tests/chest_ui_test.py --binary "$PWD/build/linux-check/shovey/shovey" \
|
||||
--fixture build/chest-test/fixture.txt --driver-source "$GITHUB_WORKSPACE/waozixyz/breeze" \
|
||||
--output build/chest-ui-test
|
||||
|
||||
windows:
|
||||
name: Windows download, played under Wine on a private display
|
||||
needs: [due, linux]
|
||||
if: ${{ !cancelled() && needs.due.outputs.build == 'true' }}
|
||||
runs-on: build-native-shovey
|
||||
timeout-minutes: 90
|
||||
env:
|
||||
CXX: x86_64-w64-mingw32-g++
|
||||
defaults:
|
||||
run:
|
||||
working-directory: waozixyz/shovey
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
# This runner and Gitea share Build; keep source traffic on loopback.
|
||||
github-server-url: http://127.0.0.1:3000
|
||||
path: waozixyz/shovey
|
||||
persist-credentials: false
|
||||
- uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
# This runner and Gitea share Build; keep source traffic on loopback.
|
||||
github-server-url: http://127.0.0.1:3000
|
||||
repository: waozi/breeze
|
||||
ref: fa9c8acab237278d81c9929fa97b3f2545842310
|
||||
path: waozixyz/breeze
|
||||
persist-credentials: false
|
||||
sparse-checkout: tests/ui_driver.py
|
||||
sparse-checkout-cone-mode: false
|
||||
- name: Build the locked compiler and fetch the locked packages
|
||||
run: bash scripts/native-ci.sh desktop
|
||||
- name: Cross-build and pack the Windows download
|
||||
run: |
|
||||
set -euo pipefail
|
||||
make -j1 levels landscape
|
||||
if python3 scripts/native-payloads.py restore; then
|
||||
python3 scripts/player.py windows
|
||||
else
|
||||
status=$?
|
||||
# A failed Linux build may leave no handoff. Corruption is an error.
|
||||
test "$status" = 3
|
||||
make -j1 player-windows
|
||||
fi
|
||||
cp build/downloads/shovey-v*-windows-x86_64.zip "$HANDOFF/downloads/"
|
||||
- name: Play the unpacked download under Wine on a private display
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rm -rf build/windows-check
|
||||
mkdir -p build/windows-check
|
||||
unzip -q build/downloads/shovey-v*-windows-x86_64.zip -d build/windows-check
|
||||
# The shipped zip omits Kryon's test driver; rebuild only the host
|
||||
# binary with KRYON_TEST_DRIVER=1 so Wine UI tests drive the unpacked files.
|
||||
KRYON_TEST_DRIVER=1 python3 -c "import sys; sys.path.insert(0, 'scripts'); import player; player.windows_host('x86_64-w64-mingw32-')"
|
||||
install -m 0755 build/player/windows/shovey.exe build/windows-check/Shovey/shovey.exe
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY \
|
||||
WINEPREFIX="$RUNNER_TEMP/wine" timeout 900s xvfb-run -a -n 400 -s '-screen 0 1280x1000x24' \
|
||||
python3 tests/shovey_windows_ui_test.py --program "$PWD/build/windows-check/Shovey/shovey.exe" \
|
||||
--inbe-source "$GITHUB_WORKSPACE/waozixyz/breeze"
|
||||
|
||||
release:
|
||||
name: Verify every download and publish the release
|
||||
needs: [due, android, linux, windows]
|
||||
if: needs.due.outputs.build == 'true'
|
||||
runs-on: build-native-shovey
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
# This runner and Gitea share Build; keep source traffic on loopback.
|
||||
github-server-url: http://127.0.0.1:3000
|
||||
persist-credentials: false
|
||||
sparse-checkout: |
|
||||
scripts/downloads-release.py
|
||||
version.json
|
||||
src/CHANGELOG.md
|
||||
sparse-checkout-cone-mode: false
|
||||
- name: Verify the signer and versions, then publish
|
||||
env:
|
||||
RELEASE_REVISION: ${{ github.sha }}
|
||||
SHOVEY_REHEARSE: ${{ inputs.rehearse == true || inputs.rehearse == 'true' }}
|
||||
SHOVEY_RELEASE_TOKEN: ${{ secrets.SHOVEY_RELEASE_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
export PATH="$ANDROID_HOME/build-tools/36.0.0:$JAVA_HOME/bin:$PATH"
|
||||
export SHOVEY_NATIVE_BUILD="$HOME/handoff/$GITHUB_RUN_ID"
|
||||
python3 scripts/downloads-release.py
|
||||
sha256sum "$SHOVEY_NATIVE_BUILD"/downloads/*
|
||||
@@ -12,7 +12,7 @@ runs:
|
||||
# Only Ubuntu's own feeds: refreshing the runner's other feeds is slow.
|
||||
set -- -o Acquire::Retries=2 -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/ubuntu.sources -o Dir::Etc::sourceparts=-
|
||||
sudo apt-get "$@" -o APT::Get::List-Cleanup=0 update
|
||||
sudo apt-get "$@" install -y --no-install-recommends build-essential cmake pkg-config python3-pil python3-numpy libssl-dev
|
||||
sudo apt-get "$@" install -y --no-install-recommends build-essential cmake meson ninja-build pkg-config python3-pil python3-numpy libssl-dev
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
name: Sign local Android repair
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
sha256:
|
||||
description: SHA-256 of the exact locally built unsigned APK in repository LFS
|
||||
required: true
|
||||
type: string
|
||||
size:
|
||||
description: Size in bytes of the exact locally built unsigned APK
|
||||
required: true
|
||||
type: string
|
||||
architectures:
|
||||
description: Architectures in the exact local build
|
||||
required: true
|
||||
default: arm64-v8a
|
||||
type: choice
|
||||
options:
|
||||
- arm64-v8a
|
||||
- universal
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
sign:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
- name: Test exact-build retrieval
|
||||
run: |
|
||||
python3 tests/android_repair_fetch_test.py
|
||||
python3 tests/android_repair_abi_test.py
|
||||
- name: Retrieve the exact local build
|
||||
env:
|
||||
APK_SHA256: ${{ inputs.sha256 }}
|
||||
APK_SIZE: ${{ inputs.size }}
|
||||
run: >-
|
||||
python3 scripts/fetch-android-repair.py
|
||||
--sha256 "$APK_SHA256" --size "$APK_SIZE"
|
||||
--output build/android/repair-unsigned.apk
|
||||
- name: Install Android signing tools
|
||||
run: '"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --install "build-tools;36.0.0"'
|
||||
- name: Sign with the existing Shovey key
|
||||
env:
|
||||
KEYSTORE: ${{ secrets.SHOVEY_ANDROID_KEYSTORE }}
|
||||
PASSWORD: ${{ secrets.SHOVEY_ANDROID_KEYSTORE_PASSWORD }}
|
||||
APK_ARCHITECTURES: ${{ inputs.architectures }}
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
umask 077
|
||||
key="$RUNNER_TEMP/shovey-release.p12"
|
||||
password="$RUNNER_TEMP/shovey-release-password"
|
||||
trap 'rm -f "$key" "$password"' EXIT
|
||||
printf '%s' "$KEYSTORE" | base64 --decode > "$key"
|
||||
printf '%s' "$PASSWORD" > "$password"
|
||||
version="$(python3 -c 'import json; print(json.load(open("version.json"))["version"])')"
|
||||
case "$APK_ARCHITECTURES" in
|
||||
arm64-v8a) abi=(--device-abi arm64-v8a) ;;
|
||||
universal) abi=() ;;
|
||||
*) echo 'Unsupported architecture selection' >&2; exit 1 ;;
|
||||
esac
|
||||
python3 scripts/android-release.py sign build/android/repair-unsigned.apk \
|
||||
--version "$version" --keystore "$key" --password-file "$password" \
|
||||
"${abi[@]}" \
|
||||
--output build/android/shovey.apk
|
||||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||
with:
|
||||
name: shovey-local-repair
|
||||
path: build/android/shovey.apk
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
@@ -1,26 +1,30 @@
|
||||
name: Downloads
|
||||
run-name: Shovey build ${{ inputs.revision || github.sha }}
|
||||
|
||||
# A push whose changelog names a version that is not released yet builds and
|
||||
# checks the signed Android APK, also published as shovey-VERSION-fdroid.apk
|
||||
# once F-Droid's own build of the commit matches it, the Google Play edition's
|
||||
# APK (shovey-vVERSION-gplay.apk, the only one with a Google library), and the
|
||||
# Linux and Windows downloads, then publishes them as that version's release,
|
||||
# like Inner Breeze. Every download is Shovey's player (scripts/player.py), built from
|
||||
# this repository's own lock; Arcade follows the release afterwards. Pushes of
|
||||
# a released version only check that nothing needs releasing. A manual run
|
||||
# retries an unreleased version. No release is left as a draft.
|
||||
# Gitea requests an exact source commit. Published releases reuse its signed
|
||||
# normal APK as the identical F-Droid reference, build the Google Play APK,
|
||||
# and attach the editions. Manual runs still build/sign the normal APK,
|
||||
# reproduce it with F-Droid and play the Linux/Windows downloads.
|
||||
# play-bundle.yml sends the bundle to Google Play.
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
revision:
|
||||
description: Full approved source commit (defaults to the triggering commit)
|
||||
required: false
|
||||
type: string
|
||||
rehearse:
|
||||
description: Build and play every download without publishing a release
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
release:
|
||||
# A published Shovey release gets its editions attached; editor releases
|
||||
# share this repository and are ignored below.
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: shovey-downloads
|
||||
@@ -28,10 +32,12 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
due:
|
||||
if: github.event_name != 'release' || startsWith(github.event.release.tag_name, 'v')
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 5
|
||||
outputs:
|
||||
release_due: ${{ steps.due.outputs.release_due }}
|
||||
build_due: ${{ steps.due.outputs.build_due }}
|
||||
version: ${{ steps.due.outputs.version }}
|
||||
revision: ${{ steps.due.outputs.revision }}
|
||||
steps:
|
||||
@@ -39,12 +45,18 @@ jobs:
|
||||
with:
|
||||
ref: ${{ inputs.revision || github.sha }}
|
||||
fetch-depth: 0
|
||||
filter: blob:none
|
||||
sparse-checkout: |
|
||||
src/CHANGELOG.md
|
||||
version.json
|
||||
sparse-checkout-cone-mode: false
|
||||
- name: Release only a new version or a requested run
|
||||
id: due
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
REQUESTED_REVISION: ${{ inputs.revision || github.sha }}
|
||||
REHEARSE: ${{ inputs.rehearse || false }}
|
||||
run: |
|
||||
[[ "$REQUESTED_REVISION" =~ ^[0-9a-f]{40}$ ]] || { echo 'A full source commit is required' >&2; exit 1; }
|
||||
test "$(git rev-parse HEAD)" = "$REQUESTED_REVISION"
|
||||
@@ -52,17 +64,15 @@ jobs:
|
||||
echo "revision=$REQUESTED_REVISION" >> "$GITHUB_OUTPUT"
|
||||
version=$(python3 -c 'import re; print(re.search(r"^## \[([0-9.]+)\]", open("src/CHANGELOG.md").read(), re.M)[1])')
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
state=$(gh release view "v$version" --json isDraft --jq .isDraft 2>/dev/null || echo missing)
|
||||
if [ "$state" != false ]; then
|
||||
echo "release_due=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "release_due=false" >> "$GITHUB_OUTPUT"
|
||||
echo "::notice title=Downloads::Shovey $version is already released; its downloads build again with the next changelog version"
|
||||
fi
|
||||
# Gitea's Downloads workflow publishes and mirrors our own edition.
|
||||
# These jobs build the F-Droid and Google Play editions and attach
|
||||
# them to the mirrored GitHub release.
|
||||
echo "release_due=false" >> "$GITHUB_OUTPUT"
|
||||
echo "build_due=true" >> "$GITHUB_OUTPUT"
|
||||
|
||||
android:
|
||||
needs: due
|
||||
if: needs.due.outputs.release_due == 'true'
|
||||
if: needs.due.outputs.build_due == 'true'
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
@@ -70,20 +80,49 @@ jobs:
|
||||
with:
|
||||
ref: ${{ needs.due.outputs.revision }}
|
||||
- uses: ./.github/actions/android
|
||||
if: github.event_name != 'release'
|
||||
- uses: actions/setup-java@v4
|
||||
if: github.event_name == 'release'
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- name: Install only the APK verification tools
|
||||
if: github.event_name == 'release'
|
||||
run: |
|
||||
sdkmanager="$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager"
|
||||
yes | "$sdkmanager" --licenses >/dev/null || true
|
||||
"$sdkmanager" 'build-tools;36.0.0'
|
||||
# Only the Google Play edition may name a Google library, in its build
|
||||
# files as in its APK.
|
||||
- name: Keep Google libraries out of the normal and F-Droid build files
|
||||
uses: kryonlabs/kryon/.github/actions/google-free@7217475dfa7f462939e47e3f0bc918aef248b179
|
||||
# The build F-Droid's recipe runs; it has no self-update, so one APK
|
||||
# serves both.
|
||||
# A manual rehearsal builds F-Droid's recipe. A published release
|
||||
# already has this exact signed APK from Gitea: verify and reuse it,
|
||||
# without installing the NDK or building/signing it a second time.
|
||||
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
|
||||
if: github.event_name != 'release'
|
||||
with:
|
||||
path: build/fdroid/cache/ziran
|
||||
key: shovey-android-ubuntu-24.04-${{ hashFiles('ziran.lock') }}
|
||||
- name: Build the release APK
|
||||
run: make android-fdroid
|
||||
if: github.event_name != 'release'
|
||||
run: make -j1 android-fdroid
|
||||
- name: Reuse the published APK from the exact release source
|
||||
if: github.event_name == 'release'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
VERSION: ${{ needs.due.outputs.version }}
|
||||
REVISION: ${{ needs.due.outputs.revision }}
|
||||
run: |
|
||||
python3 scripts/android-release.py reuse build/fdroid/shovey.apk \
|
||||
--version "$VERSION" --revision "$REVISION"
|
||||
- name: Keep Google libraries out of the normal and F-Droid APK
|
||||
uses: kryonlabs/kryon/.github/actions/google-free@7217475dfa7f462939e47e3f0bc918aef248b179
|
||||
with:
|
||||
packages: build/fdroid/shovey.apk
|
||||
source: ''
|
||||
- name: Sign and check the APK
|
||||
if: github.event_name != 'release'
|
||||
env:
|
||||
KEYSTORE: ${{ secrets.SHOVEY_ANDROID_KEYSTORE }}
|
||||
PASSWORD: ${{ secrets.SHOVEY_ANDROID_KEYSTORE_PASSWORD }}
|
||||
@@ -97,6 +136,13 @@ jobs:
|
||||
--output "build/downloads/shovey-v$VERSION.apk"
|
||||
rm -f "$RUNNER_TEMP/shovey-release.p12" "$RUNNER_TEMP/password"
|
||||
cp "build/downloads/shovey-v$VERSION.apk" "build/downloads/shovey-$VERSION-fdroid.apk"
|
||||
- name: Keep the verified APK bytes as the F-Droid reference
|
||||
if: github.event_name == 'release'
|
||||
env:
|
||||
VERSION: ${{ needs.due.outputs.version }}
|
||||
run: |
|
||||
mkdir -p build/downloads
|
||||
cp build/fdroid/shovey.apk "build/downloads/shovey-$VERSION-fdroid.apk"
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: shovey-android
|
||||
@@ -106,7 +152,7 @@ jobs:
|
||||
|
||||
android-gplay:
|
||||
needs: due
|
||||
if: needs.due.outputs.release_due == 'true'
|
||||
if: needs.due.outputs.build_due == 'true'
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 90
|
||||
steps:
|
||||
@@ -114,6 +160,13 @@ jobs:
|
||||
with:
|
||||
ref: ${{ needs.due.outputs.revision }}
|
||||
- uses: ./.github/actions/android
|
||||
# The build's own Ziran cache (compiler, package checkouts and native
|
||||
# libraries) is addressed by what it is built from; reuse it between
|
||||
# runs with the same lock instead of rebuilding the compiler each time.
|
||||
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
|
||||
with:
|
||||
path: build/fdroid/cache/ziran
|
||||
key: shovey-android-gplay-ubuntu-24.04-${{ hashFiles('ziran.lock') }}
|
||||
- name: Build the Google Play edition's APK
|
||||
run: make android-gplay
|
||||
# The Google check must still recognise Play Billing, or its passes on
|
||||
@@ -144,16 +197,58 @@ jobs:
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
|
||||
editions:
|
||||
name: Attach the F-Droid and Google Play editions
|
||||
needs: [due, android, android-gplay]
|
||||
if: needs.due.outputs.build_due == 'true'
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: shovey-android*
|
||||
path: build/downloads
|
||||
merge-multiple: true
|
||||
- name: Attach them to the mirrored release
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
VERSION: ${{ needs.due.outputs.version }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
tag="v$VERSION"
|
||||
# Gitea publishes the release and mirrors it here with our own
|
||||
# edition; only the two editions this workflow builds are added.
|
||||
state=$(gh release view "$tag" --json isDraft --jq .isDraft) || {
|
||||
echo "::error::GitHub release $tag is not published yet; run this after Gitea publishes and mirrors it." >&2
|
||||
exit 1
|
||||
}
|
||||
test "$state" = false || { echo "::error::GitHub release $tag is still a draft." >&2; exit 1; }
|
||||
present=$(gh release view "$tag" --json assets --jq '.assets[].name')
|
||||
for file in "build/downloads/shovey-$VERSION-fdroid.apk" "build/downloads/shovey-v$VERSION-gplay.apk"; do
|
||||
name=$(basename "$file")
|
||||
test -f "$file"
|
||||
if grep -qxF "$name" <<<"$present"; then
|
||||
echo "$name is already attached to $tag"
|
||||
else
|
||||
gh release upload "$tag" "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
fdroid:
|
||||
needs: due
|
||||
if: needs.due.outputs.release_due == 'true'
|
||||
# A published release only needs the Android editions; the F-Droid
|
||||
# rebuild and the desktop play-tests belong to a manual run.
|
||||
if: github.event_name == 'workflow_dispatch' && needs.due.outputs.build_due == 'true'
|
||||
uses: ./.github/workflows/fdroid.yml
|
||||
with:
|
||||
revision: ${{ needs.due.outputs.revision }}
|
||||
|
||||
linux:
|
||||
needs: due
|
||||
if: needs.due.outputs.release_due == 'true'
|
||||
if: github.event_name == 'workflow_dispatch' && needs.due.outputs.build_due == 'true'
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 45
|
||||
defaults:
|
||||
@@ -173,9 +268,9 @@ jobs:
|
||||
path: ziranlang/ziran
|
||||
fetch: true
|
||||
packages: >-
|
||||
build-essential cmake pkg-config python3-pil python3-numpy libsdl2-dev libcairo2-dev
|
||||
build-essential cmake meson ninja-build pkg-config python3-pil python3-numpy libsdl2-dev libcairo2-dev
|
||||
libfreetype-dev libfontconfig-dev libpango1.0-dev libgtk-3-dev libcurl4-openssl-dev
|
||||
libx11-dev xvfb xauth xdotool imagemagick
|
||||
libx11-dev nasm xvfb xauth xdotool imagemagick
|
||||
# The UI tests drive the player through Inner Breeze's test driver client.
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
@@ -184,30 +279,60 @@ jobs:
|
||||
path: waozixyz/breeze
|
||||
sparse-checkout: tests/ui_driver.py
|
||||
sparse-checkout-cone-mode: false
|
||||
# Ziran addresses built native libraries (codecs, SDL, Cairo, curl, liboqs)
|
||||
# by everything they are built from, so a run with the same lock and
|
||||
# runner image reuses them and any change rebuilds them.
|
||||
- uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830
|
||||
id: native-cache
|
||||
with:
|
||||
path: ~/.cache/ziran/artifacts
|
||||
key: shovey-native-linux-ubuntu-24.04-${{ hashFiles('waozixyz/shovey/ziran.lock') }}
|
||||
restore-keys: shovey-native-linux-ubuntu-24.04-
|
||||
- name: Build and pack the Linux download
|
||||
run: make player-linux
|
||||
- name: Play the unpacked download on a private display
|
||||
# Preserve successful compilation even if a later play-test fails.
|
||||
# Ziran verifies each restored artifact against its own inputs/digests.
|
||||
- name: Save the Linux native build cache
|
||||
if: steps.native-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830
|
||||
with:
|
||||
path: ~/.cache/ziran/artifacts
|
||||
key: ${{ steps.native-cache.outputs.cache-primary-key }}
|
||||
- name: Unpack the download
|
||||
id: unpack
|
||||
run: |
|
||||
rm -rf build/linux-check
|
||||
mkdir -p build/linux-check
|
||||
tar -xzf build/downloads/shovey-v*-linux-x86_64.tar.gz -C build/linux-check
|
||||
# The shipped tarball omits Kryon's test driver; rebuild only the host
|
||||
# binary with KRYON_TEST_DRIVER=1 so UI tests drive the unpacked files.
|
||||
KRYON_TEST_DRIVER=1 python3 -c "import sys; sys.path.insert(0, 'scripts'); import player; player.linux_host()"
|
||||
install -m 0755 build/player/linux/shovey build/linux-check/shovey/shovey
|
||||
# Each play-test runs even when an earlier one fails, so one run shows
|
||||
# every failure.
|
||||
- name: Play the unpacked download on a private display
|
||||
if: ${{ !cancelled() && steps.unpack.outcome == 'success' }}
|
||||
run: |
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY \
|
||||
YUE_DESKTOP_RECOVERY=0 SDL_AUDIODRIVER=dummy timeout 300s xvfb-run -a -n 400 -s '-screen 0 1280x1000x24' \
|
||||
python3 tests/shovey_standalone_ui_test.py --binary "$PWD/build/linux-check/shovey/shovey" \
|
||||
--inbe-source "$GITHUB_WORKSPACE/waozixyz/breeze"
|
||||
- name: Open local Classic and Profile with downloads off
|
||||
if: ${{ !cancelled() && steps.unpack.outcome == 'success' }}
|
||||
run: |
|
||||
env -u LISTEN_PID -u LISTEN_FDS -u LISTEN_FDNAMES -u NOTIFY_SOCKET -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY \
|
||||
YUE_DESKTOP_RECOVERY=0 SDL_AUDIODRIVER=dummy timeout 180s xvfb-run -a -n 400 -s '-screen 0 1024x900x24' \
|
||||
python3 tests/player_local_ui_test.py --binary "$PWD/build/linux-check/shovey/shovey" \
|
||||
--driver-source "$GITHUB_WORKSPACE/waozixyz/breeze/tests"
|
||||
- name: Open bundled Island's Buy page in English and German
|
||||
- name: Verify public covers hide Island in English and German
|
||||
if: ${{ !cancelled() && steps.unpack.outcome == 'success' }}
|
||||
run: |
|
||||
env -u LISTEN_PID -u LISTEN_FDS -u LISTEN_FDNAMES -u NOTIFY_SOCKET -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY \
|
||||
YUE_DESKTOP_RECOVERY=0 SDL_AUDIODRIVER=dummy timeout 180s xvfb-run -a -n 400 -s '-screen 0 1024x900x24' \
|
||||
python3 tests/island_buy_ui_test.py --binary "$PWD/build/linux-check/shovey/shovey" \
|
||||
--driver-source "$GITHUB_WORKSPACE/waozixyz/breeze/tests"
|
||||
--driver-source "$GITHUB_WORKSPACE/waozixyz/breeze" --public
|
||||
- name: Reopen unclaimed and empty chests in the packaged game
|
||||
if: ${{ !cancelled() && steps.unpack.outcome == 'success' }}
|
||||
run: |
|
||||
make chest-fixture
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY \
|
||||
@@ -224,7 +349,7 @@ jobs:
|
||||
|
||||
windows:
|
||||
needs: due
|
||||
if: needs.due.outputs.release_due == 'true'
|
||||
if: github.event_name == 'workflow_dispatch' && needs.due.outputs.build_due == 'true'
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 60
|
||||
defaults:
|
||||
@@ -242,9 +367,9 @@ jobs:
|
||||
path: ziranlang/ziran
|
||||
fetch: true
|
||||
packages: >-
|
||||
build-essential cmake pkg-config python3-pil python3-numpy gcc-mingw-w64-x86-64-win32
|
||||
build-essential cmake meson ninja-build pkg-config python3-pil python3-numpy gcc-mingw-w64-x86-64-win32
|
||||
g++-mingw-w64-x86-64-win32
|
||||
binutils-mingw-w64-x86-64 libz-mingw-w64-dev wine wine64 xvfb xauth unzip
|
||||
binutils-mingw-w64-x86-64 libz-mingw-w64-dev nasm wine wine64 xvfb xauth unzip
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
repository: waozixyz/breeze
|
||||
@@ -252,10 +377,25 @@ jobs:
|
||||
path: waozixyz/breeze
|
||||
sparse-checkout: tests/ui_driver.py
|
||||
sparse-checkout-cone-mode: false
|
||||
# Ziran addresses built native libraries (codecs, SDL, Cairo, curl, liboqs)
|
||||
# by everything they are built from, so a run with the same lock and
|
||||
# runner image reuses them and any change rebuilds them.
|
||||
- uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830
|
||||
id: native-cache
|
||||
with:
|
||||
path: ~/.cache/ziran/artifacts
|
||||
key: shovey-native-windows-ubuntu-24.04-${{ hashFiles('waozixyz/shovey/ziran.lock') }}
|
||||
restore-keys: shovey-native-windows-ubuntu-24.04-
|
||||
- name: Cross-build and pack the Windows download
|
||||
env:
|
||||
CXX: x86_64-w64-mingw32-g++
|
||||
run: make player-windows
|
||||
- name: Save the Windows native build cache
|
||||
if: steps.native-cache.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830
|
||||
with:
|
||||
path: ~/.cache/ziran/artifacts
|
||||
key: ${{ steps.native-cache.outputs.cache-primary-key }}
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: shovey-windows
|
||||
@@ -267,6 +407,10 @@ jobs:
|
||||
rm -rf build/windows-check
|
||||
mkdir -p build/windows-check
|
||||
unzip -q build/downloads/shovey-v*-windows-x86_64.zip -d build/windows-check
|
||||
# The shipped zip omits Kryon's test driver; rebuild only the host
|
||||
# binary with KRYON_TEST_DRIVER=1 so Wine UI tests drive the unpacked files.
|
||||
KRYON_TEST_DRIVER=1 CXX=x86_64-w64-mingw32-g++ python3 -c "import sys; sys.path.insert(0, 'scripts'); import player; player.windows_host('x86_64-w64-mingw32-')"
|
||||
install -m 0755 build/player/windows/shovey.exe build/windows-check/Shovey/shovey.exe
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY \
|
||||
WINEPREFIX="$RUNNER_TEMP/wine" timeout 900s xvfb-run -a -n 400 -s '-screen 0 1280x1000x24' \
|
||||
python3 tests/shovey_windows_ui_test.py --program "$PWD/build/windows-check/Shovey/shovey.exe" \
|
||||
@@ -279,107 +423,3 @@ jobs:
|
||||
path: waozixyz/shovey/build/shovey-windows-ui-test/
|
||||
if-no-files-found: ignore
|
||||
retention-days: 7
|
||||
|
||||
release:
|
||||
needs: [due, android, android-gplay, fdroid, linux, windows]
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
defaults:
|
||||
run:
|
||||
working-directory: waozixyz/shovey
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
CHANGELOG_VERSION: ${{ needs.due.outputs.version }}
|
||||
RELEASE_REVISION: ${{ needs.due.outputs.revision }}
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
ref: ${{ needs.due.outputs.revision }}
|
||||
path: waozixyz/shovey
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: shovey-*
|
||||
path: waozixyz/shovey/build/downloads
|
||||
merge-multiple: true
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: fdroid-unsigned
|
||||
path: waozixyz/shovey/build/fdroid-rebuild
|
||||
- name: Check every download is this version
|
||||
id: version
|
||||
run: |
|
||||
apk=$(ls build/downloads/shovey-v*.apk)
|
||||
version=${apk##*/shovey-v}
|
||||
version=${version%.apk}
|
||||
for file in "shovey-v$version.apk" "shovey-$version-fdroid.apk" "shovey-v$version-gplay.apk" "shovey-v$version-linux-x86_64.tar.gz" "shovey-v$version-windows-x86_64.zip"; do
|
||||
test -f "build/downloads/$file" || { echo "Missing $file" >&2; exit 1; }
|
||||
done
|
||||
test "$(ls build/downloads | wc -l)" = 5 || { ls build/downloads >&2; echo 'Downloads differ in version' >&2; exit 1; }
|
||||
test "$version" = "$CHANGELOG_VERSION" || { echo "The downloads are $version but the changelog names $CHANGELOG_VERSION" >&2; exit 1; }
|
||||
python3 scripts/android-release.py verify "build/downloads/shovey-v$version.apk" --version "$version"
|
||||
python3 scripts/android-release.py verify "build/downloads/shovey-$version-fdroid.apk" --version "$version"
|
||||
python3 scripts/android-release.py verify "build/downloads/shovey-v$version-gplay.apk" --edition gplay --version "$version"
|
||||
# F-Droid copies this signature onto its own build of the recipe, so
|
||||
# that rebuild must match the signed APK byte for byte.
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y apksigcopier
|
||||
rebuilt=$(find build/fdroid-rebuild/tmp -name '*.apk')
|
||||
test "$(printf '%s\n' "$rebuilt" | wc -l)" = 1
|
||||
# apksigcopier runs apksigner, which the runner keeps in the
|
||||
# Android SDK's build-tools rather than on PATH.
|
||||
tools=$(ls -d "${ANDROID_SDK_ROOT:-$ANDROID_HOME}"/build-tools/* | sort -V | tail -1)
|
||||
PATH="$tools:$PATH" apksigcopier compare --unsigned "build/downloads/shovey-$version-fdroid.apk" "$rebuilt"
|
||||
python3 - "$version" > build/release-notes.md <<'PY'
|
||||
import re, sys
|
||||
text = open('src/CHANGELOG.md').read()
|
||||
section = re.search(r'^## \[' + re.escape(sys.argv[1]) + r'\] - .*?\n(.*?)(?=^## |\Z)', text, re.M | re.S)
|
||||
print(section[1].strip())
|
||||
PY
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
- name: Publish this version
|
||||
env:
|
||||
VERSION: ${{ steps.version.outputs.version }}
|
||||
run: |
|
||||
tag="v$VERSION"
|
||||
state=$(gh release view "$tag" --json isDraft --jq .isDraft 2>/dev/null || echo missing)
|
||||
if [ "$state" = false ]; then
|
||||
echo "Shovey $VERSION is already published; its downloads stay as they are."
|
||||
exit 0
|
||||
fi
|
||||
# The downloads go up on a draft first, so the release appears
|
||||
# only once all of them are there.
|
||||
if [ "$state" = missing ]; then
|
||||
gh release create "$tag" --draft --target "$RELEASE_REVISION" --title "Shovey $VERSION" --notes-file build/release-notes.md
|
||||
else
|
||||
gh release edit "$tag" --target "$RELEASE_REVISION" --notes-file build/release-notes.md
|
||||
for asset in $(gh release view "$tag" --json assets --jq '.assets[].name'); do
|
||||
gh release delete-asset "$tag" "$asset" --yes
|
||||
done
|
||||
fi
|
||||
gh release upload "$tag" build/downloads/*
|
||||
gh release edit "$tag" --draft=false --latest
|
||||
echo "Published Shovey $VERSION."
|
||||
# Arcade follows this release now, not at its next timer, and Breeze
|
||||
# then publishes it to the node. RELEASE_FOLLOW_TOKEN may only start
|
||||
# workflows in Arcade and Breeze; Game updates takes no input and finds
|
||||
# the newest game releases itself. Without it Arcade's timer follows.
|
||||
- name: Start Arcade's game update
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.RELEASE_FOLLOW_TOKEN }}
|
||||
run: |
|
||||
if [ -z "$GH_TOKEN" ]; then
|
||||
echo "No RELEASE_FOLLOW_TOKEN: Arcade's Game updates picks this release up on its timer."
|
||||
exit 0
|
||||
fi
|
||||
gh workflow run game-updates.yml -R waozixyz/arcade --ref master
|
||||
|
||||
# The same release goes to Google Play's internal testing track as the
|
||||
# Google Play edition, with its Dew packs.
|
||||
google-play:
|
||||
needs: [due, release]
|
||||
if: needs.due.outputs.release_due == 'true'
|
||||
uses: ./.github/workflows/play-bundle.yml
|
||||
with:
|
||||
revision: ${{ needs.due.outputs.revision }}
|
||||
secrets: inherit
|
||||
@@ -64,6 +64,7 @@ jobs:
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends openjdk-21-jdk-headless fdroidserver git
|
||||
update-alternatives --set java /usr/lib/jvm/java-21-openjdk-amd64/bin/java
|
||||
git config --global http.version HTTP/1.1
|
||||
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||
with:
|
||||
ref: ${{ inputs.revision || github.sha }}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
name: Google Play
|
||||
run-name: Shovey Play ${{ inputs.revision || github.sha }}
|
||||
|
||||
# Every published Shovey release goes to Google Play's internal testing track
|
||||
# as the Google Play edition, which sells Dew through Google Play. Downloads
|
||||
# calls this after publishing a release; a dispatch uploads one release
|
||||
# again (choose its tag as the ref).
|
||||
# Every published Shovey release completes internal and closed testing (alpha).
|
||||
# The Google Play edition sells Dew through Google Play. A published GitHub
|
||||
# release starts this workflow; a dispatch uploads one release again (choose
|
||||
# its tag as the ref).
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_call:
|
||||
inputs:
|
||||
revision:
|
||||
@@ -39,19 +42,37 @@ permissions:
|
||||
|
||||
jobs:
|
||||
bundle:
|
||||
# Editor releases share this repository; only Shovey's own vX.Y.Z tags
|
||||
# carry the Google Play edition.
|
||||
if: github.event_name != 'release' || startsWith(github.event.release.tag_name, 'v')
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
# Reuse the exact sources/compiler/native libraries built for the Play
|
||||
# APK. The AAB is still built and signed by this workflow.
|
||||
XDG_CACHE_HOME: ${{ github.workspace }}/build/fdroid/cache
|
||||
concurrency:
|
||||
group: shovey-google-play
|
||||
cancel-in-progress: false
|
||||
outputs:
|
||||
version: ${{ steps.sign.outputs.version }}
|
||||
version_code: ${{ steps.sign.outputs.version_code }}
|
||||
internal_uploaded: ${{ steps.upload.outcome == 'success' }}
|
||||
defaults:
|
||||
run:
|
||||
working-directory: waozixyz/shovey
|
||||
working-directory: .
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.revision || github.sha }}
|
||||
path: waozixyz/shovey
|
||||
- name: Restore the Play APK's verified build dependencies
|
||||
id: android-cache
|
||||
if: ${{ !inputs.products_only }}
|
||||
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830
|
||||
with:
|
||||
path: build/fdroid/cache/ziran
|
||||
key: shovey-android-gplay-ubuntu-24.04-${{ hashFiles('ziran.lock') }}
|
||||
restore-keys: shovey-android-gplay-ubuntu-24.04-
|
||||
- name: Validate the fixed revision
|
||||
env:
|
||||
REVISION: ${{ inputs.revision || github.sha }}
|
||||
@@ -68,10 +89,10 @@ jobs:
|
||||
- name: Set up the locked Ziran, its packages and the build tools
|
||||
uses: ziranlang/ziran/.github/actions/setup@120e6d967c7c06594c53ae3dce490f4d64a4ea4c
|
||||
with:
|
||||
project: waozixyz/shovey
|
||||
project: .
|
||||
path: ziranlang/ziran
|
||||
fetch: true
|
||||
packages: build-essential cmake pkg-config python3-pil python3-numpy
|
||||
packages: build-essential cmake meson ninja-build pkg-config python3-pil python3-numpy
|
||||
- uses: actions/setup-java@v4
|
||||
if: ${{ !inputs.products_only }}
|
||||
with:
|
||||
@@ -86,6 +107,12 @@ jobs:
|
||||
- name: Build the Google Play edition bundle
|
||||
if: ${{ !inputs.products_only }}
|
||||
run: make player-bundle
|
||||
- name: Save the Play bundle's build dependencies before uploading
|
||||
if: ${{ !inputs.products_only && steps.android-cache.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830
|
||||
with:
|
||||
path: build/fdroid/cache/ziran
|
||||
key: ${{ steps.android-cache.outputs.cache-primary-key }}
|
||||
- name: Sign and verify the bundle
|
||||
if: ${{ !inputs.products_only }}
|
||||
id: sign
|
||||
@@ -108,11 +135,12 @@ jobs:
|
||||
--keystore "$RUNNER_TEMP/shovey-release.p12" --password-file "$RUNNER_TEMP/password" \
|
||||
--bundletool "$RUNNER_TEMP/bundletool.jar"
|
||||
echo "version=$version" >> "$GITHUB_OUTPUT"
|
||||
echo "version_code=$(python3 -c 'import json; print(json.load(open("version.json"))["version_code"])')" >> "$GITHUB_OUTPUT"
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ !inputs.products_only }}
|
||||
with:
|
||||
name: shovey-play-testing
|
||||
path: waozixyz/shovey/build/android/*.aab
|
||||
path: build/android/*.aab
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
- name: Write the release notes
|
||||
@@ -131,16 +159,17 @@ jobs:
|
||||
PY
|
||||
cat build/play-notes/whatsnew-en-US
|
||||
- name: Upload to Google Play internal testing
|
||||
id: upload
|
||||
if: ${{ !inputs.products_only }}
|
||||
uses: r0adkll/upload-google-play@e738b9dd8f2476ea806d921b64aacd24f34515a5 # v1.1.5
|
||||
with:
|
||||
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
|
||||
packageName: xyz.waozi.shovey
|
||||
releaseFiles: waozixyz/shovey/build/android/shovey-v${{ steps.sign.outputs.version }}-gplay.aab
|
||||
releaseFiles: build/android/shovey-v${{ steps.sign.outputs.version }}-gplay.aab
|
||||
releaseName: ${{ steps.sign.outputs.version }}
|
||||
track: internal
|
||||
status: completed
|
||||
whatsNewDirectory: waozixyz/shovey/build/play-notes
|
||||
whatsNewDirectory: build/play-notes
|
||||
# Add the 10 Dew pack at a 20% premium, rounded up locally.
|
||||
# Larger pack prices change only when explicitly selected.
|
||||
- name: Sell the Dew packs at Google Play prices
|
||||
@@ -177,3 +206,12 @@ jobs:
|
||||
done
|
||||
echo '::error::Dew product setup failed after three attempts. Retry with products_only=true after confirming the bundle upload.'
|
||||
exit 1
|
||||
|
||||
closed-testing:
|
||||
needs: bundle
|
||||
if: ${{ always() && needs.bundle.outputs.internal_uploaded == 'true' }}
|
||||
uses: ./.github/workflows/play-promote.yml
|
||||
with:
|
||||
version: ${{ needs.bundle.outputs.version }}
|
||||
version_code: ${{ needs.bundle.outputs.version_code }}
|
||||
secrets: inherit
|
||||
@@ -1,16 +1,30 @@
|
||||
name: Google Play Production promotion
|
||||
name: Google Play closed testing
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
description: Exact published version already completed on internal testing
|
||||
required: true
|
||||
type: string
|
||||
version_code:
|
||||
description: Exact version code of that internal release
|
||||
required: true
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Exact published version completed on internal testing
|
||||
type: string
|
||||
version_code:
|
||||
description: Exact internal version code
|
||||
type: string
|
||||
inspect_only:
|
||||
description: Read all Play tracks and tester configuration without publishing
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
wurm_secret_public_key:
|
||||
description: Optional Wurm repository public key for encrypted credential setup
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -26,34 +40,46 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
- name: Validate the published release
|
||||
if: ${{ !inputs.inspect_only }}
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
VERSION: ${{ inputs.version }}
|
||||
VERSION_CODE: ${{ inputs.version_code }}
|
||||
run: |
|
||||
python3 - <<'PY'
|
||||
import json, os, re, subprocess
|
||||
import json, os, re, urllib.request
|
||||
version = os.environ['VERSION']
|
||||
assert re.fullmatch(r'\d+\.\d+\.\d+', version), 'Use a numeric release version'
|
||||
assert re.fullmatch(r'[1-9][0-9]*', os.environ['VERSION_CODE']), 'Use a positive version code'
|
||||
release = json.loads(subprocess.check_output(
|
||||
['gh', 'release', 'view', 'v' + version, '--json', 'isDraft,publishedAt'], text=True))
|
||||
assert not release['isDraft'] and release['publishedAt'], 'The version must already be published on GitHub'
|
||||
url = f'https://git.waozi.xyz/api/v1/repos/waozi/shovey/releases/tags/v{version}'
|
||||
req = urllib.request.Request(url, headers={'User-Agent': 'Shovey-Play-Promote/1.0'})
|
||||
with urllib.request.urlopen(req, timeout=30) as resp:
|
||||
release = json.loads(resp.read())
|
||||
assert not release.get('draft') and release.get('published_at'), 'The version must already be published on Gitea'
|
||||
PY
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
repository: waozixyz/entity
|
||||
# Play administration tools are newer than the game's runtime pin.
|
||||
ref: 2062597cecba5ce1bf54a20e6d5a2bdda148a06b
|
||||
path: play-entity
|
||||
persist-credentials: false
|
||||
- name: Test promotion boundaries
|
||||
run: python3 tests/play_promotion_test.py
|
||||
- name: Promote only the approved existing internal release
|
||||
- name: Read tracks and complete closed testing
|
||||
env:
|
||||
GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
|
||||
PLAY_PACKAGE: xyz.waozi.shovey
|
||||
WURM_SECRET_PUBLIC_KEY: ${{ inputs.wurm_secret_public_key }}
|
||||
VERSION: ${{ inputs.version }}
|
||||
VERSION_CODE: ${{ inputs.version_code }}
|
||||
INSPECT_ONLY: ${{ inputs.inspect_only }}
|
||||
CLOSED_TRACK: ${{ vars.GOOGLE_PLAY_CLOSED_TRACK || 'alpha' }}
|
||||
run: |
|
||||
python3 scripts/promote-play-release.py --version "$VERSION" \
|
||||
--version-code "$VERSION_CODE" --entity-tools play-entity/tools
|
||||
python3 scripts/play-promote.py
|
||||
- name: Save the credential sealed to Wurm's repository key
|
||||
if: ${{ inputs.inspect_only && inputs.wurm_secret_public_key != '' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: wurm-play-secret-encrypted
|
||||
path: wurm-play-secret.encrypted
|
||||
retention-days: 1
|
||||
if-no-files-found: error
|
||||
@@ -1,6 +1,6 @@
|
||||
name: Play online
|
||||
|
||||
# shovey.waozi.xyz is the released game: the newest published release's own
|
||||
# shovey.xyz is the released game: the newest published release's own
|
||||
# shovey.zx, shovey.json and entity.zx, in Shovey's player compiled for the
|
||||
# browser, with their programs compiled into the page (scripts/build-site.py).
|
||||
# Pushes rebuild it, and so does each finished Downloads run that published a
|
||||
@@ -45,7 +45,19 @@ jobs:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
fetch-depth: 0
|
||||
filter: blob:none
|
||||
ref: ${{ inputs.revision || github.sha }}
|
||||
sparse-checkout: |
|
||||
.github/workflows/web.yml
|
||||
.github/workflows/play-bundle.yml
|
||||
scripts/prepare-pages.py
|
||||
tests/pages_packaging_test.py
|
||||
tests/play_release_notes_test.py
|
||||
site/index.html
|
||||
fastlane/metadata/android
|
||||
src/CHANGELOG.md
|
||||
version.json
|
||||
sparse-checkout-cone-mode: false
|
||||
- name: Test the site packaging and release notes
|
||||
run: |
|
||||
python3 tests/pages_packaging_test.py
|
||||
@@ -57,17 +69,20 @@ jobs:
|
||||
run: |
|
||||
if [ "$SITE_ONLY" = true ]; then
|
||||
echo 'game=false' >> "$GITHUB_OUTPUT"
|
||||
# Only explicitly marked packaging commits may skip campaign work.
|
||||
elif [ "$GITHUB_EVENT_NAME" = push ] && git cat-file -e "$BEFORE^{commit}" &&
|
||||
git log -1 --format=%B | grep -qx 'Shovey-Site-Only: true'; then
|
||||
# Reference art and downstream metadata never change the game.
|
||||
# Runtime packaging still requires its explicit site-only marker.
|
||||
elif [ "$GITHUB_EVENT_NAME" = push ] && git cat-file -e "$BEFORE^{commit}"; then
|
||||
python3 - <<'PYCODE' >> "$GITHUB_OUTPUT"
|
||||
import subprocess
|
||||
import os
|
||||
changed = subprocess.check_output(['git', 'diff', '--name-only', os.environ['BEFORE'], 'HEAD'], text=True).splitlines()
|
||||
packaging = {'.github/workflows/web.yml', 'scripts/prepare-pages.py', 'scripts/player.py',
|
||||
packaging = {'.github/workflows/web.yml', 'AGENTS.md', 'README.md', 'scripts/prepare-pages.py', 'scripts/player.py',
|
||||
'site/index.html', 'tests/pages_packaging_test.py', 'tests/pages_browser_test.py', 'tests/web_release_test.mjs',
|
||||
'Makefile', '.github/workflows/play-bundle.yml', 'tests/play_release_notes_test.py'}
|
||||
print('game=' + str(not changed or not set(changed) <= packaging).lower())
|
||||
message = subprocess.check_output(['git', 'log', '-1', '--format=%B'], text=True)
|
||||
reference_only = bool(changed) and all(path.startswith(('.gitea/', 'packaging/fdroid/metadata/', 'art/', 'tools/art/')) for path in changed)
|
||||
packaging_only = 'Shovey-Site-Only: true' in message.splitlines() and bool(changed) and set(changed) <= packaging
|
||||
print('game=' + str(not (reference_only or packaging_only)).lower())
|
||||
PYCODE
|
||||
else
|
||||
echo 'game=true' >> "$GITHUB_OUTPUT"
|
||||
@@ -88,6 +103,7 @@ jobs:
|
||||
path: waozixyz/shovey
|
||||
ref: ${{ inputs.revision || github.sha }}
|
||||
fetch-depth: 0
|
||||
filter: blob:none
|
||||
- name: Validate the requested source
|
||||
id: source
|
||||
env:
|
||||
@@ -105,7 +121,10 @@ jobs:
|
||||
project: waozixyz/shovey
|
||||
path: ziranlang/ziran
|
||||
fetch: true
|
||||
packages: build-essential cmake ripgrep pkg-config libcurl4-openssl-dev python3-pil python3-numpy
|
||||
packages: >-
|
||||
build-essential cmake meson ninja-build ripgrep pkg-config libcurl4-openssl-dev libssl-dev
|
||||
libsdl2-dev libpango1.0-dev libcairo2-dev libfontconfig1-dev
|
||||
libfreetype6-dev libglib2.0-dev libx11-dev python3-pil python3-numpy
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
@@ -116,7 +135,7 @@ jobs:
|
||||
- name: Check the game and build its ZX web edition
|
||||
run: |
|
||||
make public-test ZIRAN="$GITHUB_WORKSPACE/ziranlang/ziran/build/bin/ziran"
|
||||
make web-zx ZIRAN="$GITHUB_WORKSPACE/ziranlang/ziran/build/bin/ziran"
|
||||
KRYON_TEST_DRIVER=1 make web-zx ZIRAN="$GITHUB_WORKSPACE/ziranlang/ziran/build/bin/ziran"
|
||||
# The profile and the live campaign still need the ZX player.
|
||||
- name: Play the ZX edition in a private browser
|
||||
run: |
|
||||
@@ -199,7 +218,8 @@ jobs:
|
||||
assert run['head_sha'] == os.environ['RELEASE_SOURCE'] and run['status'] == 'completed'
|
||||
jobs = api('actions/runs/' + run_id + '/jobs?per_page=100')['jobs']
|
||||
released = api('commits/' + os.environ['RELEASE_TAG'])['sha']
|
||||
published = released == run['head_sha'] and any(j['name'] == 'release' and
|
||||
published = released == run['head_sha'] and run['conclusion'] == 'success' and any(
|
||||
j['name'] == 'Attach the F-Droid and Google Play editions' and
|
||||
j['status'] == 'completed' and j['conclusion'] == 'success' for j in jobs)
|
||||
print('true' if published else 'false')
|
||||
PYCODE
|
||||
@@ -210,10 +230,10 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
live=$(curl -fsS https://shovey.waozi.xyz/build.json | python3 -c 'import json,sys; print(json.load(sys.stdin).get("version", ""))' || true)
|
||||
live=$(curl -fsS https://shovey.xyz/build.json | python3 -c 'import json,sys; print(json.load(sys.stdin).get("version", ""))' || true)
|
||||
# The site changes with each release; a manual run rebuilds it anyway.
|
||||
if [ "$GITHUB_EVENT_NAME" != workflow_dispatch ] && [ "$live" = "${tag#v}" ]; then
|
||||
echo "::notice title=Site::shovey.waozi.xyz already runs Shovey $live"
|
||||
echo "::notice title=Site::shovey.xyz already runs Shovey $live"
|
||||
echo 'publish=false' >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo 'publish=true' >> "$GITHUB_OUTPUT"
|
||||
@@ -242,6 +262,12 @@ jobs:
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: python3 scripts/build-site.py --tag "v${{ steps.due.outputs.version }}" --output build/web-site
|
||||
- name: Build the private browser test host
|
||||
if: steps.due.outputs.publish == 'true' && !inputs.released_site_run
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
KRYON_TEST_DRIVER: '1'
|
||||
run: python3 scripts/build-site.py --tag "v${{ steps.due.outputs.version }}" --output build/web-site-check
|
||||
- name: Download the existing released site
|
||||
if: steps.due.outputs.publish == 'true' && inputs.site_only && inputs.released_site_run
|
||||
uses: actions/download-artifact@v4
|
||||
@@ -250,6 +276,14 @@ jobs:
|
||||
path: waozixyz/shovey/build/web-site
|
||||
github-token: ${{ github.token }}
|
||||
run-id: ${{ inputs.released_site_run }}
|
||||
- name: Download its private browser test host
|
||||
if: steps.due.outputs.publish == 'true' && inputs.site_only && inputs.released_site_run
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: shovey-site-check
|
||||
path: waozixyz/shovey/build/web-site-check
|
||||
github-token: ${{ github.token }}
|
||||
run-id: ${{ inputs.released_site_run }}
|
||||
- name: Repackage the released site for Pages
|
||||
if: steps.due.outputs.publish == 'true' && inputs.released_site_run
|
||||
env:
|
||||
@@ -279,7 +313,15 @@ jobs:
|
||||
if: steps.due.outputs.publish == 'true'
|
||||
run: |
|
||||
export CHROMIUM="$(command -v google-chrome || command -v chromium)"
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY YUE_DESKTOP_RECOVERY=0 node tests/web_release_test.mjs build/web-site
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY YUE_DESKTOP_RECOVERY=0 SHOVEY_PUBLIC_HOST=1 node tests/web_release_test.mjs build/web-site
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY YUE_DESKTOP_RECOVERY=0 node tests/web_release_test.mjs build/web-site-check
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: steps.due.outputs.publish == 'true'
|
||||
with:
|
||||
name: shovey-site-check
|
||||
path: waozixyz/shovey/build/web-site-check
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: steps.due.outputs.publish == 'true'
|
||||
with:
|
||||
@@ -317,6 +359,12 @@ jobs:
|
||||
with:
|
||||
name: campaign-publisher
|
||||
path: build/campaign-publisher
|
||||
- name: Verify the released Island catalog and protected package
|
||||
if: steps.current.outputs.publish == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
# Unreleased source may rebuild Island; live delivery follows the release.
|
||||
run: python3 scripts/verify-island-delivery.py --released
|
||||
- name: Publish and verify the approved campaign
|
||||
if: steps.current.outputs.publish == 'true'
|
||||
env:
|
||||
@@ -336,8 +384,14 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
environment:
|
||||
name: cloudflare-pages
|
||||
url: https://shovey.waozi.xyz
|
||||
url: https://shovey.xyz
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
||||
with:
|
||||
ref: ${{ github.event_name == 'workflow_run' && 'master' || inputs.revision || github.sha }}
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: shovey-site
|
||||
@@ -348,17 +402,20 @@ jobs:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy build/web-site --project-name=shovey --branch=master --commit-hash=${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
|
||||
- name: Check that shovey.waozi.xyz serves the release
|
||||
env:
|
||||
VERSION: ${{ needs.site.outputs.version }}
|
||||
- name: Check that shovey.xyz serves the release
|
||||
run: |
|
||||
expected=$(cat build/web-site/build.json)
|
||||
for attempt in $(seq 30); do
|
||||
live=$(curl -fsS -H 'Cache-Control: no-cache' "https://shovey.waozi.xyz/build.json?$attempt" | python3 -c 'import json,sys; print(json.load(sys.stdin).get("version", ""))' || true)
|
||||
test "$live" = "$VERSION" && curl -fsS -o /dev/null https://shovey.waozi.xyz/runtime.wasm && exit 0
|
||||
live=$(curl -fsS --max-time 10 -H 'Cache-Control: no-cache' "https://shovey.xyz/build.json?$attempt" || true)
|
||||
if [ "$live" = "$expected" ]; then exit 0; fi
|
||||
sleep 10
|
||||
done
|
||||
echo "::error::shovey.waozi.xyz serves '$live', not Shovey $VERSION"
|
||||
echo '::error::shovey.xyz did not serve the deployed build.json'
|
||||
exit 1
|
||||
- name: Play the deployed release at shovey.xyz
|
||||
run: |
|
||||
export CHROMIUM="$(command -v google-chrome || command -v chromium)"
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY YUE_DESKTOP_RECOVERY=0 SHOVEY_TEST_URL=https://shovey.xyz/ node tests/web_release_test.mjs
|
||||
|
||||
itch:
|
||||
name: Publish itch.io
|
||||
@@ -397,12 +454,18 @@ jobs:
|
||||
BUTLER_API_KEY: ${{ secrets.ITCH_API_KEY }}
|
||||
run: |
|
||||
python3 - <<'PY'
|
||||
import json, os
|
||||
import hashlib, json, os
|
||||
from pathlib import Path
|
||||
root = Path('build/web-site')
|
||||
build = json.loads((root / 'build.json').read_text())
|
||||
assert build['version'] == os.environ['SHOVEY_VERSION'], 'The site artifact belongs to another release'
|
||||
for name in ('index.html', 'arcade.json', 'runtime.js', 'runtime.wasm', 'runtime.data'):
|
||||
for name in ('index.html', 'arcade.json', 'runtime.js', 'runtime.wasm', 'runtime.data.json'):
|
||||
assert (root / name).is_file(), f'Missing web asset: {name}'
|
||||
# The game data ships in chunks (scripts/prepare-pages.py).
|
||||
manifest = root / 'runtime.data.json'
|
||||
assert hashlib.sha256(manifest.read_bytes()).hexdigest() == build['data_manifest_sha256'], 'Game data manifest does not match build.json'
|
||||
for chunk in json.loads(manifest.read_text())['chunks']:
|
||||
data = (root / chunk['name']).read_bytes()
|
||||
assert len(data) == chunk['size'] and hashlib.sha256(data).hexdigest() == chunk['sha256'], f'Bad game data chunk: {chunk["name"]}'
|
||||
PY
|
||||
butler push build/web-site waozi/shovey:html5 --userversion "$SHOVEY_VERSION"
|
||||
@@ -22,6 +22,9 @@ __pycache__/
|
||||
/.wrangler/
|
||||
|
||||
# Island stays private, only in the local folder.
|
||||
/reference/pushy-island/
|
||||
/tools/editor/private-island/
|
||||
/levels/island-drafts/
|
||||
/src/island/
|
||||
/src/island_levels.zi
|
||||
/src/solver/island_rules.zi
|
||||
|
||||
@@ -35,15 +35,17 @@ instead.
|
||||
|
||||
## Web deployment
|
||||
|
||||
Owner instruction, 2026-10-22: the playable web game lives at
|
||||
https://shovey.waozi.xyz on Cloudflare Pages, linked from https://waozi.xyz.
|
||||
Owner instruction, 2026-11-27: the playable web game lives at
|
||||
https://shovey.xyz on Cloudflare Pages, linked from https://waozi.xyz.
|
||||
Keep https://shovey.waozi.xyz as a permanent redirect to the same path and query
|
||||
on the new domain; keep the old subdomain configured.
|
||||
Do not deploy it to GitHub Pages or use a github.io play link.
|
||||
|
||||
Use the existing Cloudflare Pages deployment pattern in
|
||||
`waozixyz/waozi/.github/workflows/pages.yml`. Shovey's GitHub Actions workflow
|
||||
builds and tests the approved campaign, then deploys the `shovey` Pages
|
||||
project from `master`. Keep the website's link in its source
|
||||
`site/data/waozi.toml` pointing to the subdomain.
|
||||
`site/data/waozi.toml` pointing to https://shovey.xyz/.
|
||||
|
||||
Verify the deployed revision and playable game at the actual custom domain.
|
||||
Browser checks use a private headless browser or private display, never the
|
||||
@@ -64,3 +66,14 @@ developer editor, close and relaunch that editor after backing up its drafts and
|
||||
preserving the current level. Do not request repeat confirmation. This is the
|
||||
owner's explicit exception to the parent rule to leave running applications
|
||||
open. Keep every other application open.
|
||||
|
||||
## Pixel development installs
|
||||
|
||||
Owner correction, 2026-11-28: after every Shovey update, install the latest
|
||||
verified current-tree build on the Pixel connected to the desktop by wireless
|
||||
ADB. Resolve “wireless ADB” with Harmony's `devices` tool and verify the
|
||||
returned physical identity and host before installing. The ThinkPad phone is
|
||||
a separate device; never substitute it. Preserve the existing app package,
|
||||
data and account, check the installed version and signing certificate, and
|
||||
open the updated app. Do not capture phone screenshots for this task.
|
||||
Development installation proceeds independently of release publication.
|
||||
@@ -6,11 +6,11 @@ KRYON = $(shell $(ZIRAN) pkg path kryon $(LOCK_FLAGS))
|
||||
MINGCUTE = $(shell $(ZIRAN) pkg path mingcute $(LOCK_FLAGS))
|
||||
APPS = $(shell $(ZIRAN) pkg path apps $(LOCK_FLAGS))
|
||||
ENTITY = $(shell $(ZIRAN) pkg path entity $(LOCK_FLAGS))
|
||||
DAOCHI_CLIENT = $(shell $(ZIRAN) pkg path DaochiClient $(LOCK_FLAGS))
|
||||
MESH_CLIENT = $(shell $(ZIRAN) pkg path mesh_client $(LOCK_FLAGS))
|
||||
CRYPTO = $(shell $(ZIRAN) pkg path crypto $(LOCK_FLAGS))
|
||||
COMPLETION_MODULES = --module-path 'daochi_client=$(DAOCHI_CLIENT)' --module-path 'crypto=$(CRYPTO)/src'
|
||||
COMPLETION_MODULES = --module-path 'mesh_client=$(MESH_CLIENT)' --module-path 'crypto=$(CRYPTO)/src'
|
||||
EDITOR_OUT ?= build/private-editor
|
||||
EDITOR_DEFINES ?=
|
||||
EDITOR_DEFINES ?= $(if $(KRYON_TEST_DRIVER),--define KRYON_TEST_DRIVER)
|
||||
|
||||
# Ziran test programs: $(call ziran_test,NAME,ARGUMENTS) builds tests/NAME.zi
|
||||
# into build/tests/NAME and runs it from the repository root, without the
|
||||
@@ -21,8 +21,8 @@ ZIRAN_TEST_MODULES = --module-path 'std=$(TOOLCHAIN)/std' --module-path '$(TOOLC
|
||||
--module-path 'mingcute=$(MINGCUTE)/src'
|
||||
define ziran_test
|
||||
rm -rf build/tests/$(1)
|
||||
'$(TOOLCHAIN)/build/bin/zi2c' --exe --root tests $(ZIRAN_TEST_MODULES) --entry $(1):main -o build/tests/$(1) tests/$(1).zi
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY \
|
||||
'$(TOOLCHAIN)/build/bin/ziran' build --project --target=c --exe --root src --module-path tests --module-path src/solver --module-path tools/solver $(3) --entry $(1):main -o build/tests/$(1) tests/$(1).zi
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY YUE_DESKTOP_RECOVERY=0 \
|
||||
build/tests/$(1)/$(1) $(2)
|
||||
endef
|
||||
|
||||
@@ -57,6 +57,8 @@ editor-map-test: editor
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER -u GDK_DISPLAY YUE_DESKTOP_RECOVERY=0 SDL_AUDIODRIVER=dummy \
|
||||
xvfb-run -a -n 400 -s '-screen 0 1600x1200x24' python3 tests/developer_editor_map_ui_test.py
|
||||
|
||||
editor-ui-test star-merge-test editor-map-test: export KRYON_TEST_DRIVER=1
|
||||
|
||||
editor-ui-test: public-editor-test star-merge-test editor-server-test editor-map-test
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS YUE_DESKTOP_RECOVERY=0 \
|
||||
xvfb-run -a -n 400 -s '-screen 0 1600x1100x24' python3 tests/developer_editor_ui_test.py
|
||||
@@ -74,11 +76,7 @@ editor-ui-test: public-editor-test star-merge-test editor-server-test editor-map
|
||||
xvfb-run -a -n 400 -s '-screen 0 1600x1100x24' python3 tests/editor_memory_test.py --binary $(EDITOR_OUT)/shovey-level-editor
|
||||
|
||||
editor: levels build/ziran/libziran.a
|
||||
'$(TOOLCHAIN)/build/bin/ziran' build --target=c --root . \
|
||||
--module-path '$(KRYON)/src/ui' --module-path '$(KRYON)/src/backend' \
|
||||
--module-path 'mingcute=$(MINGCUTE)/src' \
|
||||
--module-path 'kryon=$(KRYON)/src/ui' --module-path 'kryon=$(KRYON)/src/backend' \
|
||||
--module-path 'std=$(TOOLCHAIN)/std' --module-path '$(TOOLCHAIN)/std' \
|
||||
'$(TOOLCHAIN)/build/bin/ziran' build --project $(LOCK_FLAGS) --target=c --root src --module-path tools/editor \
|
||||
$(EDITOR_DEFINES) --entry editor:main -o $(EDITOR_OUT)/c tools/editor/editor.zi
|
||||
$${CC:-cc} -std=c11 -O2 -ffunction-sections -fdata-sections -I'$(TOOLCHAIN)/include' \
|
||||
$$(find $(EDITOR_OUT)/c -type d -printf ' -iquote %p') $$(find $(EDITOR_OUT)/c -name '*.c') \
|
||||
@@ -124,6 +122,17 @@ player-linux: player
|
||||
player-windows: player
|
||||
python3 scripts/player.py windows
|
||||
|
||||
# The Windows player's sources through Ziran's front end, without MinGW: a
|
||||
# call Kryon removed fails here in a minute rather than in the release build.
|
||||
.PHONY: player-windows-check
|
||||
player-windows-check: levels
|
||||
rm -rf build/player/windows-check
|
||||
'$(TOOLCHAIN)/build/bin/ziran' ir --project $(LOCK_FLAGS) --target=c --target-os windows --target-cpu x64 \
|
||||
--define _WIN32 --define PLATFORM_DESKTOP --define __x86_64__ \
|
||||
-o build/player/windows-check src/player_windows.zi
|
||||
test: player-windows-check
|
||||
public-test: player-windows-check
|
||||
|
||||
player-bundle: player
|
||||
python3 scripts/player.py android --bundle
|
||||
|
||||
@@ -134,9 +143,11 @@ LIB_DIR ?= $(HOME)/.local/lib/shovey
|
||||
DATA_DIR ?= $(if $(XDG_DATA_HOME),$(XDG_DATA_HOME),$(HOME)/.local/share)
|
||||
.PHONY: install
|
||||
install: player-linux
|
||||
mkdir -p '$(BIN_DIR)' '$(LIB_DIR)/startup/shovey' '$(DATA_DIR)/applications' '$(DATA_DIR)/icons/hicolor/256x256/apps'
|
||||
mkdir -p '$(BIN_DIR)' '$(LIB_DIR)/startup/shovey' '$(LIB_DIR)/games' '$(DATA_DIR)/applications' '$(DATA_DIR)/icons/hicolor/256x256/apps'
|
||||
install -m 0644 build/player/linux/startup/shovey/*.png '$(LIB_DIR)/startup/shovey/'
|
||||
install -m 0644 build/player/linux/shovey.zx build/player/linux/shovey.json build/player/linux/entity.zx '$(LIB_DIR)/'
|
||||
rm -f '$(LIB_DIR)/games/'*.zx
|
||||
install -m 0644 build/player/linux/games/*.zx '$(LIB_DIR)/games/'
|
||||
install -m 0755 build/player/linux/shovey '$(LIB_DIR)/shovey.new'
|
||||
mv -f '$(LIB_DIR)/shovey.new' '$(LIB_DIR)/shovey'
|
||||
ln -sfn '$(LIB_DIR)/shovey' '$(BIN_DIR)/shovey'
|
||||
@@ -170,38 +181,36 @@ bundles: levels landscape
|
||||
# on Kryon's native player, in one folder. DESKTOP_DEFINES='--define
|
||||
# SHOVEY_UNLOCK_ALL' makes a testing copy with every level open.
|
||||
DESKTOP_DIR ?= build/desktop/shovey
|
||||
DESKTOP_APP_DIR = $(DESKTOP_DIR)/share/kryon/shovey
|
||||
DESKTOP_DEFINES ?=
|
||||
.PHONY: desktop
|
||||
desktop: bundles
|
||||
python3 scripts/prepare-web.py
|
||||
$(MAKE) -C '$(KRYON)' zx-raylib
|
||||
$(MAKE) -C '$(KRYON)' zx-player zx-window-host ZIRAN_DIR='$(TOOLCHAIN)'
|
||||
rm -rf '$(DESKTOP_DIR)'
|
||||
mkdir -p '$(DESKTOP_DIR)'
|
||||
'$(TOOLCHAIN)/build/bin/ziran' bundle --root . --module-path '$(KRYON)/src/ui' \
|
||||
--module-path 'kryon=$(KRYON)/src/ui' --module-path 'kryon=$(KRYON)/src/backend' \
|
||||
--module-path 'mingcute=$(MINGCUTE)/src' --module-path 'apps=$(APPS)/src' --module-path 'entity=$(ENTITY)/src' $(COMPLETION_MODULES) --module-path 'std=$(TOOLCHAIN)/std' --module-path '$(TOOLCHAIN)/std' \
|
||||
--module-path build/web-generated --define KRYON_HOSTED_UI --define SHOVEY_WEB --define SHOVEY_RELEASE $(DESKTOP_DEFINES) \
|
||||
mkdir -p '$(DESKTOP_DIR)/bin' '$(DESKTOP_APP_DIR)'
|
||||
'$(TOOLCHAIN)/build/bin/ziran' bundle --project $(LOCK_FLAGS) --root src \
|
||||
--module-path build/web-generated --module-path src/web --module-path src/editor --module-path src/solver \
|
||||
--define KRYON_HOSTED_UI --define SHOVEY_WEB --define SHOVEY_RELEASE $(DESKTOP_DEFINES) \
|
||||
--bind editor_view:ReadAppUiHost=host:ReadAppUiHost --bind editor_view:AppLocaleHost=host:EditorLocaleHost \
|
||||
--bind editor_view:AppRecordHost=host:EditorRecordHost --bind editor_view:SaveAppRecordHost=host:EditorSaveRecordHost \
|
||||
--bind editor_view:AppKeyHost=host:GameKeyHost --bind editor_view:AppSoundHost=host:AppSoundHost \
|
||||
--bind editor_view:SmoothFramesHost=host:SmoothFramesHost --bind editor_view:AppSupportsHost=host:GameSupportsHost \
|
||||
--bind editor_view:AppServiceHost=controls:GameServiceHost --bind editor_view:AppFieldInputHost=host:GameFieldInputHost \
|
||||
--asset-dir assets=build/web-assets/assets --entry game:Main \
|
||||
-o '$(DESKTOP_DIR)/app.zx' src/web/game.zi
|
||||
cp '$(KRYON)/build/zx-raylib/zx' '$(DESKTOP_DIR)/shovey'
|
||||
cp '$(KRYON)/build/zx-raylib/kryon-font.ttf' '$(DESKTOP_DIR)/'
|
||||
printf 'Shovey\n' > '$(DESKTOP_DIR)/app.title'
|
||||
'$(DESKTOP_DIR)/shovey' --check '$(DESKTOP_DIR)/app.zx'
|
||||
-o '$(DESKTOP_APP_DIR)/app.zx' src/web/game.zi
|
||||
cp '$(KRYON)/build/bin/zx' '$(DESKTOP_DIR)/bin/shovey'
|
||||
cp '$(KRYON)/assets/fonts/LiberationSans-Regular.ttf' '$(DESKTOP_DIR)/bin/kryon-font.ttf'
|
||||
printf 'Shovey\n' > '$(DESKTOP_APP_DIR)/app.title'
|
||||
'$(DESKTOP_DIR)/bin/shovey' --check '$(DESKTOP_APP_DIR)/app.zx'
|
||||
|
||||
web-zx: bundles
|
||||
python3 scripts/prepare-web.py
|
||||
rm -rf build/web
|
||||
mkdir -p build/web
|
||||
'$(TOOLCHAIN)/build/bin/ziran' bundle --root . --module-path '$(KRYON)/src/ui' \
|
||||
--module-path 'kryon=$(KRYON)/src/ui' --module-path 'kryon=$(KRYON)/src/backend' \
|
||||
--module-path 'mingcute=$(MINGCUTE)/src' --module-path 'apps=$(APPS)/src' --module-path 'std=$(TOOLCHAIN)/std' --module-path '$(TOOLCHAIN)/std' \
|
||||
--module-path build/web-generated --define KRYON_HOSTED_UI --define SHOVEY_WEB --define SHOVEY_RELEASE \
|
||||
--module-path 'entity=$(ENTITY)/src' $(COMPLETION_MODULES) \
|
||||
'$(TOOLCHAIN)/build/bin/ziran' bundle --project $(LOCK_FLAGS) --root src \
|
||||
--module-path build/web-generated --module-path src/web --module-path src/editor --module-path src/solver \
|
||||
--define KRYON_HOSTED_UI --define SHOVEY_WEB --define SHOVEY_RELEASE \
|
||||
--bind editor_view:ReadAppUiHost=host:ReadAppUiHost --bind editor_view:AppLocaleHost=host:EditorLocaleHost \
|
||||
--bind editor_view:AppRecordHost=host:EditorRecordHost --bind editor_view:SaveAppRecordHost=host:EditorSaveRecordHost \
|
||||
--bind editor_view:AppKeyHost=host:GameKeyHost --bind editor_view:AppSoundHost=host:AppSoundHost \
|
||||
@@ -240,8 +249,9 @@ web: bundles
|
||||
python3 scripts/prepare-web.py
|
||||
rm -rf $(WEB_OUT) $(WEB_NATIVE_OUT)
|
||||
mkdir -p $(WEB_OUT) $(WEB_NATIVE_OUT)/c
|
||||
'$(ZIRAN)' build --project $(LOCK_FLAGS) --target=c --module-path build/web-generated \
|
||||
'$(ZIRAN)' build --project $(LOCK_FLAGS) --target=c --target-os web --target-cpu wasm32 --root src --module-path build/web-generated \
|
||||
--module-path src/web --module-path src/editor --module-path src/solver \
|
||||
$(if $(KRYON_TEST_DRIVER),--define KRYON_TEST_DRIVER) \
|
||||
--define PLATFORM_WEB --define BUNDLE_NATIVE_RENDERER --define SHOVEY_WEB --define SHOVEY_RELEASE \
|
||||
--entry web_profile_main:main --bind kryon/canvas_app_run:CanvasAppMain=game:Main \
|
||||
--bind editor_view:ReadAppUiHost=host:ReadAppUiHost --bind editor_view:AppLocaleHost=host:EditorLocaleHost \
|
||||
@@ -273,13 +283,15 @@ web-crazygames: web
|
||||
package-crazygames-test:
|
||||
sh tests/package_crazygames_test.sh
|
||||
|
||||
web-test referral-web-test: KRYON_TEST_DRIVER := 1
|
||||
|
||||
web-test: web
|
||||
$(JS_RUNTIME) tests/web_mini_test.mjs
|
||||
$(JS_RUNTIME) tests/web_tap_beside_board_test.mjs
|
||||
$(JS_RUNTIME) tests/web_copy_test.mjs
|
||||
$(JS_RUNTIME) tests/web_live_campaign_test.mjs
|
||||
|
||||
# Requires Daochi's signed referral-fixture.test; all state and traffic stay local.
|
||||
# Requires Mesh's signed referral-fixture.test; all state and traffic stay local.
|
||||
.PHONY: referral-web-test
|
||||
referral-web-test: web
|
||||
$(JS_RUNTIME) tests/referral_web_test.mjs
|
||||
@@ -311,14 +323,17 @@ bench: levels build/ziran/libziran.a
|
||||
build/ziran/libziran.a -Wl,--gc-sections -lm -lpthread -o build/solver/shovey-bench
|
||||
|
||||
# The checks the public repository can run with only the published campaign.
|
||||
# A prepared locked compiler already contains its native runtime. Reuse it
|
||||
# rather than building a second compiler/runtime tree just for this fixture.
|
||||
CHEST_RUNTIME = $(if $(wildcard $(TOOLCHAIN)/build/libziran.a),$(TOOLCHAIN)/build/libziran.a,build/ziran/libziran.a)
|
||||
.PHONY: chest-fixture
|
||||
chest-fixture: build/ziran/libziran.a
|
||||
chest-fixture: $(CHEST_RUNTIME)
|
||||
'$(TOOLCHAIN)/build/bin/ziran' build --target=c --root . \
|
||||
--module-path 'std=$(TOOLCHAIN)/std' --module-path '$(TOOLCHAIN)/std' \
|
||||
--entry chest_fixture:main -o build/chest-test/c tests/chest_fixture.zi
|
||||
$${CC:-cc} -std=c11 -O1 -I'$(TOOLCHAIN)/include' \
|
||||
$$(find build/chest-test/c -type d -printf ' -iquote %p') \
|
||||
$$(find build/chest-test/c -name '*.c') build/ziran/libziran.a -lm -lpthread -o build/chest-test/fixture
|
||||
$$(find build/chest-test/c -name '*.c') '$(CHEST_RUNTIME)' -lm -lpthread -o build/chest-test/fixture
|
||||
build/chest-test/fixture build/chest-test/fixture.txt
|
||||
|
||||
.PHONY: artifact-test artifact-provider-test
|
||||
@@ -356,6 +371,8 @@ shop-test: collectibles-test levels
|
||||
sh tests/island_unlock_test.sh
|
||||
python3 tests/island_package_test.py
|
||||
python3 tests/island_catalog_test.py
|
||||
python3 tests/island_campaign_config_test.py
|
||||
python3 tests/island_live_delivery_test.py
|
||||
APPS_NODE_RELEASE='$(APPS)/scripts/node_release.py' python3 tests/island_publication_test.py
|
||||
|
||||
.PHONY: forest-puzzle-test
|
||||
@@ -366,16 +383,17 @@ forest-puzzle-test: solver
|
||||
official-update-test: levels
|
||||
$(call ziran_test,official_update_test)
|
||||
|
||||
public-test: barrels-test solver laws game-maps-test level-select-test shop-test official-update-test forest-puzzle-test
|
||||
public-test: hints-loading-test barrels-test solver laws game-maps-test level-select-test shop-test official-update-test forest-puzzle-test
|
||||
python3 tests/star_start_test.py
|
||||
python3 tests/editor_server_test.py
|
||||
python3 tests/campaign_publication_test.py
|
||||
$(call ziran_test,board_effects_test)
|
||||
$(call ziran_test,shooter_puzzle_test)
|
||||
sh tests/guide_test.sh '$(TOOLCHAIN)'
|
||||
python3 tests/hidden_levels_test.py
|
||||
sh tests/secret_travel_test.sh '$(TOOLCHAIN)'
|
||||
sh tests/rewards_test.sh '$(TOOLCHAIN)' '$(ENTITY)'
|
||||
sh tests/shared_progress_test.sh '$(TOOLCHAIN)'
|
||||
sh tests/rewards_test.sh
|
||||
sh tests/shared_progress_test.sh
|
||||
sh tests/completion_path_test.sh '$(TOOLCHAIN)'
|
||||
sh tests/level_replay_test.sh '$(TOOLCHAIN)'
|
||||
python3 tools/levels/levels.py generate --check
|
||||
@@ -399,7 +417,7 @@ laws:
|
||||
|
||||
# Level pictures are ignored generated assets, so a source-only checkout or
|
||||
# an earlier custom --cell preview must be regenerated before asset validation.
|
||||
test: barrels-test solver laws game-maps-test shop-test forest-puzzle-test previews
|
||||
test: hints-loading-test barrels-test solver laws game-maps-test shop-test forest-puzzle-test previews
|
||||
python3 tests/play_release_notes_test.py
|
||||
python3 tests/pages_packaging_test.py
|
||||
python3 tests/star_start_test.py
|
||||
@@ -407,12 +425,12 @@ test: barrels-test solver laws game-maps-test shop-test forest-puzzle-test previ
|
||||
python3 tests/campaign_publication_test.py
|
||||
python3 tests/build_artifacts_test.py
|
||||
$(call ziran_test,board_effects_test)
|
||||
$(call ziran_test,shooter_puzzle_test)
|
||||
sh tests/guide_test.sh '$(TOOLCHAIN)'
|
||||
python3 tests/hidden_levels_test.py
|
||||
sh tests/secret_travel_test.sh '$(TOOLCHAIN)'
|
||||
sh tests/rewards_test.sh '$(TOOLCHAIN)' '$(ENTITY)'
|
||||
sh tests/rewards_test.sh
|
||||
python3 tools/levels/levels.py generate --check
|
||||
python3 tools/levels/landscape.py --check
|
||||
python3 tests/levels_test.py
|
||||
python3 tests/classic_difficulty_test.py
|
||||
python3 tests/classic_63_65_68_test.py
|
||||
@@ -424,7 +442,6 @@ test: barrels-test solver laws game-maps-test shop-test forest-puzzle-test previ
|
||||
sh tests/engine_test.sh '$(TOOLCHAIN)' '$(ENTITY)'
|
||||
$(call ziran_test,solver_test)
|
||||
sh tests/controls_test.sh '$(TOOLCHAIN)'
|
||||
sh tests/rewards_test.sh '$(TOOLCHAIN)' '$(ENTITY)'
|
||||
sh tests/shared_progress_test.sh '$(TOOLCHAIN)'
|
||||
sh tests/completion_path_test.sh '$(TOOLCHAIN)'
|
||||
sh tests/level_replay_test.sh '$(TOOLCHAIN)'
|
||||
@@ -531,5 +548,27 @@ world-map-tiles:
|
||||
world-map-test:
|
||||
python3 tests/world_map_art_test.py
|
||||
sh tests/world_map_layout_test.sh
|
||||
sh tests/world_map_progression_test.sh
|
||||
$(MAKE) level-select-test
|
||||
|
||||
.PHONY: hints-loading-test
|
||||
hints-loading-test: levels
|
||||
$(call ziran_test,hints_loading_test,,--define SHOVEY_RELEASE)
|
||||
'$(TOOLCHAIN)/build/bin/ziran' bundle --root tests $(ZIRAN_TEST_MODULES) --define SHOVEY_RELEASE --entry hints_loading_test:main -o build/tests/hints_loading_test.zx tests/hints_loading_test.zi
|
||||
test "$$('$(TOOLCHAIN)/build/bin/ziran' run build/tests/hints_loading_test.zx | tail -n 1)" = 0
|
||||
|
||||
.PHONY: island-collectible-book-test
|
||||
island-collectible-book-test:
|
||||
@if test -f src/island/keepsake_book.zi; then $(MAKE) island-collectible-book-test-private; else echo "Private Island source unavailable; book test skipped"; fi
|
||||
|
||||
island-collectible-book-test-private:
|
||||
$(call ziran_test,island_collectible_book_test,,--module-path src/island --bind-host island_collectible_book_test)
|
||||
'$(TOOLCHAIN)/build/bin/ziran' bundle --project $(LOCK_FLAGS) --root src --module-path src/island --module-path tests --bind-host island_collectible_book_test --entry island_collectible_book_test:main -o build/tests/island_collectible_book_test.zx tests/island_collectible_book_test.zi
|
||||
test "$$('$(TOOLCHAIN)/build/bin/ziran' run build/tests/island_collectible_book_test.zx | tail -n 1)" = 0
|
||||
|
||||
.PHONY: island-gameplay-test
|
||||
island-gameplay-test:
|
||||
@if test -f src/island/island_engine.zi; then $(MAKE) island-gameplay-test-private; else echo "Private Island source unavailable; gameplay test skipped"; fi
|
||||
|
||||
island-gameplay-test-private:
|
||||
python3 scripts/island_campaign.py
|
||||
$(call ziran_test,island_gameplay_test,,--module-path src/island)
|
||||
@@ -9,7 +9,7 @@
|
||||
A colorful puzzle adventure about finding a path home. Push balls into matching
|
||||
pits, move crates onto their marks and untangle the board one move at a time.
|
||||
|
||||
[Play online](https://shovey.waozi.xyz/)
|
||||
[Play online](https://shovey.xyz/)
|
||||
· [Play on itch.io](https://waozi.itch.io/shovey)
|
||||
· [Download for Android, Linux and Windows](https://github.com/waozixyz/shovey/releases/latest)
|
||||
· [What's new](src/CHANGELOG.md)
|
||||
@@ -56,6 +56,19 @@ against the public catalog's exact size and SHA-256 digest.
|
||||
|
||||
BSD 3-Clause. See [LICENSE](LICENSE).
|
||||
|
||||
## Android verification
|
||||
|
||||
After installing the signed APK on an authorized test phone, check the actual
|
||||
installed player:
|
||||
|
||||
```sh
|
||||
python3 tests/android_player_smoke_test.py --serial PHONE_SERIAL
|
||||
```
|
||||
|
||||
This opens Shovey without clearing its data, checks startup errors and a visible
|
||||
screen, and saves phone screenshots under `build/player/android-smoke`. Also
|
||||
verify the title artwork, Classic map, level sprites and movement on that phone.
|
||||
|
||||
## World map development
|
||||
|
||||
Reusable map tools live in `scripts/` and `tests/`. The generator uses Pillow,
|
||||
@@ -76,11 +89,20 @@ python3 tests/world_map_spacing_test.py
|
||||
build-queue -- make world-map-test player-linux
|
||||
```
|
||||
|
||||
Run progression independently, or test Play, map selection and double-click
|
||||
entry on a private Xvfb display after building the player:
|
||||
Linux and Windows player builds use `ccache` when installed, reusing unchanged
|
||||
C units in `$XDG_CACHE_HOME/shovey-ccache` (or `~/.cache/shovey-ccache`), with a
|
||||
512 MB limit. Compiler, header and flag changes invalidate those units;
|
||||
libraries are linked on every build. Without `ccache`, builds use the normal
|
||||
compiler. The chest fixture reuses the locked compiler's runtime when present.
|
||||
|
||||
On a published release, GitHub verifies and reuses Gitea's signed normal APK
|
||||
as the identical F-Droid reference. Manual rehearsals still build it from
|
||||
source; the independent F-Droid reproducibility workflow remains in place.
|
||||
|
||||
Test Play, map selection and double-click entry on a private Xvfb display
|
||||
after building the player:
|
||||
|
||||
```sh
|
||||
build-queue -- sh tests/world_map_progression_test.sh
|
||||
sh tests/world_map_selection_ui_test.sh
|
||||
```
|
||||
|
||||
|
||||
@@ -8,12 +8,6 @@
|
||||
"local.campaign",
|
||||
"campaign"
|
||||
],
|
||||
"library_entries": [
|
||||
"json_scan:ArrayPositions",
|
||||
"json_scan:ElementAt",
|
||||
"json_scan:ReadStringValue",
|
||||
"levels:ShoveyLevelSolution"
|
||||
],
|
||||
"cover": {
|
||||
"portrait": "assets/shovey/title-portrait.png",
|
||||
"landscape": "assets/shovey/title-landscape.png",
|
||||
@@ -23,6 +17,7 @@
|
||||
},
|
||||
{
|
||||
"manifest": "packaging/island.json",
|
||||
"enabled": false,
|
||||
"external": true,
|
||||
"standalone_bundle": "shovey-island.zx",
|
||||
"cover": {
|
||||
@@ -34,7 +29,6 @@
|
||||
},
|
||||
{
|
||||
"manifest": "src/editor/catalog.json",
|
||||
"shared_code": true,
|
||||
"cover": {
|
||||
"portrait": "assets/shovey/editor-portrait.png",
|
||||
"landscape": "assets/shovey/editor-landscape.png",
|
||||
|
||||
|
After Width: | Height: | Size: 290 KiB |
|
After Width: | Height: | Size: 735 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 273 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 466 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 331 KiB |
|
After Width: | Height: | Size: 320 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 155 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 127 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 656 KiB |
|
After Width: | Height: | Size: 656 KiB |
|
After Width: | Height: | Size: 582 KiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 347 KiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 3.5 MiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 3.5 MiB |
|
After Width: | Height: | Size: 367 KiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 978 KiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 319 KiB |
|
After Width: | Height: | Size: 143 KiB |
|
After Width: | Height: | Size: 350 KiB |
|
After Width: | Height: | Size: 314 KiB |
|
After Width: | Height: | Size: 172 KiB |
|
After Width: | Height: | Size: 274 KiB |
|
After Width: | Height: | Size: 197 KiB |
|
After Width: | Height: | Size: 210 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 2.3 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 984 KiB |
|
After Width: | Height: | Size: 2.1 MiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 2.3 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 505 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 3.8 MiB |
|
After Width: | Height: | Size: 3.5 MiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 267 KiB |
|
After Width: | Height: | Size: 325 KiB |
|
After Width: | Height: | Size: 641 KiB |
|
After Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 309 KiB |
|
After Width: | Height: | Size: 603 KiB |
|
After Width: | Height: | Size: 319 KiB |
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 332 KiB |
|
After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 253 KiB |
|
After Width: | Height: | Size: 258 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 3.2 MiB |
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 2.8 MiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 594 KiB |
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 621 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 623 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 663 KiB |
|
Before Width: | Height: | Size: 243 KiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 529 KiB |