From 2e89ca036f91e8d503a3e73d8e2742a4a7d230f8 Mon Sep 17 00:00:00 2001 From: Albert Y <76888457+filterpaper@users.noreply.github.com> Date: Thu, 12 May 2022 09:59:30 +0800 Subject: [PATCH] Set verbose output, simplify grep command, keep if statement consistent --- .github/workflows/build-user-config.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-user-config.yml b/.github/workflows/build-user-config.yml index 33f35c54..c31b6783 100644 --- a/.github/workflows/build-user-config.yml +++ b/.github/workflows/build-user-config.yml @@ -37,9 +37,10 @@ jobs: - name: Install yaml2json run: python3 -m pip install remarshal - - id: set-matrix - name: Fetch Build Matrix + - name: Fetch Build Matrix + id: set-matrix run: | + set -x matrix=$(yaml2json ${{ inputs.build_matrix_path }} | jq -c .) yaml2json ${{ inputs.build_matrix_path }} echo "::set-output name=matrix::${matrix}" @@ -57,7 +58,9 @@ jobs: - name: Prepare variables id: variables run: | - if [ -n "${{ matrix.shield }}" ]; then + set -x + if [ -n "${{ matrix.shield }}" ] + then EXTRA_CMAKE_ARGS="-DSHIELD=${{ matrix.shield }}" ARTIFACT_NAME="${{ matrix.shield }}-${{ matrix.board }}-zmk" DISPLAY_NAME="${{ matrix.shield }} - ${{ matrix.board }}" @@ -103,13 +106,15 @@ jobs: - name: West Build (${{ steps.variables.outputs.display-name }}) run: | + set -x west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ steps.variables.outputs.extra-cmake-args }} ${{ matrix.cmake-args }} - name: ${{ steps.variables.outputs.display-name }} Kconfig file - run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$" | sort + run: grep -v -e "^#" -e "^$" build/zephyr/.config | sort - name: Rename artifacts run: | + set -x mkdir build/artifacts if [ -f build/zephyr/zmk.uf2 ] then