[PR #5176] [CLOSED] ci: use pre-installed MSYS2 on Windows runner to fix intermittent build failure #5806

Closed
opened 2026-11-02 04:04:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5176
Author: @Copilot
Created: 6/10/2026
Status: ❌ Closed

Base: main ← Head: copilot/fix-github-actions-build-windows


📝 Commits (2)

  • 0eb9500 Initial plan
  • 4a782b5 fix(ci): use pre-installed MSYS2 to avoid installer download failure on Windows build

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 .github/workflows/release.yml (+1 -0)

📄 Description

Summary

msys2/setup-msys2@v2 was silently crashing during the MSYS2 installer download step on the Windows build, causing the job to fail whenever MSYS2 was absent from the Actions tool cache (e.g. fork PRs, fresh runners).

Why

The action's default release: true mode downloads the MSYS2 installer (~100 MB) from GitHub Releases when no cached copy is available. This download fails immediately (~0.37 s) without a useful error in the log. Runs that hit a warm cache (same branch, prior run) succeeded; fork PRs and cache-cold runs failed consistently.

Setting release: false instructs the action to use the MSYS2 already pre-installed on every windows-latest runner image at C:\msys64, bypassing the download/cache path entirely. Package installation via pacman continues to work as before.

- name: Install MSYS2
  uses: msys2/setup-msys2@v2
  with:
    msystem: MINGW64
    update: true
    release: false          # use pre-installed C:\msys64 instead of downloading
    install: >-
      mingw-w64-x86_64-gcc
      mingw-w64-x86_64-sqlite3
      mingw-w64-x86_64-pkg-config

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

How was this tested?

Compared failing job 80604056581 (MSYS2 download crash after 0.37 s) against a successful run (MSYS2 served from warm tool cache). The release: false path in the action's source code unconditionally uses C:\msys64 and is unaffected by cache state.

Screenshots / recordings

N/A

Breaking changes

None

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • go build ./... and the test suite pass locally.
  • For frontend changes: npm run lint, npm run typecheck, and npm run build pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/5176 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 6/10/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `copilot/fix-github-actions-build-windows` --- ### 📝 Commits (2) - [`0eb9500`](https://github.com/MHSanaei/3x-ui/commit/0eb95008a5957647108f9b00b1898196aa525090) Initial plan - [`4a782b5`](https://github.com/MHSanaei/3x-ui/commit/4a782b570511abffedfb58cc480e23c24ae8f568) fix(ci): use pre-installed MSYS2 to avoid installer download failure on Windows build ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/release.yml` (+1 -0) </details> ### 📄 Description ## Summary `msys2/setup-msys2@v2` was silently crashing during the MSYS2 installer download step on the Windows build, causing the job to fail whenever MSYS2 was absent from the Actions tool cache (e.g. fork PRs, fresh runners). ## Why The action's default `release: true` mode downloads the MSYS2 installer (~100 MB) from GitHub Releases when no cached copy is available. This download fails immediately (~0.37 s) without a useful error in the log. Runs that hit a warm cache (same branch, prior run) succeeded; fork PRs and cache-cold runs failed consistently. Setting `release: false` instructs the action to use the MSYS2 already pre-installed on every `windows-latest` runner image at `C:\msys64`, bypassing the download/cache path entirely. Package installation via `pacman` continues to work as before. ```yaml - name: Install MSYS2 uses: msys2/setup-msys2@v2 with: msystem: MINGW64 update: true release: false # use pre-installed C:\msys64 instead of downloading install: >- mingw-w64-x86_64-gcc mingw-w64-x86_64-sqlite3 mingw-w64-x86_64-pkg-config ``` ## Type of change - [ ] Bug fix - [ ] New feature - [ ] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [x] Build / CI / tooling - [ ] Other ## Areas affected - [ ] Frontend (UI / panel pages) - [ ] Backend (API endpoints, login, settings) - [ ] Xray config generation - [ ] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [ ] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## How was this tested? Compared failing job [80604056581](https://github.com/MHSanaei/3x-ui/actions/runs/27288003840/job/80604056581) (MSYS2 download crash after 0.37 s) against a successful run (MSYS2 served from warm tool cache). The `release: false` path in the action's source code unconditionally uses `C:\msys64` and is unaffected by cache state. ## Screenshots / recordings N/A ## Breaking changes None ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [ ] I added or updated tests for the new behavior (when applicable). - [x] `go build ./...` and the test suite pass locally. - [ ] For frontend changes: `npm run lint`, `npm run typecheck`, and `npm run build` pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:04:13 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5806
No description provided.