diff --git a/.github/actions/rust/pre-merge/action.yml b/.github/actions/rust/pre-merge/action.yml index 536e3056e0..40c0dafce2 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 e01ce81f8d..6c3bf16fb4 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 1f580db3d6..af0e5e13ba 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 3788573bc4..591f68edb8 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 bc6a2de293..4c71c3ef2f 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 1d25027f69..cc494dabd3 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 8c86b253a8..e2304b26dd 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 643ca3d858..de76ad7bfe 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