Skip to content
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

feat: better composite action #611

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Conversation

AtomicFS
Copy link
Collaborator

@AtomicFS AtomicFS commented Mar 4, 2025

I am really annoyed by the amount of necessary copy-pasting when using firmware-action in GitHub CI. For some complex firmware stacks, when users want various combinations and use multiple matrix strategies, this complexity explodes quite fast. And most of the workflow then is just cache upload, cache download, artifact upload, artifact download.

This PR is addressing this. However because GitHub CI has a lot of limitations, and many questionable design decisions, it is not straight forward process. Maybe one way would be to implement GitHub API interface, but I do not want o make that nor maintain that. More rant and details in action.yml comments. Also see #84 for more information (== more rant).

Must be merged after #592

To function, this PR relies on features introduced in #603

This PR is rather a big deal

It changes significant parts which did not change for a long time. I don't think it will break anything, but we should test this before deploying.

As such, this change should be just drop-in replacement, it should still work even if users do not change anything. The example tests that we are running seem to work fine after some cleanup of redundant code.

Besides these example tests I am also trying it out in firmware-action-example PR. As you can see there, this PR poses a significant simplification and reduction of code needed in the workflow. For example of functional multi-job workflow see run 13686309056

Fixes #84

@github-actions github-actions bot added documentation Improvements or additions to documentation feature New feature or request testing Testing related dependencies Pull requests that update a dependency file go Pull requests that update Go code github_actions Pull requests that update GitHub Actions code module/coreboot labels Mar 4, 2025
@AtomicFS AtomicFS force-pushed the feat/better-composite-action branch 7 times, most recently from f2c1528 to af922fc Compare March 5, 2025 15:57
@AtomicFS AtomicFS force-pushed the feat/better-composite-action branch 8 times, most recently from 4d69816 to ee145ee Compare March 5, 2025 22:07
@AtomicFS AtomicFS marked this pull request as ready for review March 5, 2025 22:08
@AtomicFS AtomicFS requested a review from MDr164 as a code owner March 5, 2025 22:08
@AtomicFS AtomicFS enabled auto-merge March 5, 2025 22:08
@AtomicFS AtomicFS force-pushed the feat/better-composite-action branch from 699da59 to ca5d93a Compare March 6, 2025 10:40
@AtomicFS AtomicFS force-pushed the feat/better-composite-action branch from ca5d93a to c2bfe5b Compare March 11, 2025 09:30
@AtomicFS AtomicFS requested a review from MDr164 March 11, 2025 13:17
@AtomicFS AtomicFS force-pushed the feat/better-composite-action branch 2 times, most recently from 3117260 to 284e24e Compare March 13, 2025 11:44
AtomicFS added 18 commits March 14, 2025 16:52
- with this patch the action will automatically cache the produced
  output files
- it also will cache the temporary files, such as time-stamps and
  so on to detect code changes
- the actions/cache actions do not accept dynamically generated arrays,
  and therefore relecant files are moved in and out
- TODO: firmware-action also needs to keep git commit hashes, for the
  git submodules, to detect reverts and downgrades (these user actions
  will not be detected with time-stamps)

Signed-off-by: AtomicFS <[email protected]>
- just like we automatically cache, we can now automatically upload artifacts
- add inputs specific to artifact uploading which are then just passed
  over to actions/upload-artifact action

Signed-off-by: AtomicFS <[email protected]>
AI-Generated: true
AI-Model: claude-3.5-sonnet
Signed-off-by: AtomicFS <[email protected]>
Signed-off-by: AtomicFS <[email protected]>
- just some minor adjustments

Signed-off-by: AtomicFS <[email protected]>
- I am adding another task to the Taskfile in the test directory to
  simulate GitHub CI environment and persuade firmware-action to act
  like it is in CI

Signed-off-by: AtomicFS <[email protected]>
AI-Generated: true
AI-Model: claude-3.5-sonnet
Signed-off-by: AtomicFS <[email protected]>
AI-Generated: true
AI-Model: claude-3.5-sonnet
Signed-off-by: AtomicFS <[email protected]>
Signed-off-by: AtomicFS <[email protected]>
Signed-off-by: AtomicFS <[email protected]>
AI-Generated: true
AI-Model: claude-3.5-sonnet
Signed-off-by: AtomicFS <[email protected]>
@AtomicFS AtomicFS force-pushed the feat/better-composite-action branch from 284e24e to 651db1c Compare March 14, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation feature New feature or request github_actions Pull requests that update GitHub Actions code go Pull requests that update Go code module/coreboot testing Testing related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

github-action: Allow to specify files in artefacts as input argument
2 participants