From 58f3f2b8405962ef9b64c34f58fb0ca8fd30ffc4 Mon Sep 17 00:00:00 2001 From: Ke Bao Date: Fri, 17 Jan 2025 01:26:51 +0800 Subject: [PATCH] Add CI for sgl-kernel (#2924) --- .github/workflows/pr-test-sgl-kernel.yml | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/pr-test-sgl-kernel.yml diff --git a/.github/workflows/pr-test-sgl-kernel.yml b/.github/workflows/pr-test-sgl-kernel.yml new file mode 100644 index 000000000..d5848d4e4 --- /dev/null +++ b/.github/workflows/pr-test-sgl-kernel.yml @@ -0,0 +1,46 @@ +name: PR Test (sgl-kernel) + +on: + push: + branches: [ main ] + paths: + - "sgl-kernel/**" + pull_request: + branches: [ main ] + paths: + - "sgl-kernel/**" + workflow_dispatch: + +concurrency: + group: pr-test-sgl-kernel-${{ github.ref }} + cancel-in-progress: true + +jobs: + unit-test: + if: github.repository == 'sgl-project/sglang' || github.event_name == 'pull_request' + runs-on: 1-gpu-runner + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: | + bash scripts/ci_install_dependency.sh + + cd sgl-kernel + git submodule update --init --recursive + pip3 install -e . --force-reinstall + pip3 list | grep sgl-kernel + + - name: Run test + timeout-minutes: 10 + run: | + cd sgl-kernel + find tests -name "test_*.py" | xargs -n 1 python3 + + finish: + needs: [unit-test] + runs-on: ubuntu-latest + steps: + - name: Finish + run: echo "This is an empty step to ensure that all jobs are completed."