Use self-compiled onnxruntime shared lib. (#635)

This commit is contained in:
Fangjun Kuang
2024-03-06 11:03:24 +08:00
committed by GitHub
parent 5dc2eaf2b4
commit 13260cdf49
5 changed files with 29 additions and 28 deletions

View File

@@ -17,13 +17,14 @@ concurrency:
jobs:
build_wheels_aarch64:
name: ${{ matrix.python-version }}
name: ${{ matrix.manylinux }} ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["cp37", "cp38", "cp39", "cp310", "cp311", "cp312"]
manylinux: [manylinux2014, manylinux_2_28]
steps:
- uses: actions/checkout@v4
@@ -51,7 +52,7 @@ jobs:
CIBW_SKIP: "cp27-* cp35-* cp36-* *-win32 pp* *-musllinux* *-manylinux_i686"
CIBW_BUILD_VERBOSITY: 3
CIBW_ARCHS_LINUX: aarch64
CIBW_MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux_2_28_aarch64
CIBW_MANYLINUX_AARCH64_IMAGE: quay.io/pypa/${{ matrix.manylinux }}_aarch64
# From onnxruntime >= 1.17.0, it drops support for CentOS 7.0 and it supports only manylinux_2_28.
# manylinux_2_24 is no longer supported
@@ -63,7 +64,7 @@ jobs:
ls -lh ./wheelhouse/*.whl
- name: Publish to huggingface
if: matrix.python-version == 'cp38'
if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux_2_28'
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
uses: nick-fields/retry@v3
@@ -93,7 +94,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.python-version }}
name: wheel-${{ matrix.python-version }}-${{ matrix.manylinux }}
path: ./wheelhouse/*.whl
- name: Publish wheels to PyPI

View File

@@ -17,13 +17,15 @@ concurrency:
jobs:
build_wheels_linux:
name: ${{ matrix.python-version }}
name: ${{ matrix.manylinux }} ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["cp37", "cp38", "cp39", "cp310", "cp311", "cp312"]
manylinux: [manylinux2014, manylinux_2_28]
steps:
- uses: actions/checkout@v4
@@ -46,9 +48,7 @@ jobs:
CIBW_BUILD: "${{ matrix.python-version}}-* "
CIBW_SKIP: "cp27-* cp35-* cp36-* *-win32 pp* *-musllinux* *-manylinux_i686"
CIBW_BUILD_VERBOSITY: 3
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
# From onnxruntime >= 1.17.0, it drops support for CentOS 7.0 and it supports only manylinux_2_28.
# manylinux_2_24 is no longer supported
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/${{ matrix.manylinux }}_x86_64
- name: Display wheels
shell: bash
@@ -76,7 +76,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.python-version }}
name: wheel-${{ matrix.python-version }}-${{ matrix.manylinux }}
path: ./wheelhouse/*.whl
- name: Publish to huggingface
@@ -119,14 +119,14 @@ jobs:
twine upload ./wheelhouse/*.whl
- name: Build sdist
if: matrix.python-version == 'cp38'
if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux_2_28'
shell: bash
run: |
python3 setup.py sdist
ls -l dist/*
- name: Publish sdist to PyPI
if: matrix.python-version == 'cp38'
if: matrix.python-version == 'cp38' && matrix.manylinux == 'manylinux_2_28'
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

View File

@@ -227,7 +227,7 @@ jobs:
tar cjvf ${dst}.tar.bz2 $dst
- name: Release pre-compiled binaries and libs for linux x64
if: github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/')
if: github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa' && github.event_name == 'push' && contains(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-20.04' && matrix.gcc_version == '7'
uses: svenstaro/upload-release-action@v2
with:
file_glob: true