正在显示
2 个修改的文件
包含
59 行增加
和
2 行删除
.github/workflows/build-wheels-macos.yaml
0 → 100644
| 1 | +name: build-wheels-macos | ||
| 2 | + | ||
| 3 | +on: | ||
| 4 | + push: | ||
| 5 | + branches: | ||
| 6 | + - wheel | ||
| 7 | + tags: | ||
| 8 | + - '*' | ||
| 9 | + | ||
| 10 | +env: | ||
| 11 | + SHERPA_ONNX_IS_IN_GITHUB_ACTIONS: 1 | ||
| 12 | + | ||
| 13 | +concurrency: | ||
| 14 | + group: build-wheels-macos-${{ github.ref }} | ||
| 15 | + cancel-in-progress: true | ||
| 16 | + | ||
| 17 | +jobs: | ||
| 18 | + build_wheels: | ||
| 19 | + name: Build wheels on ${{ matrix.os }} | ||
| 20 | + runs-on: ${{ matrix.os }} | ||
| 21 | + strategy: | ||
| 22 | + fail-fast: false | ||
| 23 | + matrix: | ||
| 24 | + os: [macos-latest] | ||
| 25 | + | ||
| 26 | + steps: | ||
| 27 | + - uses: actions/checkout@v2 | ||
| 28 | + | ||
| 29 | + # see https://cibuildwheel.readthedocs.io/en/stable/changelog/ | ||
| 30 | + # for a list of versions | ||
| 31 | + - name: Build wheels | ||
| 32 | + uses: pypa/cibuildwheel@v2.11.4 | ||
| 33 | + env: | ||
| 34 | + CIBW_BEFORE_BUILD: "pip install -U cmake numpy" | ||
| 35 | + CIBW_ENVIRONMENT: SHERPA_ONNX_CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES='arm64;x86_64'" | ||
| 36 | + CIBW_ARCHS: "universal2" | ||
| 37 | + CIBW_BUILD_VERBOSITY: 3 | ||
| 38 | + | ||
| 39 | + - name: Display wheels | ||
| 40 | + shell: bash | ||
| 41 | + run: | | ||
| 42 | + ls -lh ./wheelhouse/ | ||
| 43 | + | ||
| 44 | + ls -lh ./wheelhouse/*.whl | ||
| 45 | + | ||
| 46 | + - uses: actions/upload-artifact@v2 | ||
| 47 | + with: | ||
| 48 | + path: ./wheelhouse/*.whl | ||
| 49 | + | ||
| 50 | + - name: Publish wheels to PyPI | ||
| 51 | + env: | ||
| 52 | + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
| 53 | + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
| 54 | + run: | | ||
| 55 | + python3 -m pip install --upgrade pip | ||
| 56 | + python3 -m pip install wheel twine setuptools | ||
| 57 | + | ||
| 58 | + twine upload ./wheelhouse/*.whl |
| @@ -21,7 +21,7 @@ jobs: | @@ -21,7 +21,7 @@ jobs: | ||
| 21 | strategy: | 21 | strategy: |
| 22 | fail-fast: false | 22 | fail-fast: false |
| 23 | matrix: | 23 | matrix: |
| 24 | - os: [ubuntu-latest, windows-latest, macos-latest] | 24 | + os: [ubuntu-latest, windows-latest] |
| 25 | 25 | ||
| 26 | steps: | 26 | steps: |
| 27 | - uses: actions/checkout@v2 | 27 | - uses: actions/checkout@v2 |
| @@ -35,7 +35,6 @@ jobs: | @@ -35,7 +35,6 @@ jobs: | ||
| 35 | CIBW_SKIP: "cp27-* cp35-* cp36-* *-win32 pp* *-musllinux* *-manylinux_i686" | 35 | CIBW_SKIP: "cp27-* cp35-* cp36-* *-win32 pp* *-musllinux* *-manylinux_i686" |
| 36 | CIBW_BUILD_VERBOSITY: 3 | 36 | CIBW_BUILD_VERBOSITY: 3 |
| 37 | CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH='/project/build/bdist.linux-x86_64/wheel/sherpa_onnx/lib' | 37 | CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH='/project/build/bdist.linux-x86_64/wheel/sherpa_onnx/lib' |
| 38 | - CIBW_REPAIR_WHEEL_COMMAND_MACOS: "" | ||
| 39 | 38 | ||
| 40 | - name: Display wheels | 39 | - name: Display wheels |
| 41 | shell: bash | 40 | shell: bash |
-
请 注册 或 登录 后发表评论