Skip to content

Fix sccache cache empty due to SCCACHE_DIR configuration ordering#1

Draft
Copilot wants to merge 3 commits intodevelopfrom
copilot/debug-sscache-cache-issue
Draft

Fix sccache cache empty due to SCCACHE_DIR configuration ordering#1
Copilot wants to merge 3 commits intodevelopfrom
copilot/debug-sscache-cache-issue

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 12, 2026

sccache cache uploaded to GitHub Actions was empty because SCCACHE_DIR was configured after the cache restore/save step, causing a directory mismatch.

Changes

  • Extract SCCACHE_DIR configuration into dedicated step before cache action
  • Reorder workflow: Configure → Cache → Install → Build
  • Ensures cache action operates on correct directory throughout job lifecycle

Before

- name: Install Dependencies
  run: |
    echo "SCCACHE_DIR=$GITHUB_WORKSPACE/.sccache" >> $GITHUB_ENV  # Too late
    mkdir -p .sccache
    
- name: Cache sccache  # Runs with wrong/unset SCCACHE_DIR
  uses: actions/cache@v4

After

- name: Configure sccache
  run: |
    echo "SCCACHE_DIR=$GITHUB_WORKSPACE/.sccache" >> $GITHUB_ENV
    mkdir -p .sccache
    
- name: Cache sccache  # Now uses correct SCCACHE_DIR
  uses: actions/cache@v4

The cache action now restores to and saves from the same directory that sccache writes to during compilation.

Original prompt

Benchx CLI Publish的sscache缓存没有生效,上传到github actions/cache 的缓存为空,帮我看看为啥


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

hzy and others added 2 commits February 12, 2026 21:38
Use it with `./benchx_cli -o <output_ptrace_file> run <lynx_bundle_path>` to get a ptrace file of the Lynx Bundle.

Under the hood it runs the Lynx Bundle with specific embedder api mocked so not suitable for serious e2e test, but should be sufficient for benchmark.

Also, codspeed is integrate into the cli, so benchmark result can be uploaded to codspeed platform for tracking ingression.
Co-authored-by: hzy <28915578+hzy@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix sscache not working in Benchx CLI Publish Fix sccache cache empty due to SCCACHE_DIR configuration ordering Feb 12, 2026
Copilot AI requested a review from hzy February 12, 2026 14:23
@hzy hzy force-pushed the develop branch 4 times, most recently from 9522f5e to 8fecf48 Compare February 13, 2026 09:39
@github-actions github-actions bot force-pushed the develop branch 3 times, most recently from 5a29faa to 485351c Compare February 17, 2026 01:12
@github-actions github-actions bot force-pushed the develop branch 6 times, most recently from 2f008f8 to a86b828 Compare March 4, 2026 01:13
@github-actions github-actions bot force-pushed the develop branch 5 times, most recently from 93df581 to 64d94cd Compare March 10, 2026 01:09
@github-actions github-actions bot force-pushed the develop branch 7 times, most recently from f94f35b to 4770cf1 Compare March 17, 2026 01:16
@github-actions github-actions bot force-pushed the develop branch 4 times, most recently from 941cd06 to 9bbb06f Compare April 8, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants