Refactor github actions tests (#688)

This commit is contained in:
Fangjun Kuang
2024-03-22 21:22:42 +08:00
committed by GitHub
parent 1c77457d61
commit 24f437a6f1
42 changed files with 591 additions and 213 deletions

View File

@@ -2,8 +2,6 @@ name: build-wheels-linux
on:
push:
branches:
- wheel
tags:
- '*'
workflow_dispatch:
@@ -12,7 +10,7 @@ env:
SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1
concurrency:
group: build-wheels-${{ github.ref }}
group: build-wheels-linux-${{ github.ref }}
cancel-in-progress: true
jobs:
@@ -84,6 +82,7 @@ jobs:
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v3
shell: bash
with:
max_attempts: 20
timeout_seconds: 200
@@ -112,6 +111,7 @@ jobs:
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
shell: bash
run: |
python3 -m pip install --upgrade pip
python3 -m pip install wheel twine setuptools
@@ -119,16 +119,17 @@ jobs:
twine upload ./wheelhouse/*.whl
- name: Build sdist
if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux_2_28'
if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux2014'
shell: bash
run: |
python3 setup.py sdist
ls -l dist/*
- name: Publish sdist to PyPI
if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux_2_28'
if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux2014'
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
shell: bash
run: |
twine upload dist/sherpa-onnx-*.tar.gz