Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,15 @@ the necessary modules for a West based [Zephyr workspace application][1].
west-project-filter: -nrf_hw_models
```

## Skip installing OS level dependencies and Zephyr SDK

```yaml
- name: Setup Zephyr project
uses: zephyrproject-rtos/action-zephyr-setup@v1
with:
app-path: example-application
toolchains: arm-zephyr-eabi
skip-dependencies: true
```

[1]: https://docs.zephyrproject.org/latest/develop/application/index.html#zephyr-workspace-app
12 changes: 11 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ inputs:
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?

description: |
Set to 'true' to skip installation of SDK and OS dependencies. Useful
when running action within a container
required: false
default: 'false'

toolchains:
description: List of toolchains to install, colon separated
required: false
Expand All @@ -53,6 +60,7 @@ runs:
using: "composite"
steps:
- name: Install dependencies
if: ${{ inputs.skip-dependencies != 'true' }}
shell: bash
run: |
if [ "${{ runner.os }}" = "Windows" ]; then
Expand Down Expand Up @@ -163,13 +171,14 @@ runs:
west packages pip --install --ignore-venv-check || pip3 install -r zephyr/scripts/requirements.txt

- name: Cache Zephyr SDK
if: ${{ inputs.skip-dependencies != 'true' }}
id: cache-toolchain
uses: actions/cache@v4
with:
path: ${{ inputs.base-path }}/zephyr-sdk
key: ${{ env.SDK_FILE }}-${{ inputs.toolchains }}

- if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }}
- if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && inputs.skip-dependencies != 'true' }}
working-directory: ${{ inputs.base-path }}
name: Download Zephyr SDK
shell: bash
Expand All @@ -184,6 +193,7 @@ runs:
fi

- name: Setup Zephyr SDK
if: ${{ inputs.skip-dependencies != 'true' }}
working-directory: ${{ inputs.base-path }}/zephyr-sdk
shell: bash
run: |
Expand Down
Loading