From c25e927a2fae915e208a8777ce211a10c658e771 Mon Sep 17 00:00:00 2001 From: Robert U <978080+urob@users.noreply.github.com> Date: Thu, 31 Jul 2025 18:36:04 -0400 Subject: [PATCH] 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). --- .github/workflows/ble-test.yml | 2 +- .github/workflows/build-user-config.yml | 9 +++------ .github/workflows/build.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ble-test.yml b/.github/workflows/ble-test.yml index 867c7f7ec..7d76fb9e9 100644 --- a/.github/workflows/ble-test.yml +++ b/.github/workflows/ble-test.yml @@ -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 diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 7b4f10b0b..cf3247d04 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -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 }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d187cfe8c..3307b006a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cbd447378..93321760e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }}