Skip to content

Commit 94ba1e2

Browse files
authored
Merge pull request #882 from DeusData/fix/smoke-gating
ci(smoke): every smoke leg gates + fix matrix collapse (no false-green)
2 parents affa223 + d39d9b6 commit 94ba1e2

1 file changed

Lines changed: 21 additions & 12 deletions

File tree

.github/workflows/_smoke.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,24 @@ jobs:
4040
# Broad legs reuse existing goos/goarch artifacts on newer/older OS
4141
# versions (e.g. ubuntu-22.04 = older glibc) to widen the run-anywhere
4242
# signal without building new targets.
43+
# Broad legs are REQUIRED gates (no optional / continue-on-error):
44+
# every smoke leg must pass. No `optional` flags anywhere.
4345
BROAD_UNIX='[
44-
{"os":"ubuntu-22.04","goos":"linux","goarch":"amd64","optional":true},
45-
{"os":"ubuntu-22.04-arm","goos":"linux","goarch":"arm64","optional":true},
46-
{"os":"macos-15","goos":"darwin","goarch":"arm64","optional":true}
46+
{"os":"ubuntu-22.04","goos":"linux","goarch":"amd64"},
47+
{"os":"ubuntu-22.04-arm","goos":"linux","goarch":"arm64"},
48+
{"os":"macos-15","goos":"darwin","goarch":"arm64"}
4749
]'
4850
CORE_WIN='[{"os":"windows-latest"}]'
4951
# windows-11-arm runs the shipped x86_64 binary under emulation —
5052
# verifies the Windows artifact still launches on ARM hardware.
51-
BROAD_WIN='[{"os":"windows-2025","optional":true},{"os":"windows-11-arm","optional":true}]'
53+
BROAD_WIN='[{"os":"windows-2025"},{"os":"windows-11-arm"}]'
5254
CORE_PORTABLE='[
5355
{"arch":"amd64","runner":"ubuntu-latest"},
5456
{"arch":"arm64","runner":"ubuntu-24.04-arm"}
5557
]'
5658
BROAD_PORTABLE='[
57-
{"arch":"amd64","runner":"ubuntu-22.04","optional":true},
58-
{"arch":"arm64","runner":"ubuntu-22.04-arm","optional":true}
59+
{"arch":"amd64","runner":"ubuntu-22.04"},
60+
{"arch":"arm64","runner":"ubuntu-22.04-arm"}
5961
]'
6062
if [ "$BROAD" = "true" ]; then
6163
UNIX=$(jq -cn --argjson a "$CORE_UNIX" --argjson b "$BROAD_UNIX" '$a + $b')
@@ -66,17 +68,26 @@ jobs:
6668
WIN=$(jq -cn --argjson a "$CORE_WIN" '$a')
6769
PORTABLE=$(jq -cn --argjson a "$CORE_PORTABLE" '$a')
6870
fi
69-
echo "unix={\"variant\":[\"standard\",\"ui\"],\"include\":$UNIX}" >> "$GITHUB_OUTPUT"
70-
echo "windows={\"variant\":[\"standard\",\"ui\"],\"include\":$WIN}" >> "$GITHUB_OUTPUT"
71-
echo "portable={\"variant\":[\"standard\",\"ui\"],\"include\":$PORTABLE}" >> "$GITHUB_OUTPUT"
71+
# Expand each OS entry over both variants into a FLAT include list so
72+
# every {os,variant} runs as its own job. A {variant:[...],include:$LIST}
73+
# matrix collapses under GitHub's include-merge (later os entries
74+
# overwrite the variant combos last-wins), which silently dropped every
75+
# OS except the last — e.g. only windows-11-arm ran, never windows-latest.
76+
# Building the cartesian explicitly avoids that.
77+
VARIANTS='["standard","ui"]'
78+
UNIX_M=$(jq -cn --argjson a "$UNIX" --argjson v "$VARIANTS" '{include:[$a[] as $o | $v[] as $t | ($o + {variant:$t})]}')
79+
WIN_M=$(jq -cn --argjson a "$WIN" --argjson v "$VARIANTS" '{include:[$a[] as $o | $v[] as $t | ($o + {variant:$t})]}')
80+
PORTABLE_M=$(jq -cn --argjson a "$PORTABLE" --argjson v "$VARIANTS" '{include:[$a[] as $o | $v[] as $t | ($o + {variant:$t})]}')
81+
echo "unix=$UNIX_M" >> "$GITHUB_OUTPUT"
82+
echo "windows=$WIN_M" >> "$GITHUB_OUTPUT"
83+
echo "portable=$PORTABLE_M" >> "$GITHUB_OUTPUT"
7284
7385
smoke-unix:
7486
needs: setup-matrix
7587
strategy:
7688
fail-fast: false
7789
matrix: ${{ fromJSON(needs.setup-matrix.outputs.unix) }}
7890
runs-on: ${{ matrix.os }}
79-
continue-on-error: ${{ matrix.optional == true }}
8091
timeout-minutes: 15
8192
steps:
8293
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -153,7 +164,6 @@ jobs:
153164
fail-fast: false
154165
matrix: ${{ fromJSON(needs.setup-matrix.outputs.windows) }}
155166
runs-on: ${{ matrix.os }}
156-
continue-on-error: ${{ matrix.optional == true }}
157167
timeout-minutes: 15
158168
steps:
159169
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -220,7 +230,6 @@ jobs:
220230
fail-fast: false
221231
matrix: ${{ fromJSON(needs.setup-matrix.outputs.portable) }}
222232
runs-on: ${{ matrix.runner }}
223-
continue-on-error: ${{ matrix.optional == true }}
224233
timeout-minutes: 15
225234
steps:
226235
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

0 commit comments

Comments
 (0)