fixed/genearlzed meson build #86
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Wheel builder | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
release: | |
jobs: | |
build_wheels: | |
name: Build wheel for ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} ${{ matrix.buildplat[2] }} | |
runs-on: ${{ matrix.buildplat[0] }} | |
strategy: | |
matrix: | |
buildplat: | |
# should also be able to do multi-archs on a single entry, e.g. | |
# [windows-2019, win*, "AMD64 x86"]. However, those two require a different compiler setup | |
# so easier to separate out here. | |
- [ubuntu-22.04, manylinux, x86_64] | |
# - [ubuntu-22.04, musllinux, x86_64] | |
- [macos-11, macosx, x86_64] | |
# - [windows-2019, win, AMD64] | |
python: [ ["cp38", "3.8"],["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11.0-alpha - 3.11.0"]] | |
env: | |
IS_32_BIT: ${{ matrix.buildplat[2] == 'x86' }} | |
steps: | |
- name: Checkout pyAVL | |
uses: actions/checkout@v3 | |
# Used to host cibuildwheel | |
- uses: actions/[email protected] | |
with: | |
python-version: 3.9 | |
- name: win_amd64 - install rtools | |
run: | | |
# mingw-w64 | |
choco install rtools --no-progress | |
echo "c:\rtools40\ucrt64\bin;" >> $env:GITHUB_PATH | |
if: ${{ runner.os == 'Windows' && env.IS_32_BIT == 'false' }} | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}* | |
CIBW_ARCHS: ${{ matrix.buildplat[2] }} | |
CIBW_ENVIRONMENT_PASS_LINUX: RUNNER_OS | |
# setting SDKROOT necessary when using the gfortran compiler | |
# installed in cibw_before_build_macos.sh | |
# MACOS_DEPLOYMENT_TARGET is set because of | |
# https://github.com/pypa/cibuildwheel/issues/1419. Once that | |
# is closed and an update to pypa/cibuildwheel is done, then | |
# that environment variable can be removed. | |
CIBW_ENVIRONMENT_MACOS: > | |
SDKROOT=/Applications/Xcode_11.7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk | |
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH | |
MACOSX_DEPLOYMENT_TARGET=10.9 | |
MACOS_DEPLOYMENT_TARGET=10.9 | |
_PYTHON_HOST_PLATFORM=macosx-10.9-x86_64 | |
CIBW_REPAIR_WHEEL_COMMAND_MACOS: > | |
DYLD_LIBRARY_PATH=/usr/local/lib delocate-listdeps {wheel} && | |
DYLD_LIBRARY_PATH=/usr/local/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel} | |
- uses: actions/upload-artifact@v3 | |
name: upload the wheels | |
with: | |
path: ./wheelhouse/*.whl | |
name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} | |
upload_all: | |
name: upload the wheels to PYPI | |
needs: [build_wheels] | |
runs-on: ubuntu-latest | |
steps: | |
- name: what is going on | |
run: pwd & ls -R | |
- name: Checkout pyAVL | |
uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
id: download | |
name: download the wheels | |
with: | |
path: wheelhouse | |
- name: 'Echo download path' | |
run: echo ${{steps.download.outputs.download-path}} | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: make dist dir | |
run: mkdir dist | |
- name: Move wheels to dist | |
run: bash tools/wheels/move_wheels.sh | |
# - name: Publish distribution 📦 to Test PyPI | |
# uses: pypa/gh-action-pypi-publish@release/v1 | |
# with: | |
# # packages-dir: wheelhouse/ | |
# password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
# repository-url: https://test.pypi.org/legacy/ | |
- name: Publish distribution 📦 to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
# packages-dir: wheelhouse/ | |
password: ${{ secrets.PYPI_API_TOKEN }} |