Skip to content

Commit dc4a621

Browse files
committed
fix(ci): disable incremental compilation for sccache and fix container ownership
Two fixes for CI issues: 1. sccache incompatibility: Add CARGO_INCREMENTAL=0 because sccache doesn't work with Cargo's incremental compilation. The forge-builder Docker container has CARGO_INCREMENTAL=1 set, which caused builds to fail. 2. Container ownership: Add cleanup step to fix file ownership at end of Linux container builds. Docker containers run as root, creating files that the runner user can't clean up, causing subsequent jobs (e2e, test) to fail with EACCES permission errors.
1 parent de1be6e commit dc4a621

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/build-all-platforms.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ jobs:
4040
- os: [self-hosted, Linux, X64] # Self-hosted runner on ct200 with Docker
4141
target: x86_64-unknown-linux-gnu
4242
platform: linux-x64
43-
container: ghcr.io/namastexlabs/forge-builder:nightly-2025-12-04
43+
container_image: ghcr.io/namastexlabs/forge-builder:nightly-2025-12-04
4444
cargo_jobs: 20 # ct200 has 20 cores
4545
- os: [self-hosted, Linux, X64] # Self-hosted runner on ct200 with Docker (cross-compile)
4646
target: aarch64-unknown-linux-gnu
4747
platform: linux-arm64
4848
use-zigbuild: true
49-
container: ghcr.io/namastexlabs/forge-builder:nightly-2025-12-04
49+
container_image: ghcr.io/namastexlabs/forge-builder:nightly-2025-12-04
5050
cargo_jobs: 20 # ct200 has 20 cores
5151
# Android builds moved to separate workflow (build-android-apk.yml)
5252
- os: [self-hosted, Windows, X64] # Self-hosted runner on ct201
@@ -67,7 +67,7 @@ jobs:
6767
cargo_jobs: 3 # GitHub-hosted M1 has 3 cores
6868

6969
runs-on: ${{ matrix.os }}
70-
container: ${{ matrix.container }}
70+
container: ${{ matrix.container_image || '' }}
7171

7272
steps:
7373
- uses: actions/checkout@v4
@@ -128,6 +128,7 @@ jobs:
128128
run: |
129129
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
130130
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
131+
echo "CARGO_INCREMENTAL=0" >> $GITHUB_ENV # sccache doesn't work with incremental compilation
131132
132133
- name: Cache Rust dependencies
133134
if: env.SKIP_BUILD != 'true'
@@ -359,6 +360,13 @@ jobs:
359360
path: npx-cli/dist/${{ matrix.platform }}/
360361
overwrite: true
361362

363+
# Fix file ownership for subsequent jobs on self-hosted runners
364+
# Docker containers run as root, creating root-owned files that the runner user can't clean up
365+
- name: Fix file ownership (Linux containers)
366+
if: always() && matrix.container_image
367+
shell: bash
368+
run: chown -R 1000:1000 $GITHUB_WORKSPACE || true
369+
362370
# Android builds moved to separate workflow: build-android-apk.yml
363371
# This allows Android to have its own release timeline
364372

0 commit comments

Comments
 (0)