Release Packages #27
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: Release Packages | |
# on: | |
# push: | |
# tags: | |
# - 'v[0-9]+.[0-9]+.[0-9]+' | |
on: workflow_dispatch | |
# Needed to create release and upload assets | |
permissions: | |
contents: write | |
jobs: | |
# build-tgz: | |
# strategy: | |
# matrix: | |
# arch: [X64, ARM64] | |
# image: ["dev-centos7-x86:v2", "dev-centos8-arm:v2"] | |
# exclude: | |
# - arch: X64 | |
# image: "dev-centos8-arm:v2" | |
# - arch: ARM64 | |
# image: "dev-centos7-x86:v2" | |
# runs-on: [self-hosted, Linux, "${{ matrix.arch }}"] | |
# container: | |
# image: registry-1.docker.io/dashinfer/${{ matrix.image }} | |
# env: | |
# # force use node16 instead of node20 | |
# # otherwise it may cause GLIBCXX_2.27 not found | |
# ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
# # ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 | |
# # ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16 | |
# defaults: | |
# run: | |
# shell: bash -l {0} | |
# steps: | |
# - name: Check out code | |
# uses: actions/checkout@v3 | |
# with: | |
# lfs: true | |
# - name: Pull LFS | |
# run: | | |
# git lfs install | |
# git lfs pull | |
# - name: Build tgz package | |
# run: | | |
# git fetch --tags | |
# TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1)) | |
# VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//') | |
# source /opt/rh/devtoolset-7/enable | |
# source activate ds_py | |
# if command -v nvcc &> /dev/null | |
# then | |
# export AS_PLATFORM="cuda" | |
# export AS_CUDA_SM="'70;75;80;86;89;90a'" | |
# else | |
# # export ENABLE_MULTINUMA="ON" | |
# if [[ "${{ matrix.arch }}" == "ARM64" ]]; then | |
# export AS_PLATFORM="armclang" | |
# else | |
# export AS_PLATFORM="x86" | |
# fi | |
# fi | |
# export AS_RELEASE_VERSION=$VERSION_NUMBER | |
# export AS_BUILD_PACKAGE=ON | |
# bash build.sh | |
# - name: Upload tgz package | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: dashinfer-tgz-${{ matrix.arch }} | |
# path: build/*.tar.gz | |
build-wheels: | |
strategy: | |
matrix: | |
arch: [X64, ARM64] | |
image: ["dev-centos7-x86:v2", "dev-centos8-arm:v2"] | |
exclude: | |
- arch: X64 | |
image: "dev-centos8-arm:v2" | |
- arch: ARM64 | |
image: "dev-centos7-x86:v2" | |
runs-on: [self-hosted, Linux, "${{ matrix.arch }}"] | |
container: | |
image: registry-1.docker.io/dashinfer/${{ matrix.image }} | |
env: | |
# force use node16 instead of node20 | |
# otherwise it may cause GLIBCXX_2.27 not found | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: Pull LFS | |
run: | | |
git lfs install | |
git lfs pull | |
- name: Build manylinux wheels | |
run: | | |
git fetch --tags | |
TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1)) | |
VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//') | |
AS_RELEASE_VERSION=$VERSION_NUMBER bash scripts/release/python_manylinux_build.sh | |
pwd | |
ls -al python/wheelhouse/*-manylinux*.whl | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: python-manylinux-wheels-${{ matrix.arch }} | |
path: python/wheelhouse/*-manylinux*.whl | |
# test: | |
# strategy: | |
# matrix: | |
# arch: [X64, ARM64] | |
# image: ["test-ubuntu-x86:v1", "test-centos-arm:v1"] | |
# exclude: | |
# - arch: X64 | |
# image: "test-centos-arm:v1" | |
# - arch: ARM64 | |
# image: "test-ubuntu-x86:v1" | |
# runs-on: [self-hosted, Linux, "${{ matrix.arch }}"] | |
# container: | |
# image: registry-1.docker.io/dashinfer/${{ matrix.image }} | |
# volumes: | |
# - /mnt/data0/models/modelscope:/github/home/.cache/modelscope | |
# options: "--ipc=host --cap-add SYS_NICE --cap-add SYS_PTRACE" | |
# needs: build-wheels | |
# steps: | |
# - name: Check out code | |
# uses: actions/checkout@v3 | |
# - name: Download wheels | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: python-manylinux-wheels-${{ matrix.arch }} | |
# path: python/wheelhouse | |
# - name: Test manylinux wheels | |
# run: | | |
# TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1)) | |
# VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//') | |
# AS_RELEASE_VERSION=$VERSION_NUMBER bash scripts/release/python_manylinux_test.sh | |
publish: | |
runs-on: [self-hosted, Linux] | |
needs: [build-wheels] | |
strategy: | |
matrix: | |
arch: [X64, ARM64] | |
steps: | |
# - name: Download deb packages | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: dashinfer-deb | |
# path: release/ | |
# - name: Download tgz packages | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: dashinfer-tgz-${{ matrix.arch }} | |
# path: release/ | |
- name: Download python wheels | |
uses: actions/download-artifact@v3 | |
with: | |
name: python-manylinux-wheels-${{ matrix.arch }} | |
path: release/ | |
- name: Release all packages | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: release/* | |