Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/config/sglang-ec2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ common:

# Release configuration
release:
release: false
release: true
force_release: false
public_registry: true
private_registry: true
Expand Down
2 changes: 1 addition & 1 deletion .github/config/sglang-sagemaker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ common:

# Release configuration
release:
release: false
release: true
force_release: false
public_registry: true
private_registry: true
Expand Down
63 changes: 47 additions & 16 deletions .github/workflows/pr-sglang-ec2.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
name: PR - SGLang EC2

on:
# Direct execution on pull requests
pull_request:
branches: [main]
types: [opened, reopened, synchronize]
paths:
- "**sglang**"
- "!docs/**"

# Allow calling as a reusable workflow
workflow_call:
inputs:
config-file:
description: 'Path to config file'
required: false
type: string
default: ".github/config/sglang-ec2.yml"
skip-gatekeeper:
description: 'Skip gatekeeper check (for auto-release)'
required: false
type: boolean
default: false
skip-change-detection:
description: 'Skip change detection (for auto-release)'
required: false
type: boolean
default: false
outputs:
ci-image:
description: 'Built CI image URI'
value: ${{ jobs.build-image.outputs.ci-image }}

permissions:
contents: read
pull-requests: read
Expand All @@ -17,14 +41,16 @@ env:
FORCE_COLOR: "1"
TEST_ARTIFACTS_DIRECTORY: "/test_artifacts/sglang"

# Config file path
CONFIG_FILE: ".github/config/sglang-ec2.yml"
# Config file path - use input if provided (workflow_call), otherwise use default
CONFIG_FILE: ${{ inputs.config-file || '.github/config/sglang-ec2.yml' }}

jobs:
gatekeeper:
# Skip gatekeeper when called from auto-release workflow
if: ${{ !inputs.skip-gatekeeper }}
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-gate-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-gate-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
steps:
- name: Checkout base branch (safe)
Expand All @@ -38,7 +64,8 @@ jobs:

load-config:
needs: [gatekeeper]
if: success()
# Run if gatekeeper succeeded OR was skipped
if: always() && (needs.gatekeeper.result == 'success' || needs.gatekeeper.result == 'skipped')
runs-on: ubuntu-latest
outputs:
framework: ${{ steps.parse.outputs.framework }}
Expand Down Expand Up @@ -80,10 +107,11 @@ jobs:

check-changes:
needs: [gatekeeper]
if: success()
# Skip change detection when called from auto-release workflow
if: ${{ !inputs.skip-change-detection && (needs.gatekeeper.result == 'success' || needs.gatekeeper.result == 'skipped') }}
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-check-changes-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-check-changes-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
outputs:
build-change: ${{ steps.changes.outputs.build-change }}
Expand Down Expand Up @@ -114,19 +142,22 @@ jobs:
- "scripts/telemetry/**"
- "test/security/**"
- ".github/workflows/pr-sglang-ec2.yml"
- ".github/config/sglang-ec2.yml"
test-change:
- "test/sanity/**"
- "test/sglang/**"


build-image:
needs: [check-changes, load-config]
if: needs.check-changes.outputs.build-change == 'true'
# Build if changes detected OR change detection was skipped (auto-release)
if: always() && !failure() && !cancelled() && (needs.check-changes.outputs.build-change == 'true' || needs.check-changes.result == 'skipped')
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-build-runner
buildspec-override:true
concurrency:
group: ${{ github.workflow }}-build-image-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-build-image-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
outputs:
ci-image: ${{ steps.build.outputs.image-uri }}
Expand Down Expand Up @@ -158,9 +189,9 @@ jobs:
needs: [check-changes, build-image, load-config]
if: |
always() && !failure() && !cancelled() &&
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true')
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true' || needs.check-changes.result == 'skipped')
concurrency:
group: ${{ github.workflow }}-sanity-test-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-sanity-test-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
uses: ./.github/workflows/reusable-sanity-tests.yml
with:
Expand All @@ -177,9 +208,9 @@ jobs:
needs: [check-changes, build-image, load-config]
if: |
always() && !failure() && !cancelled() &&
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true')
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true' || needs.check-changes.result == 'skipped')
concurrency:
group: ${{ github.workflow }}-security-test-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-security-test-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
uses: ./.github/workflows/reusable-security-tests.yml
with:
Expand All @@ -193,13 +224,13 @@ jobs:
needs: [check-changes, build-image, load-config]
if: |
always() && !failure() && !cancelled() &&
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true')
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true' || needs.check-changes.result == 'skipped')
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-g6xl-runner
buildspec-override:true
concurrency:
group: ${{ github.workflow }}-local-benchmark-test-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-local-benchmark-test-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
steps:
- name: Checkout DLC source
Expand Down Expand Up @@ -253,13 +284,13 @@ jobs:
needs: [check-changes, build-image, load-config]
if: |
always() && !failure() && !cancelled() &&
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true')
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true' || needs.check-changes.result == 'skipped')
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-g6exl-runner
buildspec-override:true
concurrency:
group: ${{ github.workflow }}-upstream-test-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-upstream-test-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
steps:
- name: Checkout DLC source
Expand Down
66 changes: 48 additions & 18 deletions .github/workflows/pr-sglang-sagemaker.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,37 @@
name: PR - SGLang SageMaker

