From 44a7debfb6f90e8924e04f8670981cb3be83d2a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sat, 10 Oct 2026 02:27:26 -0400 Subject: [PATCH] =?UTF-8?q?CI=20=C2=B7=20the=20platform=20legs=20match=20t?= =?UTF-8?q?he=20Gitea=20runners;=20the=20Linux=20leg=20tests=20as=20a=20pl?= =?UTF-8?q?ain=20user?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf49c4c..e03b3d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-24.04, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-15-intel] + # One leg per runner registered with git.zacharyzhang.com; macOS arm64 is the crate job above. + os: [ubuntu-24.04, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v7 @@ -30,7 +31,15 @@ jobs: with: toolchain: "1.95" - uses: Swatinem/rust-cache@v2 - - run: cargo test --lib --features test-support --quiet + - if: runner.os != 'Linux' + run: cargo test --lib --features test-support --quiet + # The Linux job container runs as root, which ignores the file permissions the tests check. + - if: runner.os == 'Linux' + run: | + useradd --create-home ci + chmod o+x "$HOME" + chown -R ci "$GITHUB_WORKSPACE" "$HOME/.cargo" "$HOME/.rustup" + runuser -u ci -- env HOME=/home/ci CARGO_HOME="$HOME/.cargo" RUSTUP_HOME="$HOME/.rustup" PATH="$PATH" cargo test --lib --features test-support --quiet - run: cargo build --example gallery site: