Skip to content

Commit 4c9edbf

Browse files
committed
ci(actions): add manual gpu branch e2e path
1 parent b8cfa9f commit 4c9edbf

File tree

3 files changed

+80
-86
lines changed

3 files changed

+80
-86
lines changed

.github/workflows/branch-e2e.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ name: Branch E2E Checks
33
on:
44
pull_request:
55
types: [opened, synchronize, reopened, labeled]
6+
workflow_dispatch:
7+
inputs:
8+
gpu-runner:
9+
description: GPU runner label to target
10+
required: true
11+
type: choice
12+
default: linux-arm64-gpu-l4-latest-1
13+
options:
14+
- linux-arm64-gpu-l4-latest-1
15+
- linux-amd64-gpu-rtxpro6000-latest-1
616

717
permissions:
818
contents: read
@@ -26,8 +36,34 @@ jobs:
2636
runner: build-arm64
2737

2838
e2e:
39+
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'test:e2e')
2940
needs: [build-gateway, build-cluster]
3041
uses: ./.github/workflows/e2e-test.yml
3142
with:
3243
image-tag: ${{ github.sha }}
3344
runner: build-arm64
45+
46+
build-gateway-gpu:
47+
if: github.event_name == 'workflow_dispatch'
48+
uses: ./.github/workflows/docker-build.yml
49+
with:
50+
component: gateway
51+
platform: ${{ inputs.gpu-runner == 'linux-arm64-gpu-l4-latest-1' && 'linux/arm64' || 'linux/amd64' }}
52+
runner: ${{ inputs.gpu-runner == 'linux-arm64-gpu-l4-latest-1' && 'build-arm64' || 'build-amd64' }}
53+
54+
build-cluster-gpu:
55+
if: github.event_name == 'workflow_dispatch'
56+
uses: ./.github/workflows/docker-build.yml
57+
with:
58+
component: cluster
59+
platform: ${{ inputs.gpu-runner == 'linux-arm64-gpu-l4-latest-1' && 'linux/arm64' || 'linux/amd64' }}
60+
runner: ${{ inputs.gpu-runner == 'linux-arm64-gpu-l4-latest-1' && 'build-arm64' || 'build-amd64' }}
61+
62+
e2e-gpu:
63+
if: github.event_name == 'workflow_dispatch'
64+
needs: [build-gateway-gpu, build-cluster-gpu]
65+
uses: ./.github/workflows/e2e-test.yml
66+
with:
67+
image-tag: ${{ github.sha }}
68+
runner: ${{ inputs.gpu-runner }}
69+
suite: python-gpu

.github/workflows/e2e-test.yml

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,29 @@
11
name: E2E Test
22

33
on:
4+
workflow_dispatch:
5+
inputs:
6+
image-tag:
7+
description: "Image tag to test (typically the commit SHA)"
8+
required: false
9+
type: string
10+
default: ""
11+
runner:
12+
description: "GitHub Actions runner label"
13+
required: false
14+
type: string
15+
default: "build-amd64"
16+
suite:
17+
description: "E2E suite to run"
18+
required: false
19+
type: choice
20+
default: all
21+
options:
22+
- all
23+
- python
24+
- rust
25+
- gateway-resume
26+
- python-gpu
427
workflow_call:
528
inputs:
629
image-tag:
@@ -12,6 +35,11 @@ on:
1235
required: false
1336
type: string
1437
default: "build-amd64"
38+
suite:
39+
description: "E2E suite to run"
40+
required: false
41+
type: string
42+
default: "all"
1543

1644
permissions:
1745
contents: read
@@ -20,6 +48,7 @@ permissions:
2048
jobs:
2149
e2e:
2250
name: "E2E (${{ matrix.suite }})"
51+
if: ${{ inputs.suite == 'all' || inputs.suite == matrix.suite }}
2352
runs-on: ${{ inputs.runner }}
2453
timeout-minutes: 30
2554
strategy:
@@ -29,15 +58,23 @@ jobs:
2958
- suite: python
3059
cluster: e2e-python
3160
port: "8080"
61+
cluster_gpu: "0"
3262
cmd: "mise run --no-prepare --skip-deps e2e:python"
3363
- suite: rust
3464
cluster: e2e-rust
3565
port: "8081"
66+
cluster_gpu: "0"
3667
cmd: "mise run --no-prepare --skip-deps e2e:rust"
3768
- suite: gateway-resume
3869
cluster: e2e-resume
3970
port: "8082"
71+
cluster_gpu: "0"
4072
cmd: "cargo test --manifest-path e2e/rust/Cargo.toml --features e2e --test gateway_resume"
73+
- suite: python-gpu
74+
cluster: e2e-gpu
75+
port: "8083"
76+
cluster_gpu: "1"
77+
cmd: "mise run --no-prepare --skip-deps e2e:python:gpu"
4178
container:
4279
image: ghcr.io/nvidia/openshell/ci:latest
4380
credentials:
@@ -48,7 +85,7 @@ jobs:
4885
- /var/run/docker.sock:/var/run/docker.sock
4986
env:
5087
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
IMAGE_TAG: ${{ inputs.image-tag }}
88+
IMAGE_TAG: ${{ inputs.image-tag || github.sha }}
5289
OPENSHELL_REGISTRY: ghcr.io/nvidia/openshell
5390
OPENSHELL_REGISTRY_HOST: ghcr.io
5491
OPENSHELL_REGISTRY_NAMESPACE: nvidia/openshell
@@ -62,28 +99,29 @@ jobs:
6299
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
63100

64101
- name: Pull cluster image
65-
run: docker pull ghcr.io/nvidia/openshell/cluster:${{ inputs.image-tag }}
102+
run: docker pull ghcr.io/nvidia/openshell/cluster:${{ inputs.image-tag || github.sha }}
66103

67104
- name: Install Python dependencies and generate protobuf stubs
68-
if: matrix.suite == 'python'
105+
if: matrix.suite == 'python' || matrix.suite == 'python-gpu'
69106
run: uv sync --frozen && mise run --no-prepare python:proto
70107

71108
- name: Build Rust CLI
72-
if: matrix.suite != 'python'
109+
if: matrix.suite == 'rust' || matrix.suite == 'gateway-resume'
73110
run: cargo build -p openshell-cli --features openshell-core/dev-settings
74111

75112
- name: Install SSH client
76-
if: matrix.suite != 'python'
113+
if: matrix.suite == 'rust' || matrix.suite == 'gateway-resume'
77114
run: apt-get update && apt-get install -y --no-install-recommends openssh-client && rm -rf /var/lib/apt/lists/*
78115

79116
- name: Bootstrap cluster
80117
env:
81118
GATEWAY_HOST: host.docker.internal
82119
GATEWAY_PORT: ${{ matrix.port }}
83120
CLUSTER_NAME: ${{ matrix.cluster }}
121+
CLUSTER_GPU: ${{ matrix.cluster_gpu }}
84122
SKIP_IMAGE_PUSH: "1"
85123
SKIP_CLUSTER_IMAGE_BUILD: "1"
86-
OPENSHELL_CLUSTER_IMAGE: ghcr.io/nvidia/openshell/cluster:${{ inputs.image-tag }}
124+
OPENSHELL_CLUSTER_IMAGE: ghcr.io/nvidia/openshell/cluster:${{ inputs.image-tag || github.sha }}
87125
run: mise run --no-prepare --skip-deps cluster
88126

89127
- name: Run tests

.github/workflows/gpu-e2e.yml

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)