-
-
Notifications
You must be signed in to change notification settings - Fork 28
feat(setup-openscad): make action reusable across repositories #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Setup OpenSCAD Action | ||
|
|
||
| Composite GitHub Action that installs OpenSCAD, system dependencies, and libraries via [scadm](../../../cmd/scadm/README.md) — with caching. | ||
|
|
||
| > ⚠️ Requires `ubuntu` runners (uses `apt` for system dependencies). | ||
|
|
||
| ## Why | ||
|
|
||
| Setting up OpenSCAD in CI requires installing system packages, downloading binaries, and managing library dependencies. This action handles all of that in a single step, with caching for fast subsequent runs. | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Cross-repository | ||
|
|
||
| ```yaml | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup OpenSCAD | ||
| uses: kellerlabs/homeracker/.github/actions/setup-openscad@setup-openscad-v1 | ||
| ``` | ||
|
|
||
| > Requires a `scadm.json` in the repo root. See [scadm docs](../../../cmd/scadm/README.md) for config format. | ||
|
|
||
| ### Within homeracker | ||
|
|
||
| ```yaml | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup OpenSCAD | ||
| uses: ./.github/actions/setup-openscad | ||
| with: | ||
| scadm-source: cmd/scadm | ||
| ``` | ||
|
|
||
| ## Inputs | ||
|
|
||
| | Input | Description | Default | | ||
| |---|---|---| | ||
| | `scadm-version` | Pinned scadm PyPI version. Also used in the cache key. | See [action.yml](action.yml) | | ||
| | `scadm-source` | Local path for editable scadm install. Overrides PyPI version and re-runs `scadm install`. | _(empty)_ | | ||
|
|
||
| ## What it does | ||
|
|
||
| 1. Sets up Python 3.x | ||
| 2. Installs system dependencies (`xvfb`, `libglu1-mesa`, `libfuse2`, `libegl1`, `libxcb-cursor0`) | ||
| 3. Caches `bin/openscad/` keyed on runner OS, scadm version, `scadm.json`, and local source hash (when `scadm-source` is set) | ||
| 4. Installs [scadm](../../../cmd/scadm/README.md) — pinned from PyPI, or from a local path if `scadm-source` is set | ||
| 5. Runs `scadm install` to download OpenSCAD and libraries | ||
|
|
||
| ## Versioning | ||
|
|
||
| This action is independently versioned via [release-please](https://github.com/googleapis/release-please). Use a pinned tag: | ||
|
|
||
| ```yaml | ||
| uses: kellerlabs/homeracker/.github/actions/setup-openscad@setup-openscad-v1.0.0 | ||
| ``` | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| { | ||
| ".": "1.8.0", | ||
| "cmd/scadm": "0.4.11" | ||
| "cmd/scadm": "0.4.11", | ||
| ".github/actions/setup-openscad": "0.0.0" | ||
kellervater marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.