FIx up needs #9
Workflow file for this run
This file contains hidden or 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: Build | |
| # Current draft based on | |
| # https://github.com/matplotlib/matplotlib/blob/main/.github/workflows/cibuildwheel.yml | |
| # TODO: only run on published releases | |
| # on: | |
| # release: | |
| # types: [published] | |
| on: [push] | |
| jobs: | |
| build-wheels: | |
| name: Build wheels on ${{ matrix.os }} for ${{ matrix.cibw_archs }} | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| # CIBW_BEFORE_BUILD: >- | |
| # rm -rf {package}/build | |
| CIBW_BEFORE_BUILD_WINDOWS: >- | |
| pip install delvewheel | |
| CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >- | |
| delvewheel repair -w {dest_dir} {wheel} | |
| # TODO: switch to building based on locked src | |
| # and use tests-min-locked here | |
| CIBW_BEFORE_TEST: >- | |
| pip install -r {project}/requirements-only-tests-min-locked.txt | |
| CIBW_TEST_COMMAND: >- | |
| pytest {project}/tests | |
| # # On Windows, we explicitly request MSVC compilers (as GitHub Action runners have | |
| # # MinGW on PATH that would be picked otherwise), switch to a static build for | |
| # # runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`, | |
| # # and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while | |
| # # keeping shared state with the rest of the Python process/extensions. | |
| # CIBW_CONFIG_SETTINGS_WINDOWS: >- | |
| # setup-args="--vsenv" | |
| # setup-args="-Db_vscrt=mt" | |
| # setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']" | |
| # CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | |
| # CIBW_SKIP: "*-musllinux_aarch64" | |
| # CIBW_TEST_COMMAND: >- | |
| # python {package}/ci/check_version_number.py | |
| # MACOSX_DEPLOYMENT_TARGET: "10.12" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # - os: ubuntu-latest | |
| # cibw_archs: "x86_64" | |
| # - os: ubuntu-24.04-arm | |
| # cibw_archs: "aarch64" | |
| - os: windows-latest | |
| cibw_archs: "AMD64" | |
| - os: windows-11-arm | |
| cibw_archs: "ARM64" | |
| # - os: macos-13 | |
| # cibw_archs: "x86_64" | |
| # - os: macos-14 | |
| # cibw_archs: "arm64" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build wheels for CPython 3.9 | |
| uses: pypa/[email protected] # matplotlib had v3.1.3 | |
| with: | |
| package-dir: . | |
| output-dir: wheelhouse | |
| config-file: "{package}/pyproject.toml" | |
| env: | |
| CIBW_BUILD: "cp39-*" | |
| CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
| - name: Build wheels for CPython 3.12 | |
| uses: pypa/[email protected] # matplotlib had v3.1.3 | |
| with: | |
| package-dir: . | |
| output-dir: wheelhouse | |
| config-file: "{package}/pyproject.toml" | |
| env: | |
| CIBW_BUILD: "cp312-*" | |
| CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
| # # - name: Setup Python | |
| # # if: ${{ startsWith(matrix.os, 'windows') }} | |
| # # uses: actions/setup-python@v5 | |
| # # with: | |
| # # python-version: '3.x' | |
| # # | |
| # # # Maybe not necessary, source: | |
| # # # https://dvdhrm.github.io/2021/04/21/meson-msvc-github-actions/ | |
| # # # and | |
| # # # https://github.com/numpy/numpy/blob/71eebaf8513dfd6ed40b0c689702d81e3f6f2527/.github/workflows/wheels.yml#L123 | |
| # # - name: Setup MSVC developer shell (32-bit) | |
| # # if: ${{ matrix.os == 'windows-2022' }} | |
| # # uses: bus1/cabuild/action/msdevshell@v1 | |
| # # with: | |
| # # architecture: x64 | |
| # # | |
| # # - name: Install Fortran compiler | |
| # # # When building from source, ensure we have a Fortran compiler | |
| # # if: ${{ startsWith(matrix.os, 'macos') }} | |
| # # uses: fortran-lang/setup-fortran@v1 | |
| # # id: setup-fortran | |
| # # with: | |
| # # # TODO: figure out whether we need/want to use other compilers too | |
| # # compiler: "gcc" | |
| # # version: "13" | |
| # # | |
| # # - name: Set macOS-13 specific flags | |
| # # if: matrix.os == 'macos-13' | |
| # # run: | | |
| # # echo "MACOSX_DEPLOYMENT_TARGET=13.0" >> "$GITHUB_ENV" | |
| # # | |
| # # - name: Set macOS-14 specific flags | |
| # # if: matrix.os == 'macos-14' | |
| # # run: | | |
| # # echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> "$GITHUB_ENV" | |
| # # | |
| # # - name: Build wheels | |
| # # uses: pypa/[email protected] | |
| # # # env: | |
| # # # CIBW_SOME_OPTION: value | |
| # # # ... | |
| # # with: | |
| # # package-dir: . | |
| # # output-dir: wheelhouse | |
| # # config-file: "{package}/pyproject.toml" | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-wheels-${{ matrix.os }}-${{ matrix.cibw_archs }} | |
| path: ./wheelhouse/*.whl | |
| if-no-files-found: error | |
| # make-sdist: | |
| # name: Make source distribution | |
| # runs-on: "ubuntu-latest" | |
| # | |
| # steps: | |
| # - name: Check out repository | |
| # uses: actions/checkout@v4 | |
| # with: | |
| # fetch-depth: 0 | |
| # | |
| # - uses: ./.github/actions/setup | |
| # with: | |
| # python-version: ${{ matrix.python-version }} | |
| # uv-dependency-install-flags: "--all-extras --group dev" | |
| # | |
| # - name: Create source distribution | |
| # run: uv build --sdist | |
| # | |
| # - name: Upload the source distribution artefact | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: cibw-sdist | |
| # path: dist/*.tar.gz | |
| deploy-pypi: | |
| # TODO: turn back on | |
| # needs: [ build-wheels, make-sdist ] | |
| needs: [build-wheels] | |
| # Having an environment for deployment is strongly recommend by PyPI | |
| # https://docs.pypi.org/trusted-publishers/adding-a-publisher/#github-actions | |
| # You can comment this line out if you don't want it. | |
| # # TODO: turn back on when we only run this on main | |
| # environment: deploy | |
| # permissions: | |
| # # this permission is mandatory for trusted publishing with PyPI | |
| # id-token: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download artefacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| pattern: cibw-* | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish to PyPI | |
| run: | | |
| ls dist | |
| # uv publish |