Skip to content

Commit 9d4f6e5

Browse files
matthewgrossmanelezar
authored andcommitted
ci(e2e): build openshell-conformance once per architecture in Branch E2E
Each Docker, Podman, VM and Kubernetes host lane built the conformance suite itself. Branch E2E now builds openshell-conformance once per architecture as a static musl binary, checks that it is static and lists its tests, and uploads it. setup-e2e-cli downloads the one that matches the runner when a lane sets prebuilt-conformance, and the lane runs it through OPENSHELL_CONFORMANCE_BIN. The job is separate from build-binaries.yml, which the release workflows also call: the program has its own workspace and is not released. Lanes called without prebuilt-conformance, such as the release qualification lanes, still build the program from the checkout. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
1 parent 12238f7 commit 9d4f6e5

7 files changed

Lines changed: 134 additions & 16 deletions

File tree

‎.github/actions/setup-e2e-cli/action.yml‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Setup E2E CLI
22
description: Download architecture-matched prebuilt OpenShell host CLIs for E2E tests
33

4+
inputs:
5+
conformance:
6+
description: Also download the prebuilt openshell-conformance program and set OPENSHELL_CONFORMANCE_BIN
7+
required: false
8+
default: "false"
9+
410
runs:
511
using: composite
612
steps:
@@ -17,3 +23,19 @@ runs:
1723
chmod +x "$cli"
1824
"$cli" --version
1925
echo "OPENSHELL_BIN=$cli" >> "$GITHUB_ENV"
26+
27+
- name: Download prebuilt openshell-conformance
28+
if: inputs.conformance == 'true'
29+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
30+
with:
31+
name: ${{ runner.arch == 'X64' && 'openshell-conformance-x86_64-unknown-linux-musl' || 'openshell-conformance-aarch64-unknown-linux-musl' }}
32+
path: .e2e/prebuilt-conformance
33+
34+
- name: Configure prebuilt openshell-conformance
35+
if: inputs.conformance == 'true'
36+
shell: bash
37+
run: | # zizmor: ignore[github-env] persists only a fixed path under the trusted workspace
38+
program="$GITHUB_WORKSPACE/.e2e/prebuilt-conformance/openshell-conformance"
39+
chmod +x "$program"
40+
"$program" list
41+
echo "OPENSHELL_CONFORMANCE_BIN=$program" >> "$GITHUB_ENV"

‎.github/workflows/branch-e2e.yml‎

Lines changed: 85 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,60 @@ jobs:
144144
cargo-version: ${{ needs.version.outputs.cargo }}
145145
extra-cargo-flags: --no-default-features
146146

147+
# The conformance program, built once per architecture for the host lanes.
148+
# It lives in its own workspace and is not released, so it is not part of
149+
# build-binaries.yml.
150+
build-conformance:
151+
name: openshell-conformance (${{ matrix.triple }})
152+
needs: [pr_metadata]
153+
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_any_e2e == 'true'
154+
permissions:
155+
contents: read
156+
strategy:
157+
matrix:
158+
include:
159+
- triple: x86_64-unknown-linux-musl
160+
runner: linux-amd64-cpu8
161+
- triple: aarch64-unknown-linux-musl
162+
runner: linux-arm64-cpu8
163+
runs-on: ${{ matrix.runner }}
164+
timeout-minutes: 60
165+
steps:
166+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
167+
with:
168+
persist-credentials: false
169+
ref: ${{ github.sha }}
170+
- uses: ./.github/actions/setup-nix
171+
with:
172+
prepare-shell: "true"
173+
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
174+
- uses: ./.github/actions/setup-rust
175+
with:
176+
cache-key: binaries-v2-openshell-conformance-${{ matrix.triple }}
177+
save-cache: ${{ github.ref == 'refs/heads/main' }}
178+
- name: Build openshell-conformance
179+
shell: nix develop -c bash -euo pipefail {0}
180+
env:
181+
# Build into the root target directory, which setup-rust caches.
182+
CARGO_TARGET_DIR: ${{ github.workspace }}/target
183+
TRIPLE: ${{ matrix.triple }}
184+
run: |
185+
cargo build --release --locked --target "$TRIPLE" \
186+
--manifest-path tests/suites/conformance/Cargo.toml \
187+
--bin openshell-conformance
188+
binary="target/$TRIPLE/release/openshell-conformance"
189+
# The program must run on any lane host.
190+
tasks/scripts/verify-static-binary.sh "$binary"
191+
# Fails if the program has no tests linked.
192+
"$binary" list
193+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
194+
with:
195+
name: openshell-conformance-${{ matrix.triple }}
196+
path: target/${{ matrix.triple }}/release/openshell-conformance
197+
compression-level: 0
198+
retention-days: 5
199+
if-no-files-found: error
200+
147201
build-external-drivers:
148202
name: ${{ matrix.binary }} (${{ matrix.triple }})
149203
needs: [pr_metadata, version]
@@ -306,73 +360,80 @@ jobs:
306360
]
307361
308362
docker-e2e:
309-
needs: [pr_metadata, build-binaries, build-images]
363+
needs: [pr_metadata, build-binaries, build-conformance, build-images]
310364
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
311365
permissions:
312366
actions: read
313367
contents: read
314368
packages: read
315369
uses: ./.github/workflows/e2e-docker-test.yml
316370
with:
371+
prebuilt-conformance: true
317372
image-tag: ${{ github.sha }}
318373
runner: linux-arm64-cpu8
319374

