misc(ci): make the wf callable for reuse

This commit is contained in:
Morgan Funtowicz 2025-01-07 11:48:42 +01:00
parent 541618e44c
commit 50de9eda85
2 changed files with 60 additions and 39 deletions

View File

@ -1,24 +1,19 @@
name: Build TensorRT-LLM name: Build TensorRT-LLM
on: on:
push: workflow_call:
branches: inputs:
- 'main' runs-on:
- 'trtllm/ci' type: string
tags: description: "Which instance type to use to run the workflow"
- 'v*' required: true
pull_request:
paths: outputs:
- "backends/trtllm" docker_image:
- "server/**" description: "Reference to the Docker Image build by this workflow"
- "proto/**" value: ${{ jobs.build-and-push.outputs.docker_image }}
- "router/**" label:
- "launcher/**" description: "Label generated for this build"
- "Cargo.lock" value: ${{ jobs.build-and-push.outputs.label }}
- "rust-toolchain.toml"
- ".github/workflows/build_trtllm.yaml"
branches:
- "main"
permissions: permissions:
contents: read # Required to check out repository. contents: read # Required to check out repository.
@ -26,14 +21,13 @@ permissions:
jobs: jobs:
build-and-push: build-and-push:
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.run_id }}
outputs: outputs:
docker_image: ${{ steps.final.outputs.docker_image }} docker_image: ${{ steps.final.outputs.docker_image }}
label: ${ steps.final.outputs.label }} label: ${ steps.final.outputs.label }}
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-build-and-push-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
runs-on: runs-on:
group: aws-highmemory-64-plus-priv group: ${{ inputs.runs-on }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -134,21 +128,5 @@ jobs:
run: | run: |
echo "docker_image=registry.internal.huggingface.tech/api-inference/community/text-generation-inference/tensorrt-llm:sha-${{ env.GITHUB_SHA_SHORT }}${{ env.LABEL }}" >> "$GITHUB_OUTPUT" echo "docker_image=registry.internal.huggingface.tech/api-inference/community/text-generation-inference/tensorrt-llm:sha-${{ env.GITHUB_SHA_SHORT }}${{ env.LABEL }}" >> "$GITHUB_OUTPUT"
echo "label=${{ env.LABEL }}" >> "$GITHUB_OUTPUT" echo "label=${{ env.LABEL }}" >> "$GITHUB_OUTPUT"
tests:
needs: build-and-push
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-trtllm-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
runs-on:
group: aws-g6-12xl-plus-priv-cache
container:
image: ${{ needs.build-and-push.outputs.docker_image }}
credentials:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
options: --gpus all
steps:
- name: Run C++/CUDA tests
run: /usr/local/tgi/bin/tgi_trtllm_backend_tests

43
.github/workflows/trtllm_tests.yaml vendored Normal file
View File

@ -0,0 +1,43 @@
on:
push:
branches:
- 'main'
- 'trtllm/ci'
tags:
- 'v*'
pull_request:
paths:
- "backends/trtllm"
- "server/**"
- "proto/**"
- "router/**"
- "launcher/**"
- "Cargo.lock"
- "rust-toolchain.toml"
- ".github/workflows/build_trtllm.yaml"
- ".github/workflows/trtllm_tests.yaml"
branches:
- "main"
jobs:
build-and-push:
permissions:
contents: write
packages: write
uses: ./.github/workflows/build_trtllm.yaml
with:
runs-on: aws-highmemory-64-plus-priv
run-tests:
needs: build-and-push
runs-on:
container:
image: ${{ needs.build-and-push.outputs.docker_image }}
credentials:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
options: --gpus all
steps:
- name: Run C++/CUDA tests
run: /usr/local/tgi/bin/tgi_trtllm_backend_tests