janitor

janitor
git clone https://git.prime8.dev/janitor.git
Log | Files | Refs | README | LICENSE

build-wheels-macos-x64.yaml (2052B)


      1 name: build-wheels-macos-x64
      2 
      3 on:
      4   push:
      5     branches:
      6       - wheel
      7     tags:
      8       - '*'
      9   workflow_dispatch:
     10 
     11 concurrency:
     12   group: build-wheels-macos-x64-${{ github.ref }}
     13   cancel-in-progress: true
     14 
     15 jobs:
     16   build_wheels_x64:
     17     name: ${{ matrix.python-version }}
     18     runs-on: ${{ matrix.os }}
     19     strategy:
     20       fail-fast: false
     21       matrix:
     22         os: [macos-latest]
     23         python-version: ["cp37", "cp38", "cp39", "cp310", "cp311", "cp312"]
     24 
     25     steps:
     26       - uses: actions/checkout@v2
     27 
     28       # see https://cibuildwheel.readthedocs.io/en/stable/changelog/
     29       # for a list of versions
     30       - name: Build wheels
     31         if: matrix.python-version == 'cp37'
     32         uses: pypa/cibuildwheel@v2.11.4
     33         env:
     34           CIBW_BUILD: "${{ matrix.python-version}}-* "
     35           CIBW_ENVIRONMENT: KALDI_NATIVE_FBANK_CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES='x86_64'"
     36           CIBW_ARCHS: "x86_64"
     37           CIBW_BUILD_VERBOSITY: 3
     38 
     39       - name: Build wheels
     40         if: matrix.python-version != 'cp37'
     41         uses: pypa/cibuildwheel@v2.15.0
     42         env:
     43           CIBW_BUILD: "${{ matrix.python-version}}-* "
     44           CIBW_ENVIRONMENT: KALDI_NATIVE_FBANK_CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES='x86_64'"
     45           CIBW_ARCHS: "x86_64"
     46           CIBW_BUILD_VERBOSITY: 3
     47 
     48       - name: Display wheels
     49         shell: bash
     50         run: |
     51           ls -lh ./wheelhouse/
     52 
     53       - uses: actions/upload-artifact@v4
     54         with:
     55           name: wheel-${{ matrix.python-version }}
     56           path: ./wheelhouse/*.whl
     57 
     58       - name: Publish wheels to PyPI
     59         env:
     60           TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
     61           TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
     62         shell: bash
     63         run: |
     64           opts='--break-system-packages'
     65           v=${{ matrix.python-version }}
     66           if [[ $v == cp37 || $v == cp38 || $v == cp39 ]]; then
     67             opts=''
     68           fi
     69 
     70           python3 -m pip install $opts --upgrade pip
     71           python3 -m pip install $opts wheel twine setuptools
     72 
     73           twine upload ./wheelhouse/*.whl