From 4724ab704177581422f971d8589c5baa4af25693 Mon Sep 17 00:00:00 2001 From: Phred Date: Thu, 14 Aug 2025 18:52:21 -0500 Subject: [PATCH] chore(ci): use native jq functionality to construct matrix --- .github/workflows/build-native.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-native.yml b/.github/workflows/build-native.yml index 83f7235ed..298d6f869 100644 --- a/.github/workflows/build-native.yml +++ b/.github/workflows/build-native.yml @@ -66,12 +66,11 @@ jobs: id: set-matrix # parse the Makefile to retrieve the list of targets in 'native-all', without 'native' run: | - matrix=$(( - echo '{ "target" : [' - sed -n "/^native-all *: */ { s///; p }" Makefile | sed "s/^native\s//g" | sed 's/ /, /g' | xargs -n 1 echo | sed -r 's/^([^,]*)(,?)$/"\1"\2/' - echo " ]}" - ) | jq -c .) - echo $matrix | jq . + matrix="$( + jq --compact-output --null-input '{ target: $ARGS.positional }' \ + --args $(awk '/^native-all.*:/ { $1 = $2 = ""; print }' Makefile) + )" + jq . <<< "$matrix" echo "matrix=$matrix" >> $GITHUB_OUTPUT build: