Skip to content

Comments

fix: Preserve benchmark data when deploying docs#256

Merged
mwiewior merged 4 commits intomasterfrom
fix/preserve-benchmark-data-gh-pages
Oct 26, 2025
Merged

fix: Preserve benchmark data when deploying docs#256
mwiewior merged 4 commits intomasterfrom
fix/preserve-benchmark-data-gh-pages

Conversation

@mwiewior
Copy link
Collaborator

Summary

  • Remove --force flag from mkdocs gh-deploy command in documentation workflow
  • This prevents MkDocs from overwriting the benchmark-comparison/ and benchmark-data/ directories on the gh-pages branch
  • Fixes issue where benchmark workflow successfully creates comparison pages but they get deleted when docs are deployed

Problem

The benchmark workflow (.github/workflows/benchmark.yml) generates interactive comparison reports and stores them in:

  • benchmark-comparison/ - Interactive comparison reports
  • benchmark-data/ - Raw benchmark data

However, the documentation workflow uses mkdocs gh-deploy --force, which force-pushes and overwrites the entire gh-pages branch, deleting these directories.

Example: In the most recent run, the benchmark workflow created the page at 19:10:57, but the documentation workflow ran at 19:13:38 and wiped it out.

Solution

Remove the --force flag from the mkdocs deployment command. Without --force, MkDocs will preserve existing files and directories that it doesn't manage, allowing benchmark data to coexist with documentation.

Test plan

🤖 Generated with Claude Code

mwiewior and others added 4 commits October 25, 2025 21:27
Remove --force flag from mkdocs gh-deploy to prevent overwriting
benchmark-comparison/ and benchmark-data/ directories on gh-pages
branch. This allows benchmark workflow results to coexist with
documentation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace GitHub Actions cache with sccache for Rust compilation:
- Add mozilla-actions/sccache-action for content-based caching
- Keep lightweight Cargo registry cache for dependency resolution
- Remove target/ directory from cache (now handled by sccache)

Benefits:
- sccache automatically shares compilation artifacts across all branches/PRs
- Faster builds with better cache hit rates
- Reduces cache storage requirements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Change default value from 'linux' to 'linux,macos' to match actual
behavior and make it clearer in GitHub UI. The workflow logic already
runs both linux and macos by default in fast mode, so this makes the
default value consistent with the behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add mkdir call to ensure the output directory exists before attempting
to write the interactive comparison report. Fixes FileNotFoundError
when benchmark-comparison/ directory doesn't exist in gh-pages-repo.

Resolves: https://github.com/biodatageeks/polars-bio/actions/runs/18807518335/job/53664440711

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Contributor

Benchmark Comparison: fix/preserve-benchmark-data-gh-pages vs 0.18.0

📊 View Interactive Charts | 📦 Download Artifacts


Benchmark comparison generated by polars-bio CI

@mwiewior mwiewior merged commit f646605 into master Oct 26, 2025
18 checks passed
@mwiewior mwiewior deleted the fix/preserve-benchmark-data-gh-pages branch December 6, 2025 09:31
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.

1 participant