-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: Disable Rust cache Check if it makes any difference to build times first. * Update action.yml * Give sccache one more go * Tweaks for sccache * Fix step title * Leave commented-out cache configs in the action, in case we want to re-try --------- Signed-off-by: Lars Eggert <[email protected]>
- Loading branch information
1 parent
3476bd0
commit 1df959c
Showing
2 changed files
with
32 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
|
||
# - 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters