Skip to content

Commit 65f842d

Browse files
authored
Merge pull request #272 from FastLED/feat/fractional-ci-cli
ci: fractional platform validation and exact-SHA release preflight
2 parents c5dc5f0 + 0b38e4e commit 65f842d

49 files changed

Lines changed: 1887 additions & 256 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/_build.yml‎

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Build
33
on:
44
workflow_call:
55
inputs:
6+
source-sha:
7+
required: false
8+
type: string
9+
default: ""
610
runs-on:
711
required: true
812
type: string
@@ -24,6 +28,17 @@ jobs:
2428
shell: bash
2529
steps:
2630
- uses: actions/checkout@v4
31+
with:
32+
ref: ${{ inputs.source-sha || github.sha }}
33+
- name: Verify checkout SHA
34+
env:
35+
EXPECTED_SHA: ${{ inputs.source-sha || github.sha }}
36+
run: |
37+
[[ "$EXPECTED_SHA" =~ ^[0-9a-f]{40}$ ]]
38+
if [[ "$GITHUB_EVENT_NAME" == workflow_dispatch ]]; then
39+
test "$EXPECTED_SHA" = "$GITHUB_SHA"
40+
fi
41+
test "$(git rev-parse HEAD)" = "$EXPECTED_SHA"
2742
2843
- uses: astral-sh/setup-uv@v5
2944
with:
@@ -102,6 +117,10 @@ jobs:
102117
ls -lh src/fastled/bin/
103118
104119
- name: Build wheel
120+
env:
121+
# setup.py rebuilds the bundled binary; keep that rebuild on the
122+
# requested target, especially Windows ARM on an x64 runner.
123+
FASTLED_RUST_TARGET: ${{ inputs.rust-target }}
105124
run: |
106125
PLAT_NAME=""
107126
case "${{ inputs.rust-target }}" in
@@ -129,15 +148,15 @@ jobs:
129148
if: always() && inputs.wheel-smoke
130149
uses: actions/upload-artifact@v4
131150
with:
132-
name: wheel-smoke-screenshot-${{ inputs.runs-on }}-${{ inputs.rust-target || 'native' }}
151+
name: smoke-wheel-screenshot-${{ inputs.runs-on }}-${{ inputs.rust-target || 'native' }}
133152
path: ${{ runner.temp }}/fastled-wheel-smoke/artifacts/*.png
134153
if-no-files-found: error
135154

136155
- name: Upload installed wheel viewer log
137156
if: always() && inputs.wheel-smoke
138157
uses: actions/upload-artifact@v4
139158
with:
140-
name: wheel-smoke-log-${{ inputs.runs-on }}-${{ inputs.rust-target || 'native' }}
159+
name: smoke-wheel-log-${{ inputs.runs-on }}-${{ inputs.rust-target || 'native' }}
141160
path: ${{ runner.temp }}/fastled-wheel-smoke/artifacts/*.log
142161
if-no-files-found: warn
143162

@@ -146,12 +165,14 @@ jobs:
146165
with:
147166
name: wheel-${{ inputs.runs-on }}-${{ inputs.rust-target || 'native' }}
148167
path: dist/*.whl
168+
if-no-files-found: error
149169

150170
- name: Upload binary
151171
uses: actions/upload-artifact@v4
152172
with:
153173
name: binary-${{ inputs.runs-on }}-${{ inputs.rust-target || 'native' }}
154174
path: src/fastled/bin/fastled*
175+
if-no-files-found: error
155176

156177
- name: Upload failure logs
157178
if: failure()

‎.github/workflows/_integration-test.yml‎

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Integration Test
33
on:
44
workflow_call:
55
inputs:
6+
source-sha:
7+
required: false
8+
type: string
9+
default: ""
610
runs-on:
711
required: true
812
type: string
@@ -18,6 +22,17 @@ jobs:
1822
PYTHONIOENCODING: utf-8
1923
steps:
2024
- uses: actions/checkout@v4
25+
with:
26+
ref: ${{ inputs.source-sha || github.sha }}
27+
- name: Verify checkout SHA
28+
env:
29+
EXPECTED_SHA: ${{ inputs.source-sha || github.sha }}
30+
run: |
31+
[[ "$EXPECTED_SHA" =~ ^[0-9a-f]{40}$ ]]
32+
if [[ "$GITHUB_EVENT_NAME" == workflow_dispatch ]]; then
33+
test "$EXPECTED_SHA" = "$GITHUB_SHA"
34+
fi
35+
test "$(git rev-parse HEAD)" = "$EXPECTED_SHA"
2136
2237
- uses: astral-sh/setup-uv@v5
2338
with:
@@ -40,9 +55,10 @@ jobs:
4055
env:
4156
GITHUB_TOKEN: ${{ github.token }}
4257
with:
43-
# No soldr version pin: keep in lockstep with _build.yml so all jobs
44-
# resolve the same soldr/zccache version and share warm caches
45-
# (see the pin rationale comment in _build.yml and #158).
58+
# Windows ARM native tests hit 0.7.51's listener timeout and
59+
# 0.7.53's pre-lock timeout. Try 0.9.21's embedded daemon; keep
60+
# other runners and cross-builds on 0.7.51 (see #158).
61+
version: ${{ inputs.runs-on == 'windows-11-arm' && '0.9.21' || '0.7.51' }}
4662
# cache-preset: foundation expands to build-cache: true +
4763
# target-cache: false + cargo-registry-cache: false +
4864
# prebuild-deps: soldr-cook (setup-soldr v0.9.17+, #251).
@@ -64,6 +80,20 @@ jobs:
6480
- name: Native Test Suite
6581
run: ./test
6682

83+
- name: Capture Soldr failure diagnostics
84+
if: failure() && inputs.runs-on == 'windows-11-arm'
85+
continue-on-error: true
86+
shell: pwsh
87+
run: ./ci/capture_soldr_failure.ps1
88+
89+
- name: Upload Soldr failure diagnostics
90+
if: failure() && inputs.runs-on == 'windows-11-arm'
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: soldr-failure-diagnostics-integration-test-${{ inputs.runs-on }}-${{ github.run_attempt }}
94+
path: soldr-failure-diagnostics/**
95+
if-no-files-found: error
96+
6797
- name: Upload failure logs
6898
if: failure()
6999
uses: actions/upload-artifact@v4

‎.github/workflows/_lint.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Lint
33
on:
44
workflow_call:
55
inputs:
6+
source-sha:
7+
required: false
8+
type: string
9+
default: ""
610
runs-on:
711
required: true
812
type: string
@@ -16,6 +20,17 @@ jobs:
1620
shell: bash
1721
steps:
1822
- uses: actions/checkout@v4
23+
with:
24+
ref: ${{ inputs.source-sha || github.sha }}
25+
- name: Verify checkout SHA
26+
env:
27+
EXPECTED_SHA: ${{ inputs.source-sha || github.sha }}
28+
run: |
29+
[[ "$EXPECTED_SHA" =~ ^[0-9a-f]{40}$ ]]
30+
if [[ "$GITHUB_EVENT_NAME" == workflow_dispatch ]]; then
31+
test "$EXPECTED_SHA" = "$GITHUB_SHA"
32+
fi
33+
test "$(git rev-parse HEAD)" = "$EXPECTED_SHA"
1934
2035
- uses: astral-sh/setup-uv@v5
2136
with:

‎.github/workflows/_terminal-test.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ name: Terminal Test
1414
on:
1515
workflow_call:
1616
inputs:
17+
source-sha:
18+
required: false
19+
type: string
20+
default: ""
1721
runs-on:
1822
required: true
1923
type: string
@@ -39,6 +43,17 @@ jobs:
3943
PYTHONIOENCODING: utf-8
4044
steps:
4145
- uses: actions/checkout@v4
46+
with:
47+
ref: ${{ inputs.source-sha || github.sha }}
48+
- name: Verify checkout SHA
49+
env:
50+
EXPECTED_SHA: ${{ inputs.source-sha || github.sha }}
51+
run: |
52+
[[ "$EXPECTED_SHA" =~ ^[0-9a-f]{40}$ ]]
53+
if [[ "$GITHUB_EVENT_NAME" == workflow_dispatch ]]; then
54+
test "$EXPECTED_SHA" = "$GITHUB_SHA"
55+
fi
56+
test "$(git rev-parse HEAD)" = "$EXPECTED_SHA"
4257
4358
- uses: astral-sh/setup-uv@v5
4459
with:

‎.github/workflows/_unit-test.yml‎

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Unit Test
33
on:
44
workflow_call:
55
inputs:
6+
source-sha:
7+
required: false
8+
type: string
9+
default: ""
610
runs-on:
711
required: true
812
type: string
@@ -18,6 +22,17 @@ jobs:
1822
PYTHONIOENCODING: utf-8
1923
steps:
2024
- uses: actions/checkout@v4
25+
with:
26+
ref: ${{ inputs.source-sha || github.sha }}
27+
- name: Verify checkout SHA
28+
env:
29+
EXPECTED_SHA: ${{ inputs.source-sha || github.sha }}
30+
run: |
31+
[[ "$EXPECTED_SHA" =~ ^[0-9a-f]{40}$ ]]
32+
if [[ "$GITHUB_EVENT_NAME" == workflow_dispatch ]]; then
33+
test "$EXPECTED_SHA" = "$GITHUB_SHA"
34+
fi
35+
test "$(git rev-parse HEAD)" = "$EXPECTED_SHA"
2136
2237
- uses: astral-sh/setup-uv@v5
2338
with:
@@ -40,9 +55,10 @@ jobs:
4055
env:
4156
GITHUB_TOKEN: ${{ github.token }}
4257
with:
43-
# No soldr version pin: keep in lockstep with _build.yml so all jobs
44-
# resolve the same soldr/zccache version and share warm caches
45-
# (see the pin rationale comment in _build.yml and #158).
58+
# Windows ARM native tests hit 0.7.51's listener timeout and
59+
# 0.7.53's pre-lock timeout. Try 0.9.21's embedded daemon; keep
60+
# other runners and cross-builds on 0.7.51 (see #158).
61+
version: ${{ inputs.runs-on == 'windows-11-arm' && '0.9.21' || '0.7.51' }}
4662
# cache-preset: foundation expands to build-cache: true +
4763
# target-cache: false + cargo-registry-cache: false +
4864
# prebuild-deps: soldr-cook (setup-soldr v0.9.17+, #251).
@@ -64,6 +80,20 @@ jobs:
6480
- name: Unit Tests
6581
run: ./test
6682

83+
- name: Capture Soldr failure diagnostics
84+
if: failure() && inputs.runs-on == 'windows-11-arm'
85+
continue-on-error: true
86+
shell: pwsh
87+
run: ./ci/capture_soldr_failure.ps1
88+
89+
- name: Upload Soldr failure diagnostics
90+
if: failure() && inputs.runs-on == 'windows-11-arm'
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: soldr-failure-diagnostics-unit-test-${{ inputs.runs-on }}-${{ github.run_attempt }}
94+
path: soldr-failure-diagnostics/**
95+
if-no-files-found: error
96+
6797
- name: Upload failure logs
6898
if: failure()
6999
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)