ci(windows): use locally-cached DB tool zips when present
Release / windows (push) Failing after 5m56s
Release / linux (push) Successful in 17m46s

archive.mariadb.org / get.enterprisedb.com downloads are extremely slow from
the self-hosted Windows runner (30-40+ min for the MariaDB zip). Check for a
pre-downloaded copy at C:\ci\cache\ first and copy it, falling back to the
network download only when absent.
This commit is contained in:
2026-09-01 08:25:20 +08:00
parent 4ac738e6e9
commit 927798417a
+14 -2
View File
@@ -189,7 +189,13 @@ jobs:
OUT="${GITHUB_WORKSPACE}/desktop/src-tauri/resources/pg_tools" OUT="${GITHUB_WORKSPACE}/desktop/src-tauri/resources/pg_tools"
mkdir -p "$OUT" mkdir -p "$OUT"
URL="https://get.enterprisedb.com/postgresql/postgresql-${PG_VER}-1-windows-x64-binaries.zip" URL="https://get.enterprisedb.com/postgresql/postgresql-${PG_VER}-1-windows-x64-binaries.zip"
curl -fsSL "$URL" -o /tmp/pg.zip CACHE="/c/ci/cache/postgresql-${PG_VER}-1-windows-x64-binaries.zip"
if [ -f "$CACHE" ]; then
echo "Using cached PG zip: $CACHE"
cp "$CACHE" /tmp/pg.zip
else
curl -fsSL "$URL" -o /tmp/pg.zip
fi
EXPECTED="3508d8f085bc3980f38211a82e3f31e5fcae9952105d3dc2f8be67b64a822baa" EXPECTED="3508d8f085bc3980f38211a82e3f31e5fcae9952105d3dc2f8be67b64a822baa"
echo "$EXPECTED /tmp/pg.zip" | sha256sum -c - echo "$EXPECTED /tmp/pg.zip" | sha256sum -c -
sha256sum /tmp/pg.zip sha256sum /tmp/pg.zip
@@ -205,7 +211,13 @@ jobs:
OUT="${GITHUB_WORKSPACE}/desktop/src-tauri/resources/mysql_tools" OUT="${GITHUB_WORKSPACE}/desktop/src-tauri/resources/mysql_tools"
mkdir -p "$OUT" mkdir -p "$OUT"
URL="https://archive.mariadb.org/mariadb-${MARIADB_VER}/winx64-packages/mariadb-${MARIADB_VER}-winx64.zip" URL="https://archive.mariadb.org/mariadb-${MARIADB_VER}/winx64-packages/mariadb-${MARIADB_VER}-winx64.zip"
curl -fsSL "$URL" -o /tmp/mariadb.zip CACHE="/c/ci/cache/mariadb-${MARIADB_VER}-winx64.zip"
if [ -f "$CACHE" ]; then
echo "Using cached MariaDB zip: $CACHE"
cp "$CACHE" /tmp/mariadb.zip
else
curl -fsSL "$URL" -o /tmp/mariadb.zip
fi
sha256sum /tmp/mariadb.zip sha256sum /tmp/mariadb.zip
unzip -o /tmp/mariadb.zip -d /tmp/mariadb unzip -o /tmp/mariadb.zip -d /tmp/mariadb
WINROOT="/tmp/mariadb/mariadb-${MARIADB_VER}-winx64" WINROOT="/tmp/mariadb/mariadb-${MARIADB_VER}-winx64"