workflow: add /opt/toolchains to CMAKE_PREFIX_PATH in environment.

Fixes: #39270

The latest zephyrprojectrtos/ci no longer sets ZEPHYR_SDK_INSTALL_DIR
in the environment and doesn't register the Zephyr-SDK as a CMake
package in the CMake package registry.

To ensure the the Zephyr SDK can be correctly discovered by
find_package(Zephyr-sdk) we add `/opt/toolchains` to the
CMAKE_PREFIX_PATH environment variable which is a list containing
additional search prefixes for the `find_package()` function.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
Torsten Rasmussen 2021-10-08 13:11:18 +02:00 committed by Carles Cufí
parent e50d42c801
commit 325bd84244

View file

@ -6,6 +6,8 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: zephyrprojectrtos/ci:latest container: zephyrprojectrtos/ci:latest
env:
CMAKE_PREFIX_PATH: /opt/toolchains
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2