forked from NVIDIA/TensorRT-LLM
-
Notifications
You must be signed in to change notification settings - Fork 2
135 lines (119 loc) · 4.64 KB
/
quality-gate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: CI Quality Gate
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
jobs:
build-and-test:
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 1440
strategy:
matrix:
include:
- os: "windows"
name: "cuda-12-2"
runs-on: "windows-tensorrt-llm-cuda-12-2"
run-e2e: false
s3-key-prefix: "windows-tensorrt-llm-ccache"
sccache-conf-path: 'C:\sccache.conf'
- os: "linux"
name: "cuda-12-3"
runs-on: "linux-tensorrt-llm-cuda-12-3"
run-e2e: false
s3-key-prefix: "linux-tensorrt-llm"
sccache-conf-path: '/tmp/sccache.conf'
permissions:
contents: write
steps:
- name: Clone
id: checkout
uses: actions/checkout@v3
with:
submodules: recursive
lfs: true
- name: Install choco on Windows
if: runner.os == 'Windows'
run: |
choco install make pkgconfiglite ccache awscli -y
- name: create sccache.conf file Linux
if: runner.os == 'Linux'
run: |
echo "[cache.s3]" > ${{ matrix.sccache-conf-path }}
echo 'bucket = "${{ secrets.MINIO_BUCKET_NAME }}"' >> ${{ matrix.sccache-conf-path }}
echo 'endpoint = "${{ secrets.MINIO_ENDPOINT }}"' >> ${{ matrix.sccache-conf-path }}
echo 'key_prefix = "${{ matrix.s3-key-prefix }}"' >> ${{ matrix.sccache-conf-path }}
echo 'use_ssl = false' >> ${{ matrix.sccache-conf-path }}
echo 'server_side_encryption = false' >> ${{ matrix.sccache-conf-path }}
echo 'no_credentials = false' >> ${{ matrix.sccache-conf-path }}
- name: Download ccache from s3
continue-on-error: true
if: runner.os == 'Windows'
run: |
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
aws s3 cp s3://${{ secrets.MINIO_BUCKET_NAME }}/${{ matrix.s3-key-prefix }} C:\Users\ContainerAdministrator\AppData\Local\ccache --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
env:
AWS_ACCESS_KEY_ID: "${{ secrets.MINIO_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
AWS_DEFAULT_REGION: "${{ secrets.MINIO_REGION }}"
- name: start sccache server for linux
if: runner.os == 'Linux'
working-directory: cpp
run: |
sccache --start-server
env:
SCCACHE_BUCKET: "${{ secrets.MINIO_BUCKET_NAME }}"
SCCACHE_REGION: "${{ secrets.MINIO_REGION }}"
SCCACHE_ENDPOINT: "${{ secrets.MINIO_ENDPOINT }}"
SCCACHE_S3_USE_SSL: "false"
SCCACHE_S3_SERVER_SIDE_ENCRYPTION: "false"
SCCACHE_S3_KEY_PREFIX: "${{ matrix.s3-key-prefix }}"
SCCACHE_LOG: "debug"
SCCACHE_CONF: '${{ matrix.sccache-conf-path }}'
AWS_ACCESS_KEY_ID: "${{ secrets.MINIO_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
SCCACHE_IDLE_TIMEOUT: "0"
# - name: start sccache server for windows
# if: runner.os == 'Windows'
# run: |
# sccache --start-server
# env:
# SCCACHE_IDLE_TIMEOUT: "0"
- name: Build Dependencies
working-directory: cpp
run: |
make build-deps
- name: Build
working-directory: cpp
run: |
make build
- name: Pre-package
working-directory: cpp
run: |
make pre-package
- name: Package
working-directory: cpp
run: |
make package
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: cortex.tensorrt-llm-${{ matrix.os }}-${{ matrix.name }}
path: cpp/tensorrt_llm/cortex.tensorrt-llm/cortex.tensorrt-llm.tar.gz
- name: Clean
if: always()
continue-on-error: true
run: |
sccache --stop-server
rm ${{ matrix.sccache-conf-path }}
- name: Upload ccache to s3
continue-on-error: true
if: always() && runner.os == 'Windows'
run: |
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
aws s3 cp C:\Users\ContainerAdministrator\AppData\Local\ccache s3://${{ secrets.MINIO_BUCKET_NAME }}/${{ matrix.s3-key-prefix }} --recursive --endpoint ${{ secrets.MINIO_ENDPOINT }}
env:
AWS_ACCESS_KEY_ID: "${{ secrets.MINIO_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.MINIO_SECRET_ACCESS_KEY }}"
AWS_DEFAULT_REGION: "${{ secrets.MINIO_REGION }}"