Skip to content

Commit 8815795

Browse files
committed
attempt to fix json format error
1 parent 84976cc commit 8815795

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/test_suite_ubuntu.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
|| github.event_name == 'push' && github.ref == 'refs/heads/main' ]]
4747
then
4848
# Include GCC 9–13 for PRs to main
49-
MATRIX_JSON='{
49+
MATRIX_JSON=$(cat <<EOF
50+
{
5051
"toolchain": [
5152
{"compiler": "gcc", "version": 13},
5253
{"compiler": "gcc", "version": 12},
@@ -56,20 +57,27 @@ jobs:
5657
],
5758
"std": ["f2008"],
5859
"include": [
59-
"toolchain": {"compiler": "gcc", "version": 13},
60-
"std": "f2018"
60+
{"toolchain": {"compiler": "gcc", "version": 13}, "std": "f2018"}
6161
]
62-
}'
62+
}
63+
EOF
64+
)
6365
else
6466
# Only GCC 13 for everything else
65-
MATRIX_JSON='{
67+
MATRIX_JSON=$(cat <<EOF
68+
{
6669
"toolchain": [
6770
{"compiler": "gcc", "version": 13}
6871
],
6972
"std": ["f2008, f2018"]
70-
}'
73+
}
74+
EOF
75+
)
7176
fi
77+
# Convert json to compact line expected by github action
78+
MATRIX_JSON=$(echo "$MATRIX_JSON" | jq -c .)
7279
echo "matrix=${MATRIX_JSON}" >> $GITHUB_OUTPUT
80+
7381
GNU:
7482
needs: setup-gnu-matrix
7583
# The type of runner that the job will run on

0 commit comments

Comments
 (0)