ci: cache CI environments & add PR template#269
Merged
kellervater merged 3 commits intomainfrom Mar 15, 2026
Merged
Conversation
Add caching to pre-commit and validate-models workflows: - Cache pip downloads via setup-python's built-in cache - Cache bin/openscad/ (OpenSCAD + BOSL2) via actions/cache keyed on scadm.json and constants.py (version pins) scadm install is idempotent (skips if version matches), so it safely no-ops on cache hits.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds CI caching to speed up OpenSCAD model validation and pre-commit runs by reusing Python package downloads and the scadm-managed OpenSCAD installation across workflow executions.
Changes:
- Enable
actions/setup-pythonpip caching keyed offcmd/scadm/pyproject.toml. - Cache
bin/openscad/(OpenSCAD + libraries) keyed offscadm.jsonandcmd/scadm/scadm/constants.py.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/validate-models.yml | Adds pip cache + OpenSCAD/libraries cache before running scadm install and model renders. |
| .github/workflows/pre-commit.yml | Adds pip cache + OpenSCAD/libraries cache before running scadm install and pre-commit hooks. |
Move shared setup steps (Python, apt packages, OpenSCAD cache, scadm) into .github/actions/setup-openscad/action.yml. - Cache apt packages via awalsh128/cache-apt-pkgs-action@v1.6.0 - Cache pip via setup-python built-in cache - Cache bin/openscad/ via actions/cache@v5 - Both pre-commit and validate-models workflows now reference the composite action, eliminating duplication
- Add .github/pull_request_template.md with What/Why/How sections - Add emoji usage guideline to copilot-instructions.md
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a reusable composite GitHub Action to set up OpenSCAD (plus dependencies) with caching, then updates CI workflows to use it in order to speed up runs. It also adds a PR template and tweaks Copilot guidance.
Changes:
- Replace inline OpenSCAD + dependency installation in CI workflows with a local composite action.
- Add caching for pip dependencies and
bin/openscad(OpenSCAD + bundled libraries). - Add a PR template and update
.github/copilot-instructions.md.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/validate-models.yml | Uses the new setup-openscad composite action instead of inline install steps. |
| .github/workflows/pre-commit.yml | Uses the new setup-openscad composite action before running pre-commit. |
| .github/actions/setup-openscad/action.yml | New composite action implementing Python setup, apt deps, and caching. |
| .github/pull_request_template.md | Adds a PR description template. |
| .github/copilot-instructions.md | Updates Copilot contribution guidance. |
Comment on lines
+23
to
+24
| - name: Setup OpenSCAD | ||
| uses: ./.github/actions/setup-openscad |
Comment on lines
+16
to
+18
| uses: awalsh128/cache-apt-pkgs-action@v1.6.0 | ||
| with: | ||
| packages: xvfb libglu1-mesa libfuse2 libegl1 libxcb-cursor0 |
Comment on lines
+1
to
+11
| ## 📦 What | ||
|
|
||
| <!-- What changed, was added, or was removed? --> | ||
|
|
||
| ## 💡 Why | ||
|
|
||
| <!-- What's the use case? Why this approach over alternatives? --> | ||
|
|
||
| ## 🔧 How | ||
|
|
||
| <!-- How to use the changes. Include examples if calling conventions, parameters, or processes changed. Link to relevant docs if applicable. --> |
Merged
kellervater
pushed a commit
that referenced
this pull request
Mar 15, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>homeracker: 1.8.0</summary> ## [1.8.0](homeracker-v1.7.8...homeracker-v1.8.0) (2026-03-15) ### ✨ Features * **ci:** switch BOSL2 to release tags & add SessionStart hook ([#265](#265)) ([020cf14](020cf14)) * **core:** extended lockpin with neck extensions and grip types ([#259](#259)) ([4720f98](4720f98)) ### 🐛 Bug Fixes * **renovate:** disable prHourlyLimit ([#266](#266)) ([3b0894c](3b0894c)) ### 📦 Dependencies * update actions/create-github-app-token action to v3 ([#268](#268)) ([75d0098](75d0098)) * update belfryscad/bosl2 digest to bfc4e74 ([#260](#260)) ([a571590](a571590)) * update camunda/infra-global-github-actions digest to f5807d2 ([#261](#261)) ([612947b](612947b)) * update dependency belfryscad/bosl2 to v2.0.727 ([#267](#267)) ([8f85820](8f85820)) * update openscad nightly to v2026.03.14 ([#263](#263)) ([7a0aead](7a0aead)) * update pre-commit hooks ([#264](#264)) ([c55691d](c55691d)) ### 🔄 CI/CD * cache CI environments & add PR template ([#269](#269)) ([ca78385](ca78385)) </details> <details><summary>scadm: 0.4.11</summary> ## [0.4.11](scadm-v0.4.10...scadm-v0.4.11) (2026-03-15) ### 📦 Dependencies * update openscad nightly to v2026.03.14 ([#263](#263)) ([7a0aead](7a0aead)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: kellerlab-release-please[bot] <246533846+kellerlab-release-please[bot]@users.noreply.github.com>
Merged
kellervater
pushed a commit
that referenced
this pull request
Mar 15, 2026
🤖 I have created a release *beep* *boop* --- <details><summary>homeracker: 1.9.0</summary> ## [1.9.0](homeracker-v1.8.0...homeracker-v1.9.0) (2026-03-15) ### ✨ Features * **setup-openscad:** make action reusable across repositories ([#273](#273)) ([055e784](055e784)) ### 📦 Dependencies * update pre-commit hook renovatebot/pre-commit-hooks to v43.76.1 ([#270](#270)) ([5391857](5391857)) </details> <details><summary>setup-openscad: 1.0.0</summary> ## 1.0.0 (2026-03-15) ### ✨ Features * **setup-openscad:** make action reusable across repositories ([#273](#273)) ([055e784](055e784)) ### 🔄 CI/CD * cache CI environments & add PR template ([#269](#269)) ([ca78385](ca78385)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: kellerlab-release-please[bot] <246533846+kellerlab-release-please[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📦 What
.github/actions/setup-openscad/).github/pull_request_template.md) with What/Why/How sectionscopilot-instructions.md💡 Why
The pre-commit and validate-models workflows were slow (~3 min) because every run reinstalled all environments from scratch. By caching at four layers, warm runs complete in ~52s (~3.5x faster):
setup-pythonbuilt-incache: 'pip'pyproject.tomlhashawalsh128/cache-apt-pkgs-action@v1.6.0actions/cache@v5onbin/openscad/scadm.json+constants.pyhashpre-commit/actionbuilt-in.pre-commit-config.yamlhashThe composite action eliminates duplication — setup logic lives in one place instead of being copied across workflows.
scadm installis idempotent (checks version before downloading), so it safely no-ops on cache hits.PR template standardizes descriptions across the project.
🔧 How
No changes needed for consumers. Both workflows use the composite action automatically:
New PRs will show the What/Why/How template by default.