diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index a3b85fce3..dcd1edb6c 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -523,7 +523,6 @@ jobs: shell: bash run: cat "$SCCACHE_ERROR_LOG" - clang: runs-on: ubuntu-latest needs: build @@ -576,7 +575,7 @@ jobs: ${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]" hip: - # Probably wouldn't matter anyway since we run in a container, but staying + # Probably wouldn't matter anyway since we run in a container, but staying # close to the version is better than not. runs-on: ubuntu-22.04 needs: build @@ -646,7 +645,6 @@ jobs: ${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]" - gcc: runs-on: ubuntu-latest needs: build @@ -691,7 +689,6 @@ jobs: ${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]" - autotools: runs-on: ubuntu-latest needs: build @@ -846,3 +843,54 @@ jobs: run: | ${SCCACHE_PATH} --show-stats ${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]" + + zstd-compression-level: + runs-on: ubuntu-latest + needs: build + + env: + RUSTC_WRAPPER: /home/runner/.cargo/bin/sccache + SCCACHE_DIR: + CARGO_INCREMENTAL: "0" + + steps: + - uses: actions/download-artifact@v4 + with: + name: integration-tests + path: /home/runner/.cargo/bin/ + - name: Chmod for binary + run: chmod +x ${SCCACHE_PATH} + + - name: Clone repository + uses: actions/checkout@v4 + + - name: Install rust + uses: ./.github/actions/rust-toolchain + with: + toolchain: "stable" + + - name: 💾 test-default-save ------------------------------- + run: | + export SCCACHE_DIR=${PWD}/temp-test/zstd-level/default + cargo build + - name: 🖨️ Stats-save + run: ${SCCACHE_PATH} --show-stats + - name: 💽 test-default-use + run: | + cargo clean && cargo build + - name: 🖨️ Stats-use + run: ${SCCACHE_PATH} --show-stats + - name: 💾 test-lv10-save ------------------------------- + run: | + export SCCACHE_DIR=${PWD}/temp-test/zstd-level/10 + export SCCACHE_CACHE_ZSTD_LEVEL=10 + ${SCCACHE_PATH} --stop-server > /dev/null + cargo clean + cargo build + - name: 🖨️ Stats-save + run: ${SCCACHE_PATH} --show-stats + - name: 💽 test-lv10-use + run: | + cargo clean && cargo build + - name: 🖨️ Stats-use + run: ${SCCACHE_PATH} --show-stats diff --git a/docs/Configuration.md b/docs/Configuration.md index 4fbb3b067..e60e0f76e 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -133,7 +133,7 @@ configuration variables * `SCCACHE_MAX_FRAME_LENGTH` how much data can be transferred between client and server * `SCCACHE_NO_DAEMON` set to `1` to disable putting the server to the background * `SCCACHE_CACHE_MULTIARCH` to disable caching of multi architecture builds. -* `SCCACHE_CACHE_ZSTD_LEVEL` to set zstd compression level of cache. the range is `1-22` and default is `3`. +* `SCCACHE_CACHE_ZSTD_LEVEL` to set zstd compression level of cache. the range is `1-22` and default is `3`. For example, in `10`, about 90% size with about 160% time than default `3` for making cache of compiling sccache code. ### cache configs