From 347bbf0d9aae39cf4416d026f7d2341923118fc5 Mon Sep 17 00:00:00 2001 From: Yethal Date: Wed, 29 Mar 2023 16:23:42 +0200 Subject: [PATCH] reuse make target for board list --- .github/workflows/ci.yml | 6 +++--- scripts/boards.sh | 16 ---------------- 2 files changed, 3 insertions(+), 19 deletions(-) delete mode 100755 scripts/boards.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0292b83..71a9e6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - name: Generate board matrix id: board-matrix - run: ./scripts/boards.sh >> $GITHUB_OUTPUT + run: echo "boards=$(make list-boards | jq -sRc 'split("\n")[:-1]')" >> $GITHUB_OUTPUT tool: strategy: @@ -50,7 +50,7 @@ jobs: needs: lint strategy: matrix: - boards: ${{ fromJson(needs.lint.outputs.boards )}} + boards: ${{ fromJson(needs.lint.outputs.boards) }} # TODO: Conditionally build based on files changed? steps: @@ -60,4 +60,4 @@ jobs: run: ./scripts/deps.sh - name: Build firmware - run: make BOARD=${{ matrix.boards.vendor}}/${{ matrix.boards.board }} VERBOSE=1 + run: make BOARD=${{ matrix.boards }} VERBOSE=1 diff --git a/scripts/boards.sh b/scripts/boards.sh deleted file mode 100755 index 8ffe121..0000000 --- a/scripts/boards.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-only - -set -eE -EXCLUDED_BOARDS=( - "system76/common" - "arduino/uno" - "arduino/micro" -) - -BOARDS=$(find src/board -type d -maxdepth 2 -mindepth 2 2>/dev/null \ - | grep -vFf <(printf '%s\n' "${EXCLUDED_BOARDS[@]}") \ - | jq -sRc 'split("\n")[:-1] | map(split("/")) | map({vendor: .[2], board: .[3]})' -) - -echo "boards=${BOARDS}" \ No newline at end of file