ci: use Tsinghua apt/apk mirrors on the runner
ci / linux (clang) (push) Failing after 18s
ci / linux (gcc) (push) Failing after 17s
ci / musl (push) Canceled after 0s
ci / macos (push) Canceled after 0s
ci / sanitizers (push) Canceled after 14m31s

Install was pulling bookworm packages from deb.debian.org; the domestic
Gitea runner crawls that for minutes. Rewrite sources to TUNA before
apt-get/apk, with CST_CI_MIRROR to override.
This commit is contained in:
WHC
2026-10-07 01:42:56 +08:00
parent daa92a6cfb
commit 9ec21b7fc0
2 changed files with 78 additions and 1 deletions
+7 -1
View File
@@ -16,6 +16,7 @@ jobs:
- name: Install dependencies
run: |
SUDO=$(command -v sudo || true)
$SUDO bash scripts/ci_pkg_mirror.sh
$SUDO apt-get update
$SUDO apt-get install -y --no-install-recommends \
build-essential clang cmake pkg-config python3 \
@@ -42,6 +43,7 @@ jobs:
- name: Install dependencies
run: |
SUDO=$(command -v sudo || true)
$SUDO bash scripts/ci_pkg_mirror.sh
$SUDO apt-get update
$SUDO apt-get install -y --no-install-recommends \
build-essential pkg-config libcurl4-openssl-dev libncurses-dev
@@ -53,7 +55,11 @@ jobs:
container: alpine:3.20
steps:
- name: Install dependencies
run: apk add --no-cache build-base pkgconf curl-dev ncurses-dev git nodejs bash python3
run: |
# Container has no checkout yet; rewrite apk repos in place.
sed -i 's#https\?://dl-cdn.alpinelinux.org/alpine#https://mirrors.tuna.tsinghua.edu.cn/alpine#g' \
/etc/apk/repositories
apk add --no-cache build-base pkgconf curl-dev ncurses-dev git nodejs bash python3
- uses: actions/checkout@v4
- name: Build + unit tests
run: |