Makefile and CICD for cpp tensorrt-llm #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Quality Gate | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
runs-on: ${{ matrix.runs-on }} | |
strategy: | |
matrix: | |
include: | |
- os: "windows" | |
name: "cuda-12-2" | |
runs-on: "windows-tensorrt-llm-cuda-12-2" | |
run-e2e: false | |
s3-key-prefix: "windows" | |
sccache-conf-path: 'C:\sccache.conf' | |
permissions: | |
contents: write | |
steps: | |
- name: Clone | |
id: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
lfs: true | |
- name: create sccache.conf file windows | |
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: Install choco on Windows | |
if: runner.os == 'Windows' | |
run: | | |
choco install make pkgconfiglite -y | |
- name: Build Dependencies | |
working-directory: cpp | |
run: | | |
make build-deps | |
- name: Build | |
working-directory: cpp | |
run: | | |
sccache --start-server | |
make build | |
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: "windows" | |
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: Clean | |
if: always() | |
continue-on-error: true | |
run: | | |
sccache --stop-server | |
rm ${{ matrix.sccache-conf-path }} | |