Skip to content

Commit 3e294ed

Browse files
authored
ci: migrate 15 of 20 ci.yml jobs to smithy self-hosted runners (#98)
rust-cpu coverage, multi-version-testing, validate-framework-fast, stdio-integration-tests, python-sdk-compatibility, external-validator-integration, benchmark-validation, validate-release, quick-validation, validation-specific-tests, compatibility-check, validate-external-servers light changes, pr-report, update-compatibility-matrix Stays on ubuntu-latest: - build-validation-image docker buildx + GHCR push, podman-docker shim untested - validate-in-container pulls + runs container image - validate-framework matrix spans macOS + Windows - security-validation cargo audit; smithy's pinned cargo-audit (0.21.x) rejects CVSS 4.0 - cross-platform-validation matrix spans macOS + Windows Workaround applied: Two jobs (quick-validation, coverage) had a "Free up disk space" step that runs `sudo rm -rf` on hosted-only paths (/usr/share/dotnet, etc.). Smithy redirects TMPDIR to a 500 G volume so the cleanup is unnecessary and would fail (no sudo). Gated with `if: runner.environment == 'github-hosted'` so the step still runs when CI falls back to hosted.
1 parent 6b30f56 commit 3e294ed

6 files changed

Lines changed: 25 additions & 15 deletions

File tree

.github/workflows/code-coverage.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ env:
2323
jobs:
2424
coverage:
2525
name: Code Coverage
26-
runs-on: ubuntu-latest
26+
runs-on: [self-hosted, linux, x64, rust-cpu]
2727
permissions:
2828
contents: read
2929
pull-requests: write
@@ -49,6 +49,8 @@ jobs:
4949
uses: taiki-e/install-action@cargo-llvm-cov
5050

5151
- name: Free up disk space
52+
# Only needed on github-hosted; smithy redirects TMPDIR to a 500G volume.
53+
if: runner.environment == 'github-hosted'
5254
run: |
5355
# Remove unnecessary tools and files to free up ~10GB
5456
sudo rm -rf /usr/share/dotnet

.github/workflows/docker-validation.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ env:
1414
jobs:
1515
build-validation-image:
1616
name: Build Validation Docker Image
17+
# Stays on ubuntu-latest: docker buildx + GHCR push; smithy's podman-docker shim is untested for this.
1718
runs-on: ubuntu-latest
1819
permissions:
1920
contents: read
@@ -68,6 +69,7 @@ jobs:
6869
validate-in-container:
6970
name: Run Validation in Container
7071
needs: build-validation-image
72+
# Stays on ubuntu-latest: pulls + runs a container image; smithy podman-docker shim is untested.
7173
runs-on: ubuntu-latest
7274
if: success()
7375

@@ -102,7 +104,7 @@ jobs:
102104
103105
multi-version-testing:
104106
name: Multi-Version Protocol Testing
105-
runs-on: ubuntu-latest
107+
runs-on: [self-hosted, linux, x64, rust-cpu]
106108
strategy:
107109
matrix:
108110
protocol_version: ["2024-11-05", "2025-03-26"]

.github/workflows/external-validation.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
# Fast validation for PRs - Ubuntu only
3434
validate-framework-fast:
3535
name: Fast Framework Validation
36-
runs-on: ubuntu-latest
36+
runs-on: [self-hosted, linux, x64, rust-cpu]
3737
timeout-minutes: 25
3838
if: github.event_name == 'pull_request'
3939

@@ -86,6 +86,7 @@ jobs:
8686
# Full cross-platform validation for main branch and scheduled runs
8787
validate-framework:
8888
name: Full Framework Validation
89+
# Stays on ubuntu-latest/macos-latest/windows-latest: matrix spans macOS + Windows; smithy is Linux-only.
8990
runs-on: ${{ matrix.os }}
9091
timeout-minutes: 35
9192
if: github.event_name != 'pull_request'
@@ -270,7 +271,7 @@ jobs:
270271

271272
stdio-integration-tests:
272273
name: Stdio + Inspector Integration Tests
273-
runs-on: ubuntu-latest
274+
runs-on: [self-hosted, linux, x64, rust-cpu]
274275
timeout-minutes: 20
275276
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
276277

@@ -354,7 +355,7 @@ jobs:
354355

355356
python-sdk-compatibility:
356357
name: Python SDK Compatibility
357-
runs-on: ubuntu-latest
358+
runs-on: [self-hosted, linux, x64, rust-cpu]
358359
timeout-minutes: 15
359360
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main'
360361

@@ -392,7 +393,7 @@ jobs:
392393
393394
external-validator-integration:
394395
name: External Validator Integration
395-
runs-on: ubuntu-latest
396+
runs-on: [self-hosted, linux, x64, rust-cpu]
396397
timeout-minutes: 20
397398
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
398399

@@ -432,6 +433,8 @@ jobs:
432433

433434
security-validation:
434435
name: Security Validation
436+
# Stays on ubuntu-latest: runs cargo audit; smithy's pinned cargo-audit (0.21.x) rejects CVSS 4.0
437+
# advisories (e.g. RUSTSEC-2026-0037). Move once smithy bumps cargo-audit to >=0.22.1.
435438
runs-on: ubuntu-latest
436439
timeout-minutes: 15
437440
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main'
@@ -461,7 +464,7 @@ jobs:
461464
462465
benchmark-validation:
463466
name: Performance Benchmarks
464-
runs-on: ubuntu-latest
467+
runs-on: [self-hosted, linux, x64, rust-cpu]
465468
timeout-minutes: 25
466469
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
467470

.github/workflows/pr-validation.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
jobs:
2222
changes:
2323
name: Detect Changes
24-
runs-on: ubuntu-latest
24+
runs-on: [self-hosted, linux, x64, light]
2525
outputs:
2626
validation: ${{ steps.filter.outputs.validation }}
2727
core: ${{ steps.filter.outputs.core }}
@@ -40,7 +40,7 @@ jobs:
4040
4141
quick-validation:
4242
name: Quick PR Validation
43-
runs-on: ubuntu-latest
43+
runs-on: [self-hosted, linux, x64, rust-cpu]
4444
needs: changes
4545

4646
steps:
@@ -62,6 +62,8 @@ jobs:
6262
echo "Rustfmt version: $(cargo fmt --version)"
6363
6464
- name: Free up disk space
65+
# Only needed on github-hosted; smithy redirects TMPDIR to a 500G volume.
66+
if: runner.environment == 'github-hosted'
6567
run: |
6668
# Remove unnecessary tools and files to free up ~10GB
6769
sudo rm -rf /usr/share/dotnet
@@ -142,7 +144,7 @@ jobs:
142144
143145
validation-specific-tests:
144146
name: Validation Framework Tests
145-
runs-on: ubuntu-latest
147+
runs-on: [self-hosted, linux, x64, rust-cpu]
146148
needs: changes
147149
if: needs.changes.outputs.validation == 'true'
148150

@@ -180,7 +182,7 @@ jobs:
180182
181183
compatibility-check:
182184
name: Compatibility Check
183-
runs-on: ubuntu-latest
185+
runs-on: [self-hosted, linux, x64, rust-cpu]
184186
needs: changes
185187
if: needs.changes.outputs.core == 'true'
186188

@@ -205,7 +207,7 @@ jobs:
205207

206208
pr-report:
207209
name: Generate PR Report
208-
runs-on: ubuntu-latest
210+
runs-on: [self-hosted, linux, x64, light]
209211
needs: [quick-validation, validation-specific-tests, compatibility-check]
210212
if: always()
211213

.github/workflows/release-validation.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ permissions:
2020
jobs:
2121
validate-release:
2222
name: Validate Release
23-
runs-on: ubuntu-latest
23+
runs-on: [self-hosted, linux, x64, rust-cpu]
2424

2525
steps:
2626
- name: Checkout code
@@ -118,6 +118,7 @@ jobs:
118118
119119
cross-platform-validation:
120120
name: Cross-Platform Release Validation
121+
# Stays on ubuntu-latest/macos-latest/windows-latest: matrix spans macOS + Windows; smithy is Linux-only.
121122
runs-on: ${{ matrix.os }}
122123
strategy:
123124
matrix:

.github/workflows/scheduled-validation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ permissions:
2626
jobs:
2727
validate-external-servers:
2828
name: Validate External MCP Servers
29-
runs-on: ubuntu-latest
29+
runs-on: [self-hosted, linux, x64, rust-cpu]
3030

3131
steps:
3232
- name: Checkout code
@@ -148,7 +148,7 @@ jobs:
148148
149149
update-compatibility-matrix:
150150
name: Update Compatibility Matrix
151-
runs-on: ubuntu-latest
151+
runs-on: [self-hosted, linux, x64, light]
152152
needs: validate-external-servers
153153

154154
steps:

0 commit comments

Comments
 (0)