chore(ci): Optimize build workflow (#2757)

* Use treeless clones in workflows
* Replace yaml2json with yq

Github's ubuntu runners come with `yq` installed, which can replace
piping `yaml2json` to `jq`. It also saves installing `yaml2json`.

It's worth noting that the `yq` version installed is the `go` version
(which has a slightly different syntax than the competing `python`
version).
This commit is contained in:
Robert U 2025-07-31 18:36:04 -04:00 committed by GitHub
parent c86f0d6ff4
commit c25e927a2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 9 deletions

View File

@ -61,7 +61,7 @@ jobs:
- name: Enable babblesim group filter
run: west config manifest.group-filter -- +babblesim
- name: Update modules (west update)
run: west update
run: west update --fetch-opt=--filter=tree:0
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Build BabbleSim components

View File

@ -34,13 +34,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install yaml2json
run: python3 -m pip install remarshal
- name: Fetch Build Matrix
run: |
echo "build_matrix=$(yaml2json '${{ inputs.build_matrix_path }}' | jq -c .)" >> $GITHUB_ENV
yaml2json "${{ inputs.build_matrix_path }}" | jq
echo "build_matrix=$(yq -oj -I0 '${{ inputs.build_matrix_path }}')" >> $GITHUB_ENV
yq -oj "${{ inputs.build_matrix_path }}"
build:
runs-on: ubuntu-latest
@ -117,7 +114,7 @@ jobs:
- name: West Update
working-directory: ${{ env.base_dir }}
run: west update
run: west update --fetch-opt=--filter=tree:0
- name: West Zephyr export
working-directory: ${{ env.base_dir }}

View File

@ -53,7 +53,7 @@ jobs:
- name: Initialize workspace (west init)
run: west init -l app
- name: Update modules (west update)
run: west update
run: west update --fetch-opt=--filter=tree:0
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Use Node.js

View File

@ -61,7 +61,7 @@ jobs:
- name: Initialize workspace (west init)
run: west init -l app
- name: Update modules (west update)
run: west update
run: west update --fetch-opt=--filter=tree:0
- name: Export Zephyr CMake package (west zephyr-export)
run: west zephyr-export
- name: Test ${{ matrix.test }}