Refactor github actions tests (#688)
This commit is contained in:
11
.github/workflows/build-wheels-linux.yaml
vendored
11
.github/workflows/build-wheels-linux.yaml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user