Setup release CI #5
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: Daily Build | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Schedule to run daily at midnight | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
cuda-version: [cu118, cu121, cu122] | |
env: | |
CUDA_VERSION: ${{ matrix.cuda-version }} | |
steps: | |
- name: Checkout private onediff | |
uses: actions/checkout@v2 | |
with: | |
ref: opt_setup_ci | |
repository: siliconflow/${{ secrets.ONEDIFF_ENTERPRISE }} | |
token: ${{ secrets.WHEEL_TOKEN }} | |
- name: Checkout onediff_release | |
uses: actions/checkout@v2 | |
with: | |
ref: master | |
repository: siliconflow/onediff_releases | |
path: onediff_releases | |
token: ${{ secrets.WHEEL_TOKEN }} | |
- name: Python wheels manylinux build | |
uses: RalfG/[email protected] | |
with: | |
python-versions: 'cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311' | |
build-requirements: 'Cython==3.0.8 requests==2.31.0' | |
pip-wheel-args: '-w ./wheels/${{ matrix.cuda-version }} --no-deps' | |
- name: create release with assests | |
run: | | |
sudo find ./wheels/${{ matrix.cuda-version }} -type f ! -name '*manylinux*' -exec rm {} + | |
python onediff_releases/generate_pypi_index.py ./wheels/${{ matrix.cuda-version }} | |
find ./wheels -type f | |
- name: Publish to OSS | |
run: | | |
true | |
- name: Set Date | |
id: set_date | |
run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: Publish archives | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: "./wheels/${{ matrix.cuda-version }}/*.whl" | |
token: "${{ secrets.WHEEL_TOKEN }}" | |
tag: enterprise-${{ matrix.cuda-version }} | |
name: latest enterprise-${{ matrix.cuda-version }}-${{ env.DATE }} | |
removeArtifacts: false | |
allowUpdates: true | |
replacesArtifacts: true | |
makeLatest: false |