forked from kofal.net/zmk
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:
2
.github/workflows/ble-test.yml
vendored
2
.github/workflows/ble-test.yml
vendored
@@ -61,7 +61,7 @@ jobs:
|
|||||||
- name: Enable babblesim group filter
|
- name: Enable babblesim group filter
|
||||||
run: west config manifest.group-filter -- +babblesim
|
run: west config manifest.group-filter -- +babblesim
|
||||||
- name: Update modules (west update)
|
- name: Update modules (west update)
|
||||||
run: west update
|
run: west update --fetch-opt=--filter=tree:0
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Build BabbleSim components
|
- name: Build BabbleSim components
|
||||||
|
|||||||
9
.github/workflows/build-user-config.yml
vendored
9
.github/workflows/build-user-config.yml
vendored
@@ -34,13 +34,10 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install yaml2json
|
|
||||||
run: python3 -m pip install remarshal
|
|
||||||
|
|
||||||
- name: Fetch Build Matrix
|
- name: Fetch Build Matrix
|
||||||
run: |
|
run: |
|
||||||
echo "build_matrix=$(yaml2json '${{ inputs.build_matrix_path }}' | jq -c .)" >> $GITHUB_ENV
|
echo "build_matrix=$(yq -oj -I0 '${{ inputs.build_matrix_path }}')" >> $GITHUB_ENV
|
||||||
yaml2json "${{ inputs.build_matrix_path }}" | jq
|
yq -oj "${{ inputs.build_matrix_path }}"
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -117,7 +114,7 @@ jobs:
|
|||||||
|
|
||||||
- name: West Update
|
- name: West Update
|
||||||
working-directory: ${{ env.base_dir }}
|
working-directory: ${{ env.base_dir }}
|
||||||
run: west update
|
run: west update --fetch-opt=--filter=tree:0
|
||||||
|
|
||||||
- name: West Zephyr export
|
- name: West Zephyr export
|
||||||
working-directory: ${{ env.base_dir }}
|
working-directory: ${{ env.base_dir }}
|
||||||
|
|||||||
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -53,7 +53,7 @@ jobs:
|
|||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
run: west init -l app
|
run: west init -l app
|
||||||
- name: Update modules (west update)
|
- name: Update modules (west update)
|
||||||
run: west update
|
run: west update --fetch-opt=--filter=tree:0
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Use Node.js
|
- name: Use Node.js
|
||||||
|
|||||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -61,7 +61,7 @@ jobs:
|
|||||||
- name: Initialize workspace (west init)
|
- name: Initialize workspace (west init)
|
||||||
run: west init -l app
|
run: west init -l app
|
||||||
- name: Update modules (west update)
|
- name: Update modules (west update)
|
||||||
run: west update
|
run: west update --fetch-opt=--filter=tree:0
|
||||||
- name: Export Zephyr CMake package (west zephyr-export)
|
- name: Export Zephyr CMake package (west zephyr-export)
|
||||||
run: west zephyr-export
|
run: west zephyr-export
|
||||||
- name: Test ${{ matrix.test }}
|
- name: Test ${{ matrix.test }}
|
||||||
|
|||||||
Reference in New Issue
Block a user