|
2 | 2 | name: Smoke |
3 | 3 |
|
4 | 4 | on: |
5 | | - workflow_call: {} |
| 5 | + workflow_call: |
| 6 | + inputs: |
| 7 | + broad_platforms: |
| 8 | + description: 'Smoke the shipped binaries on the broad platform matrix (extra OS versions) instead of the core set' |
| 9 | + type: boolean |
| 10 | + default: false |
6 | 11 |
|
7 | 12 | permissions: |
8 | 13 | contents: read |
9 | 14 |
|
10 | 15 | jobs: |
| 16 | + # Emit the platform matrices as JSON. The CORE set is the default (fast, |
| 17 | + # unchanged); the BROAD set adds extra free runners (additional OS versions) |
| 18 | + # that download the SAME shipped artifact for their goos/goarch and verify it |
| 19 | + # runs on a wider range of OS versions. No new artifacts are built — broad |
| 20 | + # legs reuse the exact binaries produced by _build.yml. |
| 21 | + setup-matrix: |
| 22 | + runs-on: ubuntu-latest |
| 23 | + timeout-minutes: 5 |
| 24 | + outputs: |
| 25 | + unix: ${{ steps.set.outputs.unix }} |
| 26 | + windows: ${{ steps.set.outputs.windows }} |
| 27 | + portable: ${{ steps.set.outputs.portable }} |
| 28 | + steps: |
| 29 | + - name: Compute matrices |
| 30 | + id: set |
| 31 | + env: |
| 32 | + BROAD: ${{ inputs.broad_platforms }} |
| 33 | + run: | |
| 34 | + CORE_UNIX='[ |
| 35 | + {"os":"ubuntu-latest","goos":"linux","goarch":"amd64"}, |
| 36 | + {"os":"ubuntu-24.04-arm","goos":"linux","goarch":"arm64"}, |
| 37 | + {"os":"macos-14","goos":"darwin","goarch":"arm64"}, |
| 38 | + {"os":"macos-15-intel","goos":"darwin","goarch":"amd64"} |
| 39 | + ]' |
| 40 | + # Broad legs reuse existing goos/goarch artifacts on newer/older OS |
| 41 | + # versions (e.g. ubuntu-22.04 = older glibc) to widen the run-anywhere |
| 42 | + # signal without building new targets. |
| 43 | + 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} |
| 47 | + ]' |
| 48 | + CORE_WIN='[{"os":"windows-latest"}]' |
| 49 | + # windows-11-arm runs the shipped x86_64 binary under emulation — |
| 50 | + # verifies the Windows artifact still launches on ARM hardware. |
| 51 | + BROAD_WIN='[{"os":"windows-2025","optional":true},{"os":"windows-11-arm","optional":true}]' |
| 52 | + CORE_PORTABLE='[ |
| 53 | + {"arch":"amd64","runner":"ubuntu-latest"}, |
| 54 | + {"arch":"arm64","runner":"ubuntu-24.04-arm"} |
| 55 | + ]' |
| 56 | + BROAD_PORTABLE='[ |
| 57 | + {"arch":"amd64","runner":"ubuntu-22.04","optional":true}, |
| 58 | + {"arch":"arm64","runner":"ubuntu-22.04-arm","optional":true} |
| 59 | + ]' |
| 60 | + if [ "$BROAD" = "true" ]; then |
| 61 | + UNIX=$(jq -cn --argjson a "$CORE_UNIX" --argjson b "$BROAD_UNIX" '$a + $b') |
| 62 | + WIN=$(jq -cn --argjson a "$CORE_WIN" --argjson b "$BROAD_WIN" '$a + $b') |
| 63 | + PORTABLE=$(jq -cn --argjson a "$CORE_PORTABLE" --argjson b "$BROAD_PORTABLE" '$a + $b') |
| 64 | + else |
| 65 | + UNIX=$(jq -cn --argjson a "$CORE_UNIX" '$a') |
| 66 | + WIN=$(jq -cn --argjson a "$CORE_WIN" '$a') |
| 67 | + PORTABLE=$(jq -cn --argjson a "$CORE_PORTABLE" '$a') |
| 68 | + 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" |
| 72 | +
|
11 | 73 | smoke-unix: |
| 74 | + needs: setup-matrix |
12 | 75 | strategy: |
13 | 76 | fail-fast: false |
14 | | - matrix: |
15 | | - include: |
16 | | - - os: ubuntu-latest |
17 | | - goos: linux |
18 | | - goarch: amd64 |
19 | | - - os: ubuntu-24.04-arm |
20 | | - goos: linux |
21 | | - goarch: arm64 |
22 | | - - os: macos-14 |
23 | | - goos: darwin |
24 | | - goarch: arm64 |
25 | | - - os: macos-15-intel |
26 | | - goos: darwin |
27 | | - goarch: amd64 |
28 | | - variant: [standard, ui] |
| 77 | + matrix: ${{ fromJSON(needs.setup-matrix.outputs.unix) }} |
29 | 78 | runs-on: ${{ matrix.os }} |
| 79 | + continue-on-error: ${{ matrix.optional == true }} |
30 | 80 | timeout-minutes: 15 |
31 | 81 | steps: |
32 | 82 | - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 |
@@ -98,11 +148,12 @@ jobs: |
98 | 148 | clamscan --no-summary ./codebase-memory-mcp |
99 | 149 |
|
100 | 150 | smoke-windows: |
| 151 | + needs: setup-matrix |
101 | 152 | strategy: |
102 | 153 | fail-fast: false |
103 | | - matrix: |
104 | | - variant: [standard, ui] |
105 | | - runs-on: windows-latest |
| 154 | + matrix: ${{ fromJSON(needs.setup-matrix.outputs.windows) }} |
| 155 | + runs-on: ${{ matrix.os }} |
| 156 | + continue-on-error: ${{ matrix.optional == true }} |
106 | 157 | timeout-minutes: 15 |
107 | 158 | steps: |
108 | 159 | - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 |
@@ -164,16 +215,12 @@ jobs: |
164 | 215 | Write-Host "=== Windows Defender: clean ===" |
165 | 216 |
|
166 | 217 | smoke-linux-portable: |
| 218 | + needs: setup-matrix |
167 | 219 | strategy: |
168 | 220 | fail-fast: false |
169 | | - matrix: |
170 | | - include: |
171 | | - - arch: amd64 |
172 | | - runner: ubuntu-latest |
173 | | - - arch: arm64 |
174 | | - runner: ubuntu-24.04-arm |
175 | | - variant: [standard, ui] |
| 221 | + matrix: ${{ fromJSON(needs.setup-matrix.outputs.portable) }} |
176 | 222 | runs-on: ${{ matrix.runner }} |
| 223 | + continue-on-error: ${{ matrix.optional == true }} |
177 | 224 | timeout-minutes: 15 |
178 | 225 | steps: |
179 | 226 | - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 |
|
0 commit comments