From 830f5394498beecd03cdfbce52a9411d62278e4f Mon Sep 17 00:00:00 2001 From: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> Date: Thu, 8 Oct 2026 14:49:47 -0700 Subject: [PATCH] Remove cargo home chown steps The Linux runner images give the runner user ownership of /opt/cargo since https://github.com/azure-management-and-platforms/hyperlight-ci-dev-images/pull/13. The tart arm64 runners have no /opt/cargo. The step still walks the whole directory, taking 10 to 40 seconds per job. Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> --- .github/workflows/Coverage.yml | 4 ---- .github/workflows/PrimeCaches.yml | 5 ----- .github/workflows/RegenSnapshotGoldens.yml | 4 ---- .github/workflows/RustNightly.yml | 4 ---- .github/workflows/dep_benchmarks.yml | 5 ----- .github/workflows/dep_build_guests.yml | 5 ----- .github/workflows/dep_build_test.yml | 5 ----- .github/workflows/dep_code_checks.yml | 4 ---- .github/workflows/dep_run_examples.yml | 5 ----- .github/workflows/dep_update_guest_locks.yml | 4 ---- 10 files changed, 45 deletions(-) diff --git a/.github/workflows/Coverage.yml b/.github/workflows/Coverage.yml index 9ac052355f..8ee3269e70 100644 --- a/.github/workflows/Coverage.yml +++ b/.github/workflows/Coverage.yml @@ -44,10 +44,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Fix cargo home permissions - run: | - sudo chown -R $(id -u):$(id -g) /opt/cargo || true - - name: Rust cache uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 with: diff --git a/.github/workflows/PrimeCaches.yml b/.github/workflows/PrimeCaches.yml index d12d5e4f81..46ac63ff25 100644 --- a/.github/workflows/PrimeCaches.yml +++ b/.github/workflows/PrimeCaches.yml @@ -102,11 +102,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Fix cargo home permissions - if: runner.os == 'Linux' - run: | - sudo chown -R $(id -u):$(id -g) /opt/cargo || true - - name: Rust cache uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 with: diff --git a/.github/workflows/RegenSnapshotGoldens.yml b/.github/workflows/RegenSnapshotGoldens.yml index ed4f7b65cc..b290a148af 100644 --- a/.github/workflows/RegenSnapshotGoldens.yml +++ b/.github/workflows/RegenSnapshotGoldens.yml @@ -177,10 +177,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Fix cargo home permissions - if: runner.os == 'Linux' - run: sudo chown -R $(id -u):$(id -g) /opt/cargo || true - - name: Download Rust guests uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: diff --git a/.github/workflows/RustNightly.yml b/.github/workflows/RustNightly.yml index 82bf61e924..2cb61c365f 100644 --- a/.github/workflows/RustNightly.yml +++ b/.github/workflows/RustNightly.yml @@ -50,10 +50,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Fix cargo home permissions - run: | - sudo chown -R $(id -u):$(id -g) /opt/cargo || true - # cargo-hyperlight builds a custom sysroot for x86_64-hyperlight-none target. # rust-cache cleans "anything not a dependency" from target dirs, removing the sysroot. # We cache sysroot separately to avoid rebuilding it (~10s) on every run. diff --git a/.github/workflows/dep_benchmarks.yml b/.github/workflows/dep_benchmarks.yml index 33f8f05139..d767f1f330 100644 --- a/.github/workflows/dep_benchmarks.yml +++ b/.github/workflows/dep_benchmarks.yml @@ -75,11 +75,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Fix cargo home permissions - if: runner.os == 'Linux' - run: | - sudo chown -R $(id -u):$(id -g) /opt/cargo || true - - name: Rust cache uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 with: diff --git a/.github/workflows/dep_build_guests.yml b/.github/workflows/dep_build_guests.yml index 063969b008..c1ab2ecbe8 100644 --- a/.github/workflows/dep_build_guests.yml +++ b/.github/workflows/dep_build_guests.yml @@ -80,11 +80,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Fix cargo home permissions - if: runner.os == 'Linux' - run: | - sudo chown -R $(id -u):$(id -g) /opt/cargo || true - # cargo-hyperlight builds a custom sysroot for the Hyperlight guest target. # rust-cache cleans "anything not a dependency" from target dirs, removing the sysroot. # We cache sysroot separately to avoid rebuilding it (~10s) on every run. diff --git a/.github/workflows/dep_build_test.yml b/.github/workflows/dep_build_test.yml index 37c59796f7..e7e407efe0 100644 --- a/.github/workflows/dep_build_test.yml +++ b/.github/workflows/dep_build_test.yml @@ -100,11 +100,6 @@ jobs: "LIBCLANG_PATH=$llvmPath" >> $env:GITHUB_ENV $llvmPath >> $env:GITHUB_PATH - - name: Fix cargo home permissions - if: runner.os == 'Linux' - run: | - sudo chown -R $(id -u):$(id -g) /opt/cargo || true - - name: Rust cache uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 with: diff --git a/.github/workflows/dep_code_checks.yml b/.github/workflows/dep_code_checks.yml index f75a526105..df823379fc 100644 --- a/.github/workflows/dep_code_checks.yml +++ b/.github/workflows/dep_code_checks.yml @@ -41,10 +41,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Fix cargo home permissions - run: | - sudo chown -R $(id -u):$(id -g) /opt/cargo || true - # cargo-hyperlight builds a custom sysroot for x86_64-hyperlight-none target. # rust-cache cleans "anything not a dependency" from target dirs, removing the sysroot. # We cache sysroot separately to avoid rebuilding it (~10s) on every run. diff --git a/.github/workflows/dep_run_examples.yml b/.github/workflows/dep_run_examples.yml index 985e0ef16b..d4aa45c264 100644 --- a/.github/workflows/dep_run_examples.yml +++ b/.github/workflows/dep_run_examples.yml @@ -63,11 +63,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Fix cargo home permissions - if: runner.os == 'Linux' - run: | - sudo chown -R $(id -u):$(id -g) /opt/cargo || true - - name: Rust cache uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 with: diff --git a/.github/workflows/dep_update_guest_locks.yml b/.github/workflows/dep_update_guest_locks.yml index 1e4716d092..8e45f307ec 100644 --- a/.github/workflows/dep_update_guest_locks.yml +++ b/.github/workflows/dep_update_guest_locks.yml @@ -56,10 +56,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Fix cargo home permissions - run: | - sudo chown -R $(id -u):$(id -g) /opt/cargo || true - - name: Update guest Cargo.lock working-directory: src/tests/rust_guests run: cargo fetch