Skip to content

Commit 2179e25

Browse files
committed
wip
1 parent be22a7d commit 2179e25

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

action.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ inputs:
1010
Application code path, should contain a west.yml file if "manifest-file-name" is not specified
1111
required: true
1212

13+
base-path:
14+
description: |
15+
Application base path, should contain the app-path. Defaults to "." if unspecified.
16+
required: false
17+
default: .
18+
1319
manifest-file-name:
1420
description: Name of the west workspace manifest file name in "app-path"
1521
required: false
@@ -58,12 +64,14 @@ runs:
5864
fi
5965
6066
- name: Initialize
67+
working-directory: ${{ inputs.base-path }}
6168
shell: bash
6269
run: |
6370
west init -l ${{ inputs.app-path }} --mf ${{ inputs.manifest-file-name }}
6471
west update -o=--depth=1 -n
6572
6673
- name: Environment setup
74+
working-directory: ${{ inputs.base-path }}
6775
id: env-setup
6876
shell: bash
6977
run: |
@@ -126,9 +134,10 @@ runs:
126134
uses: actions/cache@v4
127135
with:
128136
path: ${{ env.PIP_CACHE_PATH }}
129-
key: pip-${{ runner.os }}-${{ hashFiles('zephyr/scripts/requirements*.txt') }}
137+
key: pip-${{ runner.os }}-${{ hashFiles(format('{0}/zephyr/scripts/requirements*.txt', inputs.base-path)) }}
130138

131139
- name: Install Python packages
140+
working-directory: ${{ inputs.base-path }}
132141
shell: bash
133142
run: |
134143
pip3 install -r zephyr/scripts/requirements.txt
@@ -137,10 +146,11 @@ runs:
137146
id: cache-toolchain
138147
uses: actions/cache@v4
139148
with:
140-
path: zephyr-sdk
149+
path: ${{ inputs.base-path }}/zephyr-sdk
141150
key: ${{ env.SDK_FILE }}-${{ inputs.toolchains }}
142151

143152
- if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }}
153+
working-directory: ${{ inputs.base-path }}
144154
name: Download Zephyr SDK
145155
shell: bash
146156
run: |
@@ -154,7 +164,7 @@ runs:
154164
fi
155165
156166
- name: Setup Zephyr SDK
157-
working-directory: zephyr-sdk
167+
working-directory: ${{ inputs.base-path }}/zephyr-sdk
158168
shell: bash
159169
run: |
160170
IFS=":"

0 commit comments

Comments
 (0)