Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
29 changes: 29 additions & 0 deletions .github/scripts/check_signal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

set -e

ARTIFACT_NAME="checks-signal-${GITHUB_SHA:-${1}}"
MAX_RETRIES=5

for i in $(seq 1 $MAX_RETRIES); do
echo "Attempt $i: Downloading artifact..."
if gh run download --name "$ARTIFACT_NAME"; then
if [ -f checks_signal.txt ]; then
echo "Artifact $ARTIFACT_NAME downloaded successfully."
SIGNAL=$(head -n 1 checks_signal.txt)
if [ "$SIGNAL" = "success" ]; then
echo "Pre-checks passed, continuing workflow."
exit 0
else
echo "Pre-checks failed, skipping workflow. Details:"
tail -n +2 checks_signal.txt
exit 78 # 78 = neutral/skip
fi
fi
fi
echo "Artifact not found, retrying in 30s..."
sleep 30
done

echo "Failed to download pre-checks artifact after $MAX_RETRIES attempts. Exiting workflow."
exit 1
14 changes: 14 additions & 0 deletions .github/workflows/aiter-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,22 @@ env:
DOCKER_IMAGE: "rocm/pytorch:latest"

jobs:
check-signal:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Retry download checks signal artifact
run: ./.github/scripts/check_signal.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SHA: ${{ github.sha }}

define-runners:
runs-on: ubuntu-latest
needs: [check-signal]
if: ${{ success() }}
Comment thread
gyohuangxin marked this conversation as resolved.
Outdated
outputs:
standard_runners: ${{ steps.machines.outputs.standard_runners }}
multigpu_runners: ${{ steps.machines.outputs.multigpu_runners }}
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/black.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/deps.yaml

This file was deleted.

89 changes: 89 additions & 0 deletions .github/workflows/pre-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Checks

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
check-ck:
name: Check Repository Dependency
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Verify 3rdparty commits
run: ./.github/scripts/check_deps.sh

black:
name: Check Code Style with Black
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Black
uses: psf/black@stable

ruff:
name: Check Code Style with Ruff
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: "3.12"
- name: Install dependencies
run: pip3 install ruff
- name: Install reviewdog
uses: reviewdog/action-setup@e04ffabe3898a0af8d0fb1af00c188831c4b5893
- name: Run ruff with reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ruff check . -e | reviewdog -efm="%f:%l:%c: %m" -diff="git diff FETCH_HEAD" -reporter=github-pr-check -tee

upload-success-artifact:
name: Upload Success Signal
runs-on: ubuntu-latest
needs: [check-ck, black, ruff]
if: ${{ success() }}
Comment thread
gyohuangxin marked this conversation as resolved.
Outdated
steps:
- name: Create success signal file
run: echo "success" > checks_signal.txt

- name: Upload success artifact
uses: actions/upload-artifact@v4
with:
name: checks-signal-${{ github.sha }}
path: checks_signal.txt

upload-failure-artifact:
name: Upload Failure Signal
runs-on: ubuntu-latest
needs: [check-ck, black, ruff]
if: ${{ failure() }}
Comment thread
gyohuangxin marked this conversation as resolved.
Outdated
steps:
- name: Create failure signal file with failed jobs
run: |
echo "failure" > checks_signal.txt
if [ "${{ needs.check-ck.result }}" != "success" ]; then
echo "FAILED: check-ck (${{ needs.check-ck.result }})" >> checks_signal.txt
fi
if [ "${{ needs.black.result }}" != "success" ]; then
echo "FAILED: black (${{ needs.black.result }})" >> checks_signal.txt
fi
if [ "${{ needs.ruff.result }}" != "success" ]; then
echo "FAILED: ruff (${{ needs.ruff.result }})" >> checks_signal.txt
fi

- name: Upload failure artifact
uses: actions/upload-artifact@v4
with:
name: checks-signal-${{ github.sha }}
path: checks_signal.txt
20 changes: 0 additions & 20 deletions .github/workflows/ruff.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/sglang_downstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,22 @@ concurrency:
cancel-in-progress: true

jobs:
check-signal:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Retry download checks signal artifact
run: ./.github/scripts/check_signal.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SHA: ${{ github.sha }}

sglang:
name: sglang integration
runs-on: aiter-mi325-1gpu
needs: [check-signal]
env:
SGL_BRANCH: v0.5.3
GPU_ARCH: gfx942
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/triton-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,21 @@ concurrency:
cancel-in-progress: true

jobs:
check-signal:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Retry download checks signal artifact
run: ./.github/scripts/check_signal.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SHA: ${{ github.sha }}

triton:
runs-on: aiter-1gpu-runner
needs: [check-signal]
env:
DOCKER_IMAGE: "rocm/pytorch:latest"
TRITON_TEST: "op_tests/triton_tests/"
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/vllm_benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,21 @@ env:
GITHUB_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.event.head_commit.id }}

jobs:
check-signal:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Retry download checks signal artifact
run: ./.github/scripts/check_signal.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SHA: ${{ github.sha }}

build_vllm_image:
if: ${{ !github.event.pull_request.head.repo.fork }}
needs: [check-signal]
runs-on: aiter-1gpu-runner

steps:
Expand Down
Loading