Skip to content

Conversation

@danieldegrasse
Copy link

Allow skipping the dependency installation within the setup process. This is useful for cases where the setup-zephyr action is run within a docker container that already has OS level dependencies and the Zephyr SDK installed

Copy link
Member

@fabiobaltieri fabiobaltieri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhm, ok but then what's left, just west init and update?

@kartben
Copy link
Collaborator

kartben commented Mar 27, 2025

Uhm, ok but then what's left, just west init and update?

I was gonna ask the same, but I'm sure I'm missing something.

@danieldegrasse danieldegrasse force-pushed the feature/skip-dependencies branch from c144b22 to 650bc53 Compare March 27, 2025 23:42
@danieldegrasse
Copy link
Author

Uhm, ok but then what's left, just west init and update?

I was gonna ask the same, but I'm sure I'm missing something.

That and the pip dependency installation with caching is all that is left, yeah. The reasoning for this change is that we're using this action in CI, and some CI jobs run within the Zephyr project docker container. setting a flag like this is just an optimization since those jobs only need the pip dependencies and west init steps.

If you don't think this is useful I'm happy to close it- just wanted to reuse this workflow as much as possible within our CI and avoid repeating parts of it when we were running in a docker container

@fabiobaltieri
Copy link
Member

I think it's fine, clearly you have a use case for it and it's backward compatible, just a bit worried by the amount of flags and conditions growing but I guess that's just how this is going to go.

@danieldegrasse
Copy link
Author

I think it's fine, clearly you have a use case for it and it's backward compatible, just a bit worried by the amount of flags and conditions growing but I guess that's just how this is going to go.

That's totally fair- another option here would be to instead check if the Zephyr SDK is present before we run setup, right? Rerunning the APT install command shouldn't have that much impact in a docker container, the main thing is the SDK install.

If you'd prefer I can look at writing a detection method for that

@danieldegrasse danieldegrasse force-pushed the feature/skip-dependencies branch from 650bc53 to 15c2c60 Compare March 28, 2025 15:26
@fabiobaltieri
Copy link
Member

fabiobaltieri commented Mar 28, 2025

That's totally fair- another option here would be to instead check if the Zephyr SDK is present before we run setup, right? Rerunning the APT install command shouldn't have that much impact in a docker container, the main thing is the SDK install.

Yeah but then it's more logic, this at least is trivial, I think we can go with it.

@kartben @henrikbrixandersen any opinion?

required: false
default: https://github.com/zephyrproject-rtos/sdk-ng/releases/download

skip-dependencies:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think 'skip-dependencies' is a bit too generic here, what dependencies exactly? we are talking about packages here, so maybe it should be explicit.

Maybe we could use package-group which can be set to none, but can also take other values, i.e. minimal, full, etc. with minimal including what we have now, full with more packages for special ops, like if we want coverage tools and such.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What defining package-groups, an array which can take values like so:

  • python: installs pip dependencies only (like what skip-dependencies does now)
  • sdk: installs the Zephyr SDK only
  • build: installs build dependencies

The default value would then be [python, sdk, build] to install the same set as we have now

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nashif what are your thoughts on this suggestion? Would that make sense to get this moved forwards?

@fabiobaltieri
Copy link
Member

@nashif ping

Support skipping os dependencies within the action. This is useful when
running in a container where these dependencies are present.

Signed-off-by: Daniel DeGrasse <[email protected]>
Add example of how to configure action to skip installing OS level
dependencies and Zephyr SDK

Signed-off-by: Daniel DeGrasse <[email protected]>
@danieldegrasse danieldegrasse force-pushed the feature/skip-dependencies branch from 15c2c60 to 444fa0e Compare May 7, 2025 20:04
@fabiobaltieri
Copy link
Member

@nashif can you take a look? Haven't updated the action tag in a while, no pressure I can do it an any time but there's a bit of a backlog think I'll update the current HEAD tomorrow regardless

@cfriedt
Copy link
Member

cfriedt commented Sep 17, 2025

@danieldegrasse - this could use a rebase

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.

5 participants