Skip to content

Commit

Permalink
add zstd level test
Browse files Browse the repository at this point in the history
  • Loading branch information
nyanrus committed Jun 22, 2024
1 parent 7917d08 commit 3990195
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 5 deletions.
56 changes: 52 additions & 4 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,6 @@ jobs:
shell: bash
run: cat "$SCCACHE_ERROR_LOG"


clang:
runs-on: ubuntu-latest
needs: build
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -646,7 +645,6 @@ jobs:
${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]"
gcc:
runs-on: ubuntu-latest
needs: build
Expand Down Expand Up @@ -691,7 +689,6 @@ jobs:
${SCCACHE_PATH} --show-stats | grep -e "Cache hits\s*[1-9]"
autotools:
runs-on: ubuntu-latest
needs: build
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3990195

Please sign in to comment.