mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-27 07:03:17 +08:00
ci: speed up E2E pipeline by running on arm64 runners and skipping redundant cluster rebuild
This commit is contained in:
@@ -17,6 +17,16 @@ on:
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
platform:
|
||||
description: "Target platform(s) for Docker build"
|
||||
required: false
|
||||
type: string
|
||||
default: "linux/amd64,linux/arm64"
|
||||
runner:
|
||||
description: "GitHub Actions runner label"
|
||||
required: false
|
||||
type: string
|
||||
default: "build-amd64"
|
||||
|
||||
env:
|
||||
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -29,7 +39,7 @@ permissions:
|
||||
jobs:
|
||||
build:
|
||||
name: Build ${{ inputs.component }}
|
||||
runs-on: build-amd64
|
||||
runs-on: ${{ inputs.runner }}
|
||||
timeout-minutes: ${{ inputs.timeout-minutes }}
|
||||
container:
|
||||
image: ghcr.io/nvidia/openshell/ci:latest
|
||||
@@ -43,7 +53,7 @@ jobs:
|
||||
IMAGE_TAG: ${{ github.sha }}
|
||||
IMAGE_REGISTRY: ghcr.io/nvidia/openshell
|
||||
DOCKER_PUSH: ${{ inputs.push && '1' || '0' }}
|
||||
DOCKER_PLATFORM: linux/amd64,linux/arm64
|
||||
DOCKER_PLATFORM: ${{ inputs.platform }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
||||
@@ -7,6 +7,11 @@ on:
|
||||
description: "Image tag to test (typically the commit SHA)"
|
||||
required: true
|
||||
type: string
|
||||
runner:
|
||||
description: "GitHub Actions runner label"
|
||||
required: false
|
||||
type: string
|
||||
default: "build-amd64"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -15,7 +20,7 @@ permissions:
|
||||
jobs:
|
||||
e2e:
|
||||
name: E2E
|
||||
runs-on: build-amd64
|
||||
runs-on: ${{ inputs.runner }}
|
||||
timeout-minutes: 30
|
||||
container:
|
||||
image: ghcr.io/nvidia/openshell/ci:latest
|
||||
@@ -50,6 +55,7 @@ jobs:
|
||||
GATEWAY_HOST: host.docker.internal
|
||||
GATEWAY_PORT: "8080"
|
||||
SKIP_IMAGE_PUSH: "1"
|
||||
SKIP_CLUSTER_IMAGE_BUILD: "1"
|
||||
OPENSHELL_CLUSTER_IMAGE: ghcr.io/nvidia/openshell/cluster:${{ inputs.image-tag }}
|
||||
run: mise run --no-prepare --skip-deps cluster
|
||||
|
||||
|
||||
@@ -14,15 +14,20 @@ jobs:
|
||||
uses: ./.github/workflows/docker-build.yml
|
||||
with:
|
||||
component: gateway
|
||||
platform: linux/arm64
|
||||
runner: build-arm64
|
||||
|
||||
build-cluster:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'e2e')
|
||||
uses: ./.github/workflows/docker-build.yml
|
||||
with:
|
||||
component: cluster
|
||||
platform: linux/arm64
|
||||
runner: build-arm64
|
||||
|
||||
e2e:
|
||||
needs: [build-gateway, build-cluster]
|
||||
uses: ./.github/workflows/e2e-test.yml
|
||||
with:
|
||||
image-tag: ${{ github.sha }}
|
||||
runner: build-arm64
|
||||
|
||||
Reference in New Issue
Block a user