From 0ffba964546f23b883adc290e220fe9f17adbbaf Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 20 Feb 2024 14:10:53 +0100 Subject: [PATCH] allow the compilation of sccache without any features (only local build) --- .github/workflows/ci.yml | 3 +++ src/cache/cache.rs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 588935b6f..e8aee4567 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,6 +81,9 @@ jobs: rustc: nightly allow_failure: true extra_args: --features=unstable + - os: ubuntu-20.04 + rustc: nightly + extra_args: --no-default-features - os: ubuntu-22.04 - os: macOS-11 # M1 CPU diff --git a/src/cache/cache.rs b/src/cache/cache.rs index 3c07983a9..f5aa43178 100644 --- a/src/cache/cache.rs +++ b/src/cache/cache.rs @@ -674,7 +674,9 @@ pub fn storage_from_config( return Ok(Arc::new(storage)); } #[allow(unreachable_patterns)] - _ => bail!("cache type is not enabled"), + // if we build only with `cargo build --no-default-features` + // we only want to use sccache with a local cache (no remote storage) + _ => {} } }