on:
# Direct execution on pull requests
pull_request:
branches: [main]
types: [opened, reopened, synchronize]
paths:
- "**sglang**"
- "!docs/**"

# Allow calling as a reusable workflow
workflow_call:
inputs:
config-file:
description: 'Path to config file'
required: false
type: string
default: ".github/config/sglang-sagemaker.yml"
skip-gatekeeper:
description: 'Skip gatekeeper check (for auto-release)'
required: false
type: boolean
default: false
skip-change-detection:
description: 'Skip change detection (for auto-release)'
required: false
type: boolean
default: false
outputs:
ci-image:
description: 'Built CI image URI'
value: ${{ jobs.build-image.outputs.ci-image }}

permissions:
contents: read
pull-requests: read
Expand All @@ -17,14 +41,16 @@ env:
FORCE_COLOR: "1"
TEST_ARTIFACTS_DIRECTORY: "/test_artifacts/sglang"

# Config file path
CONFIG_FILE: ".github/config/sglang-sagemaker.yml"
# Config file path - use input if provided (workflow_call), otherwise use default
CONFIG_FILE: ${{ inputs.config-file || '.github/config/sglang-sagemaker.yml' }}

jobs:
gatekeeper:
# Skip gatekeeper when called from auto-release workflow
if: ${{ !inputs.skip-gatekeeper }}
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-gate-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-gate-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
steps:
- name: Checkout base branch (safe)
Expand All @@ -38,7 +64,8 @@ jobs:

load-config:
needs: [gatekeeper]
if: success()
# Run if gatekeeper succeeded OR was skipped
if: always() && (needs.gatekeeper.result == 'success' || needs.gatekeeper.result == 'skipped')
runs-on: ubuntu-latest
outputs:
framework: ${{ steps.parse.outputs.framework }}
Expand Down Expand Up @@ -80,10 +107,11 @@ jobs:

check-changes:
needs: [gatekeeper]
if: success()
# Skip change detection when called from auto-release workflow
if: ${{ !inputs.skip-change-detection && (needs.gatekeeper.result == 'success' || needs.gatekeeper.result == 'skipped') }}
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-check-changes-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-check-changes-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
outputs:
build-change: ${{ steps.changes.outputs.build-change }}
Expand Down Expand Up @@ -114,19 +142,21 @@ jobs:
- "scripts/telemetry/**"
- "test/security/**"
- ".github/workflows/pr-sglang-sagemaker.yml"
- ".github/config/sglang-sagemaker.yml"
test-change:
- "test/sanity/**"
- "test/sglang/**"

build-image:
needs: [check-changes, load-config]
if: needs.check-changes.outputs.build-change == 'true'
# Build if changes detected OR change detection was skipped (auto-release)
if: always() && !failure() && !cancelled() && (needs.check-changes.outputs.build-change == 'true' || needs.check-changes.result == 'skipped')
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-build-runner
buildspec-override:true
concurrency:
group: ${{ github.workflow }}-build-image-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-build-image-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
outputs:
ci-image: ${{ steps.build.outputs.image-uri }}
Expand Down Expand Up @@ -158,9 +188,9 @@ jobs:
needs: [check-changes, build-image, load-config]
if: |
always() && !failure() && !cancelled() &&
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true')
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true' || needs.check-changes.result == 'skipped')
concurrency:
group: ${{ github.workflow }}-sanity-test-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-sanity-test-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
uses: ./.github/workflows/reusable-sanity-tests.yml
with:
Expand All @@ -177,9 +207,9 @@ jobs:
needs: [check-changes, build-image, load-config]
if: |
always() && !failure() && !cancelled() &&
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true')
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true' || needs.check-changes.result == 'skipped')
concurrency:
group: ${{ github.workflow }}-security-test-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-security-test-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
uses: ./.github/workflows/reusable-security-tests.yml
with:
Expand All @@ -193,13 +223,13 @@ jobs:
needs: [check-changes, build-image, load-config]
if: |
always() && !failure() && !cancelled() &&
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true')
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true' || needs.check-changes.result == 'skipped')
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-g6xl-runner
buildspec-override:true
concurrency:
group: ${{ github.workflow }}-local-benchmark-test-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-local-benchmark-test-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
steps:
- name: Checkout DLC source
Expand Down Expand Up @@ -253,13 +283,13 @@ jobs:
needs: [check-changes, build-image, load-config]
if: |
always() && !failure() && !cancelled() &&
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true')
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true' || needs.check-changes.result == 'skipped')
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:x86-g6exl-runner
buildspec-override:true
concurrency:
group: ${{ github.workflow }}-upstream-test-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-upstream-test-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
steps:
- name: Checkout DLC source
Expand Down Expand Up @@ -315,13 +345,13 @@ jobs:
needs: [check-changes, build-image, load-config]
if: |
always() && !failure() && !cancelled() &&
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true')
(needs.check-changes.outputs.build-change == 'true' || needs.check-changes.outputs.test-change == 'true' || needs.check-changes.result == 'skipped')
runs-on:
- codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
fleet:default-runner
buildspec-override:true
concurrency:
group: ${{ github.workflow }}-endpoint-test-${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-endpoint-test-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: false
steps:
- name: Checkout DLC source
Expand Down
Loading