mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-23 00:36:42 -10:00
A job on the ubuntu-24.04-arm runner builds RetroArch with OpenXR and uploads the stripped binary, so aarch64 testers, such as Steam Frame users, can download a build of any commit or pull request. The apt cache key now carries the runner's architecture off x86-64, so an arm job never restores an amd64 entry; x86-64 keys are unchanged and their caches stay warm. When a download stalls, apt-install.sh retries architectures other than amd64 and i386 from ports.ubuntu.com, since archive.ubuntu.com carries no arm64 packages.
21 lines
882 B
Bash
21 lines
882 B
Bash
#!/bin/sh
|
|
# The actions/cache key for apt-install.sh's cache: the packages asked
|
|
# for and the runner image. Jobs asking for the same packages share an
|
|
# entry, so the repository's cache holds each set once. A new runner
|
|
# image makes a new entry, seeded through the prefix by the last one's;
|
|
# apt-install.sh refreshes what no longer resolves.
|
|
# Off x86-64 the key also names the runner's architecture.
|
|
#
|
|
# apt-cache-key.sh "PACKAGE..." (writes key= and prefix= to
|
|
# GITHUB_OUTPUT)
|
|
set -eu
|
|
pkgs=$(printf '%s\n' $1 | sort -u | tr '\n' ' ')
|
|
hash=$(printf '%s' "$pkgs" | sha256sum | cut -c1-16)
|
|
arch=
|
|
[ "${RUNNER_ARCH:-X64}" = X64 ] || arch="$RUNNER_ARCH-"
|
|
prefix="apt-${ImageOS:-unknown}-$arch$hash-"
|
|
key="$prefix${ImageVersion:-unknown}"
|
|
echo "key=$key" >> "$GITHUB_OUTPUT"
|
|
echo "prefix=$prefix" >> "$GITHUB_OUTPUT"
|
|
echo "apt cache key: $key"
|