Skip to content

bump version to v0.10.2 (#4062) #3

bump version to v0.10.2 (#4062)

bump version to v0.10.2 (#4062) #3

name: cuda12.8-whl-release
on:
push:
tags:
- '*'
workflow_dispatch:
permissions:
contents: write
jobs:
linux-build:
strategy:
matrix:
pyver: [py39, py310, py311, py312, py313]
runs-on: ubuntu-latest
env:
PYTHON_VERSION: ${{ matrix.pyver }}
PLAT_NAME: manylinux2014_x86_64
DOCKER_TAG: cuda12.8
OUTPUT_FOLDER: cuda12.8_dist
CUDA_VER: 12.8
steps:
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
tool-cache: false
docker-images: false
# All of these default to true, but feel free to set to "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: false
- name: Checkout repository
uses: actions/checkout@v3
- name: Build
run: |
echo ${PYTHON_VERSION}
echo ${PLAT_NAME}
echo ${DOCKER_TAG}
echo ${OUTPUT_FOLDER}
# remove -it
sed -i 's/docker run --rm -it/docker run --rm/g' builder/manywheel/build_wheel.sh
bash builder/manywheel/build_wheel.sh ${PYTHON_VERSION} ${PLAT_NAME} ${DOCKER_TAG} ${OUTPUT_FOLDER}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
path: builder/manywheel/${{ env.OUTPUT_FOLDER }}/*
retention-days: 1
name: linux-${{ matrix.pyver }}
windows-build:
strategy:
matrix:
pyver: ['3.9', '3.10', '3.11', '3.12', '3.13']
runs-on: windows-latest
steps:
- name: Set git for windows
run: |
git config --global core.longpaths true
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyver }}
- name: Install python packages
run: |
pip install build change-wheel-version
- name: Setup CUDA Toolkit
id: cuda-toolkit
shell: pwsh
run: ./builder/windows/setup_cuda.ps1
env:
INPUT_CUDA_VERSION: '12.8.1'
- name: Build wheel
run: |
python -m build --wheel -o build/wheel
Get-ChildItem -Path "build" -Filter "*.whl" | ForEach-Object { change_wheel_version $_.FullName --local-version cu128 --delete-old-wheel }
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
path: build/wheel/*
retention-days: 1
name: windows-${{ matrix.pyver }}
publish:
runs-on: ubuntu-latest
environment: 'prod'
needs:
- linux-build
- windows-build
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifact
merge-multiple: true
- name: Add cuda version to package name
run: |
ver=$(cat lmdeploy/version.py | grep '__version__ =' | cut -d\' -f2)
cuver=$ver+cu128
ls -lh
cd artifact
for file in *; do
mv "$file" "`echo $file | sed "s/$ver/$cuver/g"`";
done
- name: Display artifacts
run: ls artifact/ -lh
- name: Publish
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: artifact/*