From 51956c1a49a7dc9ed70a6fba480a670a7e7b2b9b Mon Sep 17 00:00:00 2001 From: Ysopwnable <161784452+N0zoM1z0@users.noreply.github.com> Date: Thu, 8 Oct 2026 03:08:53 +0800 Subject: [PATCH] fix(ci): avoid slow Azure archive for the native cross compiler (#1016) * fix(ci): avoid slow Azure archive for the native cross compiler * fix(ci): use HTTPS for Ubuntu archive transfers --- .github/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6ce23b97..68fe78701 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -231,7 +231,16 @@ jobs: with: node-version-file: .nvmrc - name: Prepare cross compiler - run: sudo apt-get update && sudo apt-get install --no-install-recommends -y g++-mingw-w64-x86-64 + run: | + # Slow Azure archive transfers can exhaust the job before compilation. + # Keep the same signed packages and avoid slow HTTP mirror fallback. + for source in /etc/apt/apt-mirrors.txt /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu.sources; do + if [ -f "$source" ]; then + sudo sed -i 's|azure.archive.ubuntu.com|archive.ubuntu.com|g; s|http://archive.ubuntu.com|https://archive.ubuntu.com|g' "$source" + fi + done + sudo apt-get update + sudo apt-get install --no-install-recommends -y g++-mingw-w64-x86-64 - run: npm run build:windows-native - run: npm run verify:windows-native:artifact - uses: actions/upload-artifact@v4