mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
fix(ci): Better safeguards for ZMK variant build check (#3277)
Add an early guard to bail during the board compat check to ensure we don't error out for out-of-tree boards with no ZMK variant.
This commit is contained in:
9
.github/workflows/build-user-config.yml
vendored
9
.github/workflows/build-user-config.yml
vendored
@@ -149,13 +149,18 @@ jobs:
|
||||
|
||||
- name: Check if building a board without explicit ZMK compat
|
||||
if: always()
|
||||
working-directory: ${{ env.base_dir }}/zmk/app
|
||||
working-directory: "${{ env.base_dir }}/${{ inputs.config_path }}"
|
||||
run: |
|
||||
if ! (grep "CONFIG_ZMK_BOARD_COMPAT=y" "${{ env.build_dir }}/zephyr/.config" > /dev/null)
|
||||
then
|
||||
original_board=$(echo "${{ matrix.board }}" | sed -e 's$/.*$$')
|
||||
west boards --board-root module --board-root . --board "${original_board}" --format "{qualifiers}" | grep "zmk" > /dev/null
|
||||
west_board=$(west boards --board-root ${{ env.base_dir }}/zmk/app/module --board-root ${{ env.base_dir }}/zmk/app --board "${original_board}")
|
||||
if [ -z "$west_board" ]; then
|
||||
echo "Not found the board listed with west boards. Skipping further checking."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
west boards --board-root ${{ env.base_dir }}/zmk/app/module --board-root ${{ env.base_dir }}/zmk/app --board "${original_board}" --format "{qualifiers}" | grep "zmk" > /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "::warning file=build/zephyr/.config,title=Missing ZMK Compat::The selected board does not report explicit ZMK compat. Please verify you've selected the correct board and ZMK variant if one exists"
|
||||
|
||||
Reference in New Issue
Block a user