This is an automated email from the ASF dual-hosted git repository.

hubcio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git


The following commit(s) were added to refs/heads/master by this push:
     new e2bbaea1c ci(rust): skip unnecessary setup steps (#3749)
e2bbaea1c is described below

commit e2bbaea1c8691e9f579a822a3c5b3f521f83e267
Author: Alan Tang <[email protected]>
AuthorDate: Tue Aug 4 06:11:17 2026 +0800

    ci(rust): skip unnecessary setup steps (#3749)
---
 .github/actions/rust/pre-merge/action.yml              |  6 ++++++
 .github/actions/utils/setup-rust-with-cache/action.yml | 14 +++++++++++---
 .github/workflows/coverage-baseline.yml                |  1 +
 scripts/ci/python-sdk-version-sync.sh                  |  2 +-
 scripts/ci/sync-python-interpreter-version.sh          |  2 +-
 scripts/ci/sync-rustc-version.sh                       |  2 +-
 scripts/ci/third-party-licenses.sh                     |  2 +-
 scripts/ci/uv-lock-check.sh                            |  2 +-
 8 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/.github/actions/rust/pre-merge/action.yml 
b/.github/actions/rust/pre-merge/action.yml
index 536e3056e..40c0dafce 100644
--- a/.github/actions/rust/pre-merge/action.yml
+++ b/.github/actions/rust/pre-merge/action.yml
@@ -33,6 +33,12 @@ runs:
     - name: Setup Rust with cache
       uses: ./.github/actions/utils/setup-rust-with-cache
       with:
+        # Only test jobs execute nextest. Avoid downloading it in lint, 
metadata,
+        # and cross-build jobs.
+        install-nextest: ${{ startsWith(inputs.task, 'test-') }}
+        # These tasks do not compile workspace crates and need no native
+        # libraries. All compiling tasks keep the existing dependency setup.
+        install-system-dependencies: ${{ inputs.task != 'fmt' && inputs.task 
!= 'sort' && inputs.task != 'machete' }}
         # Miri builds against a nightly toolchain with a separate `target/miri`
         # subtree; isolate its cache from the stable `dev` namespace so the
         # two don't evict each other.
diff --git a/.github/actions/utils/setup-rust-with-cache/action.yml 
b/.github/actions/utils/setup-rust-with-cache/action.yml
index e01ce81f8..6c3bf16fb 100644
--- a/.github/actions/utils/setup-rust-with-cache/action.yml
+++ b/.github/actions/utils/setup-rust-with-cache/action.yml
@@ -19,6 +19,14 @@ name: setup-rust-with-cache
 description: Setup Rust toolchain with Swatinem/rust-cache
 
 inputs:
+  install-nextest:
+    description: "Whether to install cargo-nextest"
+    required: false
+    default: "false"
+  install-system-dependencies:
+    description: "Whether to install system packages required by Rust builds"
+    required: false
+    default: "true"
   read-cache:
     description: "Whether to read from cache"
     required: false
@@ -55,14 +63,14 @@ runs:
         aggressive: ${{ inputs.free-disk-space-aggressive }}
 
     - name: Install system dependencies (Linux)
-      if: runner.os == 'Linux'
+      if: runner.os == 'Linux' && inputs.install-system-dependencies == 'true'
       run: |
         sudo apt-get update
         sudo apt-get install -y libhwloc-dev pkg-config libudev-dev
       shell: bash
 
     - name: Install system dependencies (macOS)
-      if: runner.os == 'macOS'
+      if: runner.os == 'macOS' && inputs.install-system-dependencies == 'true'
       run: |
         # Pin version of hwloc to 2.12.2_1
         # brew extract doesn't have this version, so we fetch the formula 
directly
@@ -117,7 +125,7 @@ runs:
       shell: bash
 
     - name: Install cargo-nextest
-      if: runner.os == 'Linux'
+      if: runner.os == 'Linux' && inputs.install-nextest == 'true'
       run: |
         if command -v cargo-nextest &> /dev/null; then
           echo "cargo-nextest already installed"
diff --git a/.github/workflows/coverage-baseline.yml 
b/.github/workflows/coverage-baseline.yml
index 1f580db3d..af0e5e13b 100644
--- a/.github/workflows/coverage-baseline.yml
+++ b/.github/workflows/coverage-baseline.yml
@@ -52,6 +52,7 @@ jobs:
       - name: Setup Rust with cache
         uses: ./.github/actions/utils/setup-rust-with-cache
         with:
+          install-nextest: "true"
           # Also warms the GitHub Actions build cache for subsequent PR builds
           save-cache: "true"
           # llvm-cov instrumentation roughly doubles object sizes; the light
diff --git a/scripts/ci/python-sdk-version-sync.sh 
b/scripts/ci/python-sdk-version-sync.sh
index 3788573bc..591f68edb 100755
--- a/scripts/ci/python-sdk-version-sync.sh
+++ b/scripts/ci/python-sdk-version-sync.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
diff --git a/scripts/ci/sync-python-interpreter-version.sh 
b/scripts/ci/sync-python-interpreter-version.sh
index bc6a2de29..4c71c3ef2 100755
--- a/scripts/ci/sync-python-interpreter-version.sh
+++ b/scripts/ci/sync-python-interpreter-version.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
diff --git a/scripts/ci/sync-rustc-version.sh b/scripts/ci/sync-rustc-version.sh
index 1d25027f6..cc494dabd 100755
--- a/scripts/ci/sync-rustc-version.sh
+++ b/scripts/ci/sync-rustc-version.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
diff --git a/scripts/ci/third-party-licenses.sh 
b/scripts/ci/third-party-licenses.sh
index 8c86b253a..e2304b26d 100755
--- a/scripts/ci/third-party-licenses.sh
+++ b/scripts/ci/third-party-licenses.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
diff --git a/scripts/ci/uv-lock-check.sh b/scripts/ci/uv-lock-check.sh
index 643ca3d85..de76ad7bf 100755
--- a/scripts/ci/uv-lock-check.sh
+++ b/scripts/ci/uv-lock-check.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information

Reply via email to