diff --git a/.github/workflows/build-python-wheels.yml b/.github/workflows/build-python-wheels.yml index 66f9a1a..11df057 100644 --- a/.github/workflows/build-python-wheels.yml +++ b/.github/workflows/build-python-wheels.yml @@ -1,7 +1,7 @@ -# Build wheels for many platforms +# Build wheels for many platforms, use cibuildwheel # see: https://github.com/pypa/cibuildwheel -name: Build Python wheels +name: Build wheels on: push: @@ -27,7 +27,7 @@ on: jobs: echo_github_env: - name: Echo GitHub environment variables + name: Echo env variables runs-on: ubuntu-latest steps: - run: | @@ -56,7 +56,7 @@ jobs: # To trigger the build steps, add "[cd build]" to commit message build_wheels: - name: Build ${{ matrix.python-version }} on ${{ matrix.os }} + name: Build ${{ matrix.os }} runs-on: ${{ matrix.os }} needs: check_build_trigger if: needs.check_build_trigger.outputs.build @@ -100,7 +100,7 @@ jobs: CIBW_BUILD_VERBOSITY: 1 # See CIBW_BUILD, CIBW_SKIP, CIBW_ARCHS and other build selectors at: # https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip - CIBW_SKIP: "cp37-musllinux_i686" + CIBW_SKIP: "*-musllinux_i686" CIBW_ARCHS_MACOS: "x86_64 arm64" CIBW_ENVIRONMENT_MACOS: | MACOSX_DEPLOYMENT_TARGET=10.9 @@ -115,7 +115,7 @@ jobs: # It is needed to install Rust for Linux, # because cibuildwheel on Linux runs inside a container # and the container does not have Rust. - CIBW_ARCHS_WINDOWS: "AMD64 x86" + CIBW_ARCHS_WINDOWS: "AMD64 x86 ARM64" - name: Store artifacts uses: actions/upload-artifact@v3 @@ -123,7 +123,7 @@ jobs: path: ./wheelhouse/*.whl build_sdist: - name: Build Python source distribution + name: Build source distribution runs-on: ubuntu-latest needs: check_build_trigger if: needs.check_build_trigger.outputs.build @@ -145,13 +145,13 @@ jobs: path: nlpo3-python/dist/*.tar.gz publish_pypi: - name: Publish Python package to PyPI + name: Publish to PyPI runs-on: ubuntu-latest needs: [build_wheels, build_sdist] - # Upload to PyPI on every tag starting with 'v' - #if: github.event_name == 'push' && startsWith(github.event.ref, 'v') - # Alternatively, to publish when a GitHub Release is created, use the following rule: + # Publish when a GitHub Release is created: if: github.event_name == 'release' && github.event.action == 'published' + # Alternatively, upload to PyPI on every tag starting with 'v': + #if: github.event_name == 'push' && startsWith(github.event.ref, 'v') steps: - name: Retrieve artifacts uses: actions/download-artifact@v3