aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorPeter Johanson <[email protected]>2024-03-24 21:09:16 +0000
committerPete Johanson <[email protected]>2024-03-24 18:44:54 -0700
commit94c3b9a24607c966e28d44b6634c6084a21f84b2 (patch)
tree40293adb77e78bcb11e70a81fc4ee6da1fd915a7 /.github/workflows
parentc684cee76f6732d1da3dc23564b64e9a1ea08671 (diff)
downloadzmk-94c3b9a24607c966e28d44b6634c6084a21f84b2.tar.gz
zmk-94c3b9a24607c966e28d44b6634c6084a21f84b2.zip
feat(build): Allow specifying snippets for a build.
* Allow using snippets https://docs.zephyrproject.org/latest/build/snippets/using.html for user builds in a `snippets` array properly.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build-user-config.yml8
1 files changed, 7 insertions, 1 deletions
diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml
index d8ea057e56..c3e4789dc5 100644
--- a/.github/workflows/build-user-config.yml
+++ b/.github/workflows/build-user-config.yml
@@ -65,6 +65,7 @@ jobs:
board: ${{ matrix.board }}
shield: ${{ matrix.shield }}
artifact_name: ${{ matrix.artifact-name }}
+ snippet: ${{ matrix.snippet }}
run: |
if [ -e zephyr/module.yml ]; then
export zmk_load_arg=" -DZMK_EXTRA_MODULES='${GITHUB_WORKSPACE}'"
@@ -75,7 +76,12 @@ jobs:
echo "base_dir=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
fi
+ if [ -n "${snippet}" ]; then
+ extra_west_args="-S \"${snippet}\""
+ fi
+
echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV
+ echo "extra_west_args=${extra_west_args}" >> $GITHUB_ENV
echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}${zmk_load_arg}" >> $GITHUB_ENV
echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV
echo "artifact_name=${artifact_name:-${shield:+$shield-}${board}-zmk}" >> $GITHUB_ENV
@@ -120,7 +126,7 @@ jobs:
- name: West Build (${{ env.display_name }})
working-directory: ${{ env.base_dir }}
shell: sh -x {0}
- run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" -- -DZMK_CONFIG=${{ env.base_dir }}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
+ run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" ${{ env.extra_west_args }} -- -DZMK_CONFIG=${{ env.base_dir }}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
- name: ${{ env.display_name }} Kconfig file
run: |