updated the runner to utilize caching
CI / Detect changed paths (pull_request) Successful in 5s
CI / Odin unit tests and build (pull_request) Successful in 1m10s
CI / API unit tests and lint (pull_request) Has been skipped
CI / Infra unit tests, vet, and preview (pull_request) Successful in 59s

This commit is contained in:
2026-09-06 14:08:13 -06:00
committed by Samuel ONeal
parent 89a41262af
commit 8c74efcedb
3 changed files with 42 additions and 6 deletions
+15 -6
View File
@@ -18,10 +18,19 @@ case "$ARCH" in
;;
esac
curl -fL -o /tmp/odin.tar.gz \
"https://github.com/odin-lang/Odin/releases/download/${VERSION}/odin-linux-${OBJ_ARCH}-${VERSION}.tar.gz"
mkdir -p /tmp/odin
tar -xzf /tmp/odin.tar.gz -C /tmp/odin --strip-components=1
# If a prior job restored the install from cache, reuse it instead of
# re-downloading. The extracted Odin binary already on PATH is authoritative;
# otherwise fetch the version (plus the raylib workaround) fresh.
if [ -x /tmp/odin/odin ]; then
echo "Odin ${VERSION} found in cache (host arch: ${ARCH}, release arch: ${OBJ_ARCH})"
BIN_DIR=/tmp/odin
else
curl -fL -o /tmp/odin.tar.gz \
"https://github.com/odin-lang/Odin/releases/download/${VERSION}/odin-linux-${OBJ_ARCH}-${VERSION}.tar.gz"
mkdir -p /tmp/odin
tar -xzf /tmp/odin.tar.gz -C /tmp/odin --strip-components=1
BIN_DIR=/tmp/odin
fi
# Work around an Odin binding bug: for ODIN_ARCH == .arm64 the vendored
# raylib references `vendor/raylib/linux-arm/libraylib.a`, but the release
@@ -33,7 +42,7 @@ if [ "${OBJ_ARCH}" = "arm64" ] \
fi
if [ -n "${GITHUB_PATH:-}" ]; then
echo "/tmp/odin" >> "$GITHUB_PATH"
echo "${BIN_DIR}" >> "$GITHUB_PATH"
fi
echo "Installed Odin ${VERSION} (host arch: ${ARCH}, release arch: ${OBJ_ARCH})"
echo "Odin ${VERSION} ready (host arch: ${ARCH}, release arch: ${OBJ_ARCH})"