320375
podman-e2e:
321-
needs: [pr_metadata, build-binaries, build-images]
376+
needs: [pr_metadata, build-binaries, build-conformance, build-images]
322377
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
323378
permissions:
324379
actions: read
325380
contents: read
326381
packages: read
327382
uses: ./.github/workflows/e2e-podman-test.yml
328383
with:
384+
prebuilt-conformance: true
329385
image-tag: ${{ github.sha }}
330386
suite-matrix: >-
331387
[{"suite":"ci","runner":"ubuntu-26.04","podman_major":"5","podman_package_version":"5.7.0+ds2-3build1","conmon_package_version":"2.1.13+ds1-2","cmd":"mise run --no-deps --skip-deps e2e:podman:ci"}]
332388
333389
podman-additional-ca-e2e:
334-
needs: [pr_metadata, build-binaries, build-images]
390+
needs: [pr_metadata, build-binaries, build-conformance, build-images]
335391
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
336392
permissions:
337393
actions: read
338394
contents: read
339395
packages: read
340396
uses: ./.github/workflows/e2e-podman-test.yml
341397
with:
398+
prebuilt-conformance: true
342399
image-tag: ${{ github.sha }}
343400
suite-matrix: >-
344401
[{"suite":"additional-ca","runner":"ubuntu-26.04","podman_major":"5","podman_package_version":"5.7.0+ds2-3build1","conmon_package_version":"2.1.13+ds1-2","cmd":"OPENSHELL_E2E_PODMAN_TEST=additional_ca mise run --no-deps --skip-deps e2e:podman"}]
345402
346403
vm-e2e:
347-
needs: [pr_metadata, build-binaries, build-vm-driver]
404+
needs: [pr_metadata, build-binaries, build-conformance, build-vm-driver]
348405
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
349406
permissions:
350407
actions: read
351408
contents: read
352409
packages: read
353410
uses: ./.github/workflows/e2e-vm-test.yml
411+
with:
412+
prebuilt-conformance: true
354413

355414
vm-additional-ca-e2e:
356-
needs: [pr_metadata, build-binaries, build-vm-driver]
415+
needs: [pr_metadata, build-binaries, build-conformance, build-vm-driver]
357416
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
358417
permissions:
359418
actions: read
360419
contents: read
361420
packages: read
362421
uses: ./.github/workflows/e2e-vm-test.yml
363422
with:
423+
prebuilt-conformance: true
364424
suite-name: additional-ca
365425
test-name: additional_ca
366426

367427
docker-external-driver-e2e:
368-
needs: [pr_metadata, build-binaries, build-gateway-plain, build-external-drivers, build-images]
428+
needs: [pr_metadata, build-binaries, build-conformance, build-gateway-plain, build-external-drivers, build-images]
369429
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
370430
permissions:
371431
actions: read
372432
contents: read
373433
packages: read
374434
uses: ./.github/workflows/e2e-docker-test.yml
375435
with:
436+
prebuilt-conformance: true
376437
image-tag: ${{ github.sha }}
377438
runner: linux-arm64-cpu8
378439
gateway-artifact: openshell-gateway-plain-aarch64-unknown-linux-gnu
@@ -381,29 +442,31 @@ jobs:
381442
[{"suite":"external-driver","cmd":"mise run --no-deps --skip-deps e2e:docker:external-driver","apt_packages":"openssh-client","python_proto":false,"mcp":false}]
382443
383444
podman-external-driver-e2e:
384-
needs: [pr_metadata, build-binaries, build-gateway-plain, build-external-drivers, build-images]
445+
needs: [pr_metadata, build-binaries, build-conformance, build-gateway-plain, build-external-drivers, build-images]
385446
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
386447
permissions:
387448
actions: read
388449
contents: read
389450
packages: read
390451
uses: ./.github/workflows/e2e-podman-test.yml
391452
with:
453+
prebuilt-conformance: true
392454
image-tag: ${{ github.sha }}
393455
gateway-artifact: openshell-gateway-plain-x86_64-unknown-linux-gnu
394456
external-driver-binary: openshell-driver-podman
395457
suite-matrix: >-
396458
[{"suite":"external-driver","runner":"ubuntu-26.04","podman_major":"5","podman_package_version":"5.7.0+ds2-3build1","conmon_package_version":"2.1.13+ds1-2","cmd":"mise run --no-deps --skip-deps e2e:podman:external-driver"}]
397459
398460
vm-external-driver-e2e:
399-
needs: [pr_metadata, build-binaries, build-gateway-plain, build-vm-driver]
461+
needs: [pr_metadata, build-binaries, build-conformance, build-gateway-plain, build-vm-driver]
400462
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
401463
permissions:
402464
actions: read
403465
contents: read
404466
packages: read
405467
uses: ./.github/workflows/e2e-vm-test.yml
406468
with:
469+
prebuilt-conformance: true
407470
gateway-artifact: openshell-gateway-plain-x86_64-unknown-linux-gnu
408471
suite-name: external-driver
409472
e2e-task: e2e:vm:external-driver
@@ -420,7 +483,7 @@ jobs:
420483
image-tag: ${{ github.sha }}
421484

422485
kubernetes-e2e:
423-
needs: [pr_metadata, build-binaries, build-images]
486+
needs: [pr_metadata, build-binaries, build-conformance, build-images]
424487
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
425488
strategy:
426489
fail-fast: false
@@ -444,13 +507,14 @@ jobs:
444507
packages: read
445508
uses: ./.github/workflows/e2e-kubernetes-test.yml
446509
with:
510+
prebuilt-conformance: true
447511
image-tag: ${{ github.sha }}
448512
job-name: ${{ matrix.job_name }}
449513
agent-sandbox-version: ${{ matrix.agent_sandbox_version }}
450514
test-name: ${{ matrix.test_name }}
451515

452516
kubernetes-app-listener-e2e:
453-
needs: [pr_metadata, build-binaries, build-images]
517+
needs: [pr_metadata, build-binaries, build-conformance, build-images]
454518
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
455519
strategy:
456520
fail-fast: false
@@ -478,6 +542,7 @@ jobs:
478542
packages: read
479543
uses: ./.github/workflows/e2e-kubernetes-test.yml
480544
with:
545+
prebuilt-conformance: true
481546
image-tag: ${{ github.sha }}
482547
job-name: Kubernetes app listener (${{ matrix.name }})
483548
e2e-task: e2e:kubernetes:app-listener
@@ -487,27 +552,29 @@ jobs:
487552
listener-takeover: ${{ matrix.takeover }}
488553

489554
kubernetes-workspace-managed-e2e:
490-
needs: [pr_metadata, build-binaries, build-images]
555+
needs: [pr_metadata, build-binaries, build-conformance, build-images]
491556
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
492557
permissions:
493558
actions: read
494559
contents: read
495560
packages: read
496561
uses: ./.github/workflows/e2e-kubernetes-test.yml
497562
with:
563+
prebuilt-conformance: true
498564
image-tag: ${{ github.sha }}
499565
job-name: Kubernetes E2E (workspace managed mode)
500566
e2e-task: e2e:kubernetes:workspace-managed
501567

502568
kubernetes-external-driver-e2e:
503-
needs: [pr_metadata, build-binaries, build-gateway-plain, build-external-drivers, build-images]
569+
needs: [pr_metadata, build-binaries, build-conformance, build-gateway-plain, build-external-drivers, build-images]
504570
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
505571
permissions:
506572
actions: read
507573
contents: read
508574
packages: read
509575
uses: ./.github/workflows/e2e-kubernetes-test.yml
510576
with:
577+
prebuilt-conformance: true
511578
image-tag: ${{ github.sha }}
512579
job-name: Kubernetes E2E (external compute driver)
513580
e2e-task: e2e:kubernetes:external-driver
@@ -516,27 +583,29 @@ jobs:
516583
cluster-images: sandbox supervisor
517584

518585
kubernetes-workspace-operator-e2e:
519-
needs: [pr_metadata, build-binaries, build-images]
586+
needs: [pr_metadata, build-binaries, build-conformance, build-images]
520587
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_core_e2e == 'true'
521588
permissions:
522589
actions: read
523590
contents: read
524591
packages: read
525592
uses: ./.github/workflows/e2e-kubernetes-test.yml
526593
with:
594+
prebuilt-conformance: true
527595
image-tag: ${{ github.sha }}
528596
job-name: Kubernetes E2E (workspace operator mode)
529597
e2e-task: e2e:kubernetes:workspace-operator
530598

531599
kubernetes-ha-e2e:
532-
needs: [pr_metadata, build-binaries, build-images]
600+
needs: [pr_metadata, build-binaries, build-conformance, build-images]
533601
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_kubernetes_ha_e2e == 'true'
534602
permissions:
535603
actions: read
536604
contents: read
537605
packages: read
538606
uses: ./.github/workflows/e2e-kubernetes-test.yml
539607
with:
608+
prebuilt-conformance: true
540609
image-tag: ${{ github.sha }}
541610
job-name: Kubernetes HA E2E (Rust smoke)
542611
extra-helm-values: deploy/helm/openshell/ci/values-high-availability.yaml
@@ -546,14 +615,15 @@ jobs:
546615
use-envoy-gateway: true
547616

548617
kubernetes-credential-drivers-e2e:
549-
needs: [pr_metadata, build-binaries, build-images]
618+
needs: [pr_metadata, build-binaries, build-conformance, build-images]
550619
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_kubernetes_credential_drivers_e2e == 'true'
551620
permissions:
552621
actions: read
553622
contents: read
554623
packages: read
555624
uses: ./.github/workflows/e2e-kubernetes-test.yml
556625
with:
626+
prebuilt-conformance: true
557627
image-tag: ${{ github.sha }}
558628
job-name: Kubernetes Credential Drivers E2E
559629
e2e-task: e2e:kubernetes:credential-drivers

‎.github/workflows/e2e-docker-test.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ on:
2121
required: false
2222
type: string
2323
default: ""
24+
prebuilt-conformance:
25+
required: false
26+
type: boolean
27+
default: false
2428
external-driver-binary:
2529
required: false
2630
type: string
@@ -67,6 +71,8 @@ jobs:
6771
persist-credentials: false
6872

6973
- uses: ./.github/actions/setup-e2e-cli
74+
with:
75+
conformance: ${{ inputs.prebuilt-conformance }}
7076

7177
- uses: ./.github/actions/setup-e2e-gateway
7278
with:

‎.github/workflows/e2e-kubernetes-test.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ on:
6767
required: false
6868
type: string
6969
default: ""
70+
prebuilt-conformance:
71+
description: "Run conformance with the openshell-conformance artifact instead of building it"
72+
required: false
73+
type: boolean
74+
default: false
7075
external-driver-binary:
7176
description: "Optional standalone compute driver binary used to compose a local test image"
7277
required: false
@@ -124,6 +129,8 @@ jobs:
124129

125130
- name: Use prebuilt OpenShell CLI
126131
uses: ./.github/actions/setup-e2e-cli
132+
with:
133+
conformance: ${{ inputs.prebuilt-conformance }}
127134

128135
- name: Use prebuilt OpenShell gateway
129136
if: inputs.gateway-artifact != ''

‎.github/workflows/e2e-podman-test.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ on:
1717
required: false
1818
type: string
1919
default: ""
20+
prebuilt-conformance:
21+
required: false
22+
type: boolean
23+
default: false
2024
external-driver-binary:
2125
required: false
2226
type: string
@@ -52,6 +56,8 @@ jobs:
5256
persist-credentials: false
5357

5458
- uses: ./.github/actions/setup-e2e-cli
59+
with:
60+
conformance: ${{ inputs.prebuilt-conformance }}
5561

5662
- uses: ./.github/actions/setup-e2e-gateway
5763
with:

0 commit comments

Comments
 (0)