Skip to content

Commit 81828e7

Browse files
committed
misc(ci): make the wf callable for reuse
1 parent 63cee49 commit 81828e7

File tree

2 files changed

+60
-39
lines changed

2 files changed

+60
-39
lines changed

.github/workflows/build_trtllm.yaml

Lines changed: 17 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,33 @@
11
name: Build TensorRT-LLM
2-
32
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 }}
2217

2318
permissions:
2419
contents: read # Required to check out repository.
2520
id-token: write # Required to authenticate via OIDC.
2621

2722
jobs:
2823
build-and-push:
24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.run_id }}
2926
outputs:
3027
docker_image: ${{ steps.final.outputs.docker_image }}
3128
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
3529
runs-on:
36-
group: aws-highmemory-64-plus-priv
30+
group: ${{ inputs.runs-on }}
3731
steps:
3832
- uses: actions/checkout@v4
3933

@@ -134,21 +128,5 @@ jobs:
134128
run: |
135129
echo "docker_image=registry.internal.huggingface.tech/api-inference/community/text-generation-inference/tensorrt-llm:sha-${{ env.GITHUB_SHA_SHORT }}${{ env.LABEL }}" >> "$GITHUB_OUTPUT"
136130
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
150131
151-
steps:
152-
- name: Run C++/CUDA tests
153-
run: /usr/local/tgi/bin/tgi_trtllm_backend_tests
154132
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
on:
2+
push:
3+
branches:
4+
- 'main'
5+
- 'trtllm/ci'
6+
tags:
7+
- 'v*'
8+
pull_request:
9+
paths:
10+
- "backends/trtllm"
11+
- "server/**"
12+
- "proto/**"
13+
- "router/**"
14+
- "launcher/**"
15+
- "Cargo.lock"
16+
- "rust-toolchain.toml"
17+
- ".github/workflows/build_trtllm.yaml"
18+
- ".github/workflows/trtllm_tests.yaml"
19+
branches:
20+
- "main"
21+
22+
jobs:
23+
build-and-push:
24+
permissions:
25+
contents: write
26+
packages: write
27+
uses: ./.github/workflows/build_trtllm.yaml
28+
with:
29+
runs-on: aws-highmemory-64-plus-priv
30+
31+
run-tests:
32+
needs: build-and-push
33+
runs-on:
34+
container:
35+
image: ${{ needs.build-and-push.outputs.docker_image }}
36+
credentials:
37+
username: ${{ secrets.REGISTRY_USERNAME }}
38+
password: ${{ secrets.REGISTRY_PASSWORD }}
39+
options: --gpus all
40+
41+
steps:
42+
- name: Run C++/CUDA tests
43+
run: /usr/local/tgi/bin/tgi_trtllm_backend_tests

0 commit comments

Comments
 (0)