Skip to content

Linux add compile python lib for convert model (#46) #6

Linux add compile python lib for convert model (#46)

Linux add compile python lib for convert model (#46) #6

Workflow file for this run

name: CI
on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
workflow_dispatch:
jobs:
create-draft-release:
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
version: ${{ steps.get_version.outputs.version }}
permissions:
contents: write
steps:
- name: Extract tag name without v prefix
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV && echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
env:
GITHUB_REF: ${{ github.ref }}
- name: Create Draft Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: "${{ env.VERSION }}"
draft: true
prerelease: false
build-and-test:
runs-on: ${{ matrix.runs-on }}
needs: [create-draft-release]
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"
ccache-dir: 'C:\Users\ContainerAdministrator\AppData\Local\ccache'
- os: "linux"
name: "cuda-12-3"
runs-on: "linux-tensorrt-llm-cuda-12-3"
run-e2e: false
s3-key-prefix: "linux-tensorrt-llm-0-9-0-cuda-12-3"
ccache-dir: "/home/runner/.ccache"
permissions:
contents: write
steps:
- name: Clone
id: checkout
uses: actions/checkout@v3
with:
submodules: recursive
lfs: true
- name: Install tools on Windows
if: runner.os == 'Windows'
run: |
choco install make pkgconfiglite ccache awscli 7zip -y
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
- name: Download ccache from s3
if: runner.os == 'Windows'
continue-on-error: true
run: |
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
aws s3 cp s3://${{ secrets.MINIO_BUCKET_NAME }}/${{ matrix.s3-key-prefix }} ${{ matrix.ccache-dir }} --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: Download ccache from s3
if: runner.os == 'Linux'
continue-on-error: true
run: |
aws s3 cp s3://${{ secrets.MINIO_BUCKET_NAME }}/${{ matrix.s3-key-prefix }} ${{ matrix.ccache-dir }} --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: 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
- uses: actions/[email protected]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-draft-release.outputs.upload_url }}
asset_path: cpp/tensorrt_llm/cortex.tensorrt-llm/cortex.tensorrt-llm.tar.gz
asset_name: cortex.tensorrt-llm-${{ needs.create-draft-release.outputs.version }}-${{ matrix.os }}-${{ matrix.name }}.tar.gz
asset_content_type: application/gzip
- 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 ${{ matrix.ccache-dir }} 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 }}"
- name: Upload ccache to s3
continue-on-error: true
if: always() && runner.os == 'Linux'
run: |
aws s3 cp ${{ matrix.ccache-dir }} 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 }}"
update_release_draft:
needs: [build-and-test]
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}