diff --git a/.github/actions/rust/action.yml b/.github/actions/rust/action.yml index 5f788dc73f..dce4923678 100644 --- a/.github/actions/rust/action.yml +++ b/.github/actions/rust/action.yml @@ -1,14 +1,12 @@ name: Install Rust -description: Install Rust and sccache +description: Install Rust and tools inputs: version: description: 'Rust toolchain version to install' - required: true default: 'stable' components: description: 'Rust components to install' - required: false default: '' runs: @@ -25,7 +23,7 @@ runs: shell: pwsh run: Set-ExecutionPolicy Unrestricted -Scope Process; iex (iwr "https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.ps1").Content - - name: Install cargo-binstall (Windows) + - name: Install cargo-binstall (Linux & MacOS) if: runner.os != 'Windows' shell: bash run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash @@ -34,8 +32,27 @@ runs: shell: bash run: cargo +${{ inputs.version }} binstall --no-confirm cargo-llvm-cov cargo-nextest flamegraph cargo-hack - - name: Use Rust cache - uses: Swatinem/rust-cache@v2 - with: - cache-all-crates: "true" - cache-directories: "${{ github.workspace }}/dist" + # sccache slows CI down, so we leave it disabled. + # Leaving the steps below commented out, so we can re-evaluate enabling it later. + # - name: Use sccache + # uses: mozilla-actions/sccache-action@v0.0.4 + + # - name: Enable sscache + # shell: bash + # run: | + # if [ "${{ runner.os }}" = "Windows" ]; then + # echo "CC=sccache cl" >> "$GITHUB_ENV" + # echo "CXX=sccache cl" >> "$GITHUB_ENV" + # else + # echo "CC=sccache cc" >> "$GITHUB_ENV" + # echo "CXX=sccache c++" >> "$GITHUB_ENV" + # fi + # echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV" + # echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV" + # echo "CARGO_INCREMENTAL=0" >> "$GITHUB_ENV" + + # Ditto for rust-cache. + # - name: Use Rust cache + # uses: Swatinem/rust-cache@v2 + # with: + # cache-all-crates: "true" diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index ccea626867..5faa67bef9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -41,12 +41,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Install Rust - uses: ./.github/actions/rust - with: - version: ${{ matrix.rust-toolchain }} - components: rustfmt, clippy, llvm-tools-preview - - name: Install dependencies (Linux) if: runner.os == 'Linux' env: @@ -97,6 +91,12 @@ jobs: # See https://github.com/ilammy/msvc-dev-cmd#name-conflicts-with-shell-bash rm /usr/bin/link.exe + - name: Install Rust + uses: ./.github/actions/rust + with: + version: ${{ matrix.rust-toolchain }} + components: rustfmt, clippy, llvm-tools-preview + - name: Fetch and build NSS and NSPR uses: ./.github/actions/nss