|
1 | 1 | name: Build TensorRT-LLM |
2 | | - |
3 | 2 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - 'main' |
7 | | - - 'trtllm/ci' |
8 | | - tags: |
9 | | - - 'v*' |
10 | | - pull_request: |
11 | | - paths: |
12 | | - - "backends/trtllm" |
13 | | - - "server/**" |
14 | | - - "proto/**" |
15 | | - - "router/**" |
16 | | - - "launcher/**" |
17 | | - - "Cargo.lock" |
18 | | - - "rust-toolchain.toml" |
19 | | - - ".github/workflows/build_trtllm.yaml" |
20 | | - branches: |
21 | | - - "main" |
| 3 | + workflow_call: |
| 4 | + inputs: |
| 5 | + runs-on: |
| 6 | + type: string |
| 7 | + description: "Which instance type to use to run the workflow" |
| 8 | + required: true |
| 9 | + |
| 10 | + outputs: |
| 11 | + docker_image: |
| 12 | + description: "Reference to the Docker Image build by this workflow" |
| 13 | + value: ${{ jobs.build-and-push.outputs.docker_image }} |
| 14 | + label: |
| 15 | + description: "Label generated for this build" |
| 16 | + value: ${{ jobs.build-and-push.outputs.label }} |
22 | 17 |
|
23 | 18 | permissions: |
24 | 19 | contents: read # Required to check out repository. |
25 | 20 | id-token: write # Required to authenticate via OIDC. |
26 | 21 |
|
27 | 22 | jobs: |
28 | 23 | build-and-push: |
| 24 | + concurrency: |
| 25 | + group: ${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.run_id }} |
29 | 26 | outputs: |
30 | 27 | docker_image: ${{ steps.final.outputs.docker_image }} |
31 | 28 | label: ${ steps.final.outputs.label }} |
32 | | - concurrency: |
33 | | - group: ${{ github.workflow }}-${{ github.job }}-build-and-push-${{ github.head_ref || github.run_id }} |
34 | | - cancel-in-progress: true |
35 | 29 | runs-on: |
36 | | - group: aws-highmemory-64-plus-priv |
| 30 | + group: ${{ inputs.runs-on }} |
37 | 31 | steps: |
38 | 32 | - uses: actions/checkout@v4 |
39 | 33 |
|
@@ -134,21 +128,5 @@ jobs: |
134 | 128 | run: | |
135 | 129 | echo "docker_image=registry.internal.huggingface.tech/api-inference/community/text-generation-inference/tensorrt-llm:sha-${{ env.GITHUB_SHA_SHORT }}${{ env.LABEL }}" >> "$GITHUB_OUTPUT" |
136 | 130 | echo "label=${{ env.LABEL }}" >> "$GITHUB_OUTPUT" |
137 | | - tests: |
138 | | - needs: build-and-push |
139 | | - concurrency: |
140 | | - group: ${{ github.workflow }}-${{ github.job }}-trtllm-${{ github.head_ref || github.run_id }} |
141 | | - cancel-in-progress: true |
142 | | - runs-on: |
143 | | - group: aws-g6-12xl-plus-priv-cache |
144 | | - container: |
145 | | - image: ${{ needs.build-and-push.outputs.docker_image }} |
146 | | - credentials: |
147 | | - username: ${{ secrets.REGISTRY_USERNAME }} |
148 | | - password: ${{ secrets.REGISTRY_PASSWORD }} |
149 | | - options: --gpus all |
150 | 131 |
|
151 | | - steps: |
152 | | - - name: Run C++/CUDA tests |
153 | | - run: /usr/local/tgi/bin/tgi_trtllm_backend_tests |
154 | 132 |
|
0 commit comments