Skip to content

Commit 2d13ef3

Browse files
committed
action: use $HOME/zephyr-sdk for the Zephyr SDK
The Zephyr SDK install has a step where it tweaks the library paths of the host utilities so match the full install path and have them run without having to set LD_LIBRARY_PATH. In the current setup that path includes the repository name, which means that if the repository is renamed the cached SDK is going to end up having a non working path leading to a confusing error, typically dtc not found. Move the SDK install to the home directory, so that the path does not depend on the repository name. The SDK is found using a CMake package so it can really be installed anywhere. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent 3a58338 commit 2d13ef3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

action.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ runs:
177177
sdk_version="${{ inputs.sdk-version }}"
178178
fi
179179
180+
echo "HOME=$HOME" >> $GITHUB_ENV
180181
echo "SDK_VERSION=${sdk_version}" >> $GITHUB_ENV
181182
echo "SDK_FILE=zephyr-sdk-${sdk_version}_${sdk_variant}_minimal.${sdk_ext}" >> $GITHUB_ENV
182183
echo "PIP_CACHE_PATH=${pip_cache_path}" >> $GITHUB_ENV
@@ -204,11 +205,11 @@ runs:
204205
id: cache-toolchain
205206
uses: actions/cache@v4
206207
with:
207-
path: ${{ inputs.base-path }}/zephyr-sdk
208+
path: ${{ env.HOME }}/zephyr-sdk
208209
key: ${{ env.SDK_FILE }}-${{ inputs.toolchains }}
209210

210211
- if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }}
211-
working-directory: ${{ inputs.base-path }}
212+
working-directory: ${{ env.HOME }}
212213
name: Download Zephyr SDK
213214
shell: bash
214215
run: |
@@ -217,12 +218,12 @@ runs:
217218
7z x $SDK_FILE
218219
mv zephyr-sdk-${SDK_VERSION} zephyr-sdk
219220
else
220-
mkdir zephyr-sdk
221+
mkdir $HOME/zephyr-sdk
221222
tar xvf $SDK_FILE -C zephyr-sdk --strip-components=1
222223
fi
223224
224225
- name: Setup Zephyr SDK
225-
working-directory: ${{ inputs.base-path }}/zephyr-sdk
226+
working-directory: ${{ env.HOME }}/zephyr-sdk
226227
shell: bash
227228
run: |
228229
IFS=":"

0 commit comments

Comments
 (0)