File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1818 - name : Install build dependencies
1919 run : |
2020 sudo apt-get update
21- sudo apt-get install -y build-essential cmake ninja-build zip python3 python3-pip
21+ sudo apt-get install -y build-essential cmake ninja-build zip python3 python3-pip jq
2222
2323 - name : Configure CMake
2424 run : cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
@@ -47,12 +47,12 @@ jobs:
4747 fi
4848 done
4949
50- # Convert platforms array to JSON
51- PLATFORMS_JSON=$(python3 - <<'PY'
52- import json,sys
53- print(json.dumps(sys.argv[1:]))
54- PY
55- ${platforms[@]:-})
50+ # Convert platforms array to JSON using jq
51+ if [ ${#platforms[@]} -gt 0 ]; then
52+ PLATFORMS_JSON=$(printf '%s\n' "${platforms[@]}" | jq -R -s -c 'split("\n")[:-1]')
53+ else
54+ PLATFORMS_JSON='[]'
55+ fi
5656
5757 echo "Found platforms: $PLATFORMS_JSON"
5858 echo "platforms=$PLATFORMS_JSON" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments