Skip to content

feat(ci): reusable FastLED/fbuild/setup composite action (closes #101)#102

Merged
zackees merged 1 commit intomainfrom
feat/101-setup-action
Apr 18, 2026
Merged

feat(ci): reusable FastLED/fbuild/setup composite action (closes #101)#102
zackees merged 1 commit intomainfrom
feat/101-setup-action

Conversation

@zackees
Copy link
Copy Markdown
Member

@zackees zackees commented Apr 18, 2026

Summary

Ships a composite GitHub Action that lets consumer CI pipelines wire fbuild + cache in one step:

```yaml

  • uses: FastLED/fbuild/.github/actions/setup@main
    with:
    cache-key-extra: ${{ hashFiles('platformio.ini') }}
  • run: fbuild build examples/Blink -e esp32dev
    ```

What it does

  1. `actions/setup-python` with a pinnable Python version (default 3.12).
  2. Resolves `FBUILD_CACHE_DIR` to `$RUNNER_TEMP/fbuild-cache` and exports via `$GITHUB_ENV` so every later step inherits it.
  3. `pip install fbuild` (pinnable via `fbuild-version` input).
  4. `actions/cache@v4` restore/save keyed on OS/arch + cache-version + cache-key-extra + restore-key fallback.

Redirecting to `$RUNNER_TEMP` sidesteps the `~/.fbuild/*/daemon/` gotcha from the cache doc — ephemeral daemon state never ends up inside the cached tree.

Outputs

  • `cache-hit` — bool, so consumers can assert warm-build behavior in a smoke step.
  • `cache-dir` — resolved path for diagnostics.

Doc update

`docs/CI_CACHING.md` TL;DR now recommends the action first; the raw `actions/cache` snippet is preserved below for consumers who prefer zero action dependencies.

Follow-up

FastLED repo will switch its workflows to use this action in a companion PR (tracked in #101's "Follow-up" section).

Test plan

Adds .github/actions/setup/ so consumer CI pipelines can get
fbuild install + cache wiring in one step:

  - uses: FastLED/fbuild/.github/actions/setup@main
    with:
      cache-key-extra: ${{ hashFiles('platformio.ini') }}
  - run: fbuild build examples/Blink -e esp32dev

Composite-action steps:
1. actions/setup-python (pinnable via python-version input)
2. Resolve FBUILD_CACHE_DIR to $RUNNER_TEMP/fbuild-cache and export
   via $GITHUB_ENV so every later step inherits it
3. pip install fbuild (pinnable via fbuild-version input)
4. actions/cache@v4 restore/save of the cache dir, keyed on
   OS/arch + cache-version + cache-key-extra + restore-key fallback

Redirecting to $RUNNER_TEMP sidesteps the ~/.fbuild/*/daemon/ gotcha
from docs/CI_CACHING.md — the ephemeral daemon state never ends up
inside the cached tree in the first place.

Outputs `cache-hit` so consumers can assert warm-build behavior in
a smoke-test step.

docs/CI_CACHING.md TL;DR now recommends the action first, with the
raw actions/cache snippet preserved below for consumers who prefer
no action dependency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 18, 2026

Warning

Rate limit exceeded

@zackees has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 46 minutes and 47 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 46 minutes and 47 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bb64f1bf-63a2-4648-8b3b-92bfa37dd30f

📥 Commits

Reviewing files that changed from the base of the PR and between 0b582be and 1fb6807.

📒 Files selected for processing (3)
  • .github/actions/setup/README.md
  • .github/actions/setup/action.yml
  • docs/CI_CACHING.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/101-setup-action

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zackees zackees merged commit d37995b into main Apr 18, 2026
75 of 77 checks passed
@zackees zackees deleted the feat/101-setup-action branch April 18, 2026 16:28
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