Files
DroidDeck/.github/workflows/watch-proton-releases.yml
T
MaxsTechReview 8edf05b19a Add the droiddeck-esync pack pipeline (#189)
Builds esync packs for new Valve, GE and CachyOS Proton 11 releases on arm64
runners, smoke-tests them against stock with esstress, and on main publishes
each pack and a signed index as non-latest releases. A watcher checks Steam
and the GE/CachyOS releases every 20 minutes and starts a build for new ones.
The app side lands separately with feat/userspace-esync-ntsync.
2026-10-04 02:58:55 +00:00

113 lines
3.7 KiB
YAML

name: Watch Proton releases
on:
schedule:
- cron: '*/20 * * * *'
workflow_dispatch:
permissions:
contents: write
actions: write
concurrency:
group: watch-proton-releases
cancel-in-progress: false
jobs:
watch:
if: ${{ github.repository == 'Droid-Deck/DroidDeck' }}
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Pick the steamcmd cache week
id: week
run: echo "week=$(date -u +%G-%V)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
with:
path: ~/steamcmd
key: steamcmd-${{ runner.os }}-${{ steps.week.outputs.week }}
restore-keys: steamcmd-${{ runner.os }}-
- name: Read the Proton builds Steam ships
run: |
set -euo pipefail
sudo apt-get update -qq
sudo apt-get install -y -qq lib32gcc-s1 >/dev/null
mkdir -p ~/steamcmd
if [ ! -x ~/steamcmd/steamcmd.sh ]; then
curl -fsSL https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz | tar -xz -C ~/steamcmd
fi
apps=$(python3 tools/droiddeck-esync/discover.py steam-apps)
args=(+login anonymous +app_info_update 1)
for app in $apps; do
args+=(+app_info_print "$app")
done
if ! timeout 300 ~/steamcmd/steamcmd.sh "${args[@]}" +quit > steam-info.txt 2>&1; then
tail -n 20 steam-info.txt
echo "::warning::steamcmd failed; this run watches the source tags only"
: > steam-info.txt
fi
- name: Fetch the previous watch state
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
mkdir -p previous
if ! out=$(gh release download droiddeck-esync-index -R "$GITHUB_REPOSITORY" -p watch-state.json -D previous --clobber 2>&1); then
if grep -qiE 'release not found|no assets match' <<<"$out"; then
echo "::notice::no watch state yet; every flavor counts as new"
else
echo "$out" >&2
exit 1
fi
fi
- name: Compare with the last run
id: watch
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
info=()
if [ -s steam-info.txt ]; then
info=(--steam-info steam-info.txt)
fi
python3 tools/droiddeck-esync/discover.py watch --state previous/watch-state.json "${info[@]}" --out watch-state.json
- name: Start the pack builds
if: steps.watch.outputs.changed != ''
env:
GH_TOKEN: ${{ github.token }}
CHANGED: ${{ steps.watch.outputs.changed }}
run: |
set -euo pipefail
read -r -a flavors <<<"$CHANGED"
if [ "${#flavors[@]}" -gt 1 ]; then
flavors=(all)
fi
for flavor in "${flavors[@]}"; do
gh workflow run build-droiddeck-esync-packs.yml -R "$GITHUB_REPOSITORY" --ref main -f flavor="$flavor" -f publish=true
echo "Started the pack build for $flavor" >> "$GITHUB_STEP_SUMMARY"
done
- name: Save the watch state
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
tag=droiddeck-esync-index
if ! gh release view "$tag" -R "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
echo "::notice::$tag does not exist yet; the state is saved once the first index is published"
exit 0
fi
if cmp -s watch-state.json previous/watch-state.json; then
exit 0
fi
gh release upload "$tag" -R "$GITHUB_REPOSITORY" watch-state.json --clobber