From 3f926a1f491d6c0868368eee93cdfebf68f42392 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 9 Feb 2024 12:37:00 +0000 Subject: [PATCH 01/10] Tidy up wheels --- .github/workflows/wheels.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index de04dba0..81bcd200 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -13,9 +13,7 @@ jobs: name: Build SDist runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - with: - submodules: true + - uses: actions/checkout@v4 - name: Build SDist run: pipx run build --sdist @@ -23,7 +21,7 @@ jobs: - name: Check metadata run: pipx run twine check dist/* - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: dist/*.tar.gz @@ -34,7 +32,7 @@ jobs: # Launch separate job for each python. The build is so much longer than # machine configuration/setup, so parallel builds will be faster. More # importantly, github times out after 6 hours _per job_. - cpversion: ["cp36", "cp37", "cp38", "cp39", "cp310", "cp311"] + cpversion: ["cp36", "cp37", "cp38", "cp39", "cp310", "cp311", "cp312"] os: [ { runs-on: ubuntu-latest, cibw-arch: manylinux_x86_64}, { runs-on: macos-latest, cibw-arch: macosx_x86_64}, { runs-on: macos-latest, cibw-arch: macosx_arm64}, { runs-on: windows-latest, cibw-arch: win_amd64} ] exclude: - os: { runs-on: macos-latest, cibw-arch: macosx_arm64} @@ -65,22 +63,20 @@ jobs: with: submodules: 'recursive' - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 name: Install Python - with: - python-version: '3.7' - name: Install cibuildwheel run: | python -m pip install --upgrade pip - python -m pip install cibuildwheel==2.12.0 + python -m pip install cibuildwheel - name: Build wheels run: | python -m cibuildwheel --output-dir wheelhouse # Upload binaries to github - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: | ./wheelhouse/*.whl @@ -95,12 +91,12 @@ jobs: # alternatively, to publish when a GitHub Release is created, use the following rule: if: github.event_name == 'release' && github.event.action == 'published' steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@v1.5.0 + - uses: pypa/gh-action-pypi-publish@v1.8.11 with: user: __token__ password: ${{ secrets.pypi_password }} From acce10a85b89886b0a47252382e77ca05b038de3 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 9 Feb 2024 12:38:00 +0000 Subject: [PATCH 02/10] Remove submodules bit --- .github/workflows/wheels.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 81bcd200..36ad4126 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -60,8 +60,6 @@ jobs: steps: - uses: actions/checkout@v3 - with: - submodules: 'recursive' - uses: actions/setup-python@v5 name: Install Python From e743ab4517fc6b90b04abcafc0a30d2b506b6b2b Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 9 Feb 2024 12:38:38 +0000 Subject: [PATCH 03/10] Only test on `cp312` --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 36ad4126..c33958fb 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -32,7 +32,7 @@ jobs: # Launch separate job for each python. The build is so much longer than # machine configuration/setup, so parallel builds will be faster. More # importantly, github times out after 6 hours _per job_. - cpversion: ["cp36", "cp37", "cp38", "cp39", "cp310", "cp311", "cp312"] + cpversion: ["cp312"] os: [ { runs-on: ubuntu-latest, cibw-arch: manylinux_x86_64}, { runs-on: macos-latest, cibw-arch: macosx_x86_64}, { runs-on: macos-latest, cibw-arch: macosx_arm64}, { runs-on: windows-latest, cibw-arch: win_amd64} ] exclude: - os: { runs-on: macos-latest, cibw-arch: macosx_arm64} From ab76d9fff709db0315526f4159009e35afc267f9 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 9 Feb 2024 12:48:48 +0000 Subject: [PATCH 04/10] Restore all python versions and prettify --- .github/workflows/wheels.yml | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index c33958fb..2e4663db 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -32,16 +32,33 @@ jobs: # Launch separate job for each python. The build is so much longer than # machine configuration/setup, so parallel builds will be faster. More # importantly, github times out after 6 hours _per job_. - cpversion: ["cp312"] - os: [ { runs-on: ubuntu-latest, cibw-arch: manylinux_x86_64}, { runs-on: macos-latest, cibw-arch: macosx_x86_64}, { runs-on: macos-latest, cibw-arch: macosx_arm64}, { runs-on: windows-latest, cibw-arch: win_amd64} ] + cpversion: + - cp36 + - cp37 + - cp38 + - cp39 + - cp310 + - cp311 + - cp312 + os: + - runs-on: ubuntu-latest + cibw-arch: manylinux_x86_64 + - runs-on: macos-latest + cibw-arch: macosx_x86_64 + - runs-on: macos-latest + cibw-arch: macosx_arm64 + - runs-on: windows-latest + cibw-arch: win_amd64 exclude: - - os: { runs-on: macos-latest, cibw-arch: macosx_arm64} + - os: + - runs-on: macos-latest + cibw-arch: macosx_arm64 cpversion: "cp36" - - os: { runs-on: macos-latest, cibw-arch: macosx_arm64} + - os: + - runs-on: macos-latest + cibw-arch: macosx_arm64 cpversion: "cp37" - - name: Build wheels ${{ matrix.cpversion }}-${{ matrix.os.cibw-arch }} runs-on: ${{ matrix.os.runs-on }} From 90c7119b9514d02d8a394fa0ce7989ffb8e76eaf Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 9 Feb 2024 15:12:08 +0000 Subject: [PATCH 05/10] Fix duplicate name problem --- .github/workflows/wheels.yml | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 2e4663db..c4c07839 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -26,6 +26,21 @@ jobs: path: dist/*.tar.gz build_wheels: + name: Build wheels ${{ matrix.cpversion }}-${{ matrix.os.cibw-arch }} + runs-on: ${{ matrix.os.runs-on }} + + env: + CIBW_BUILD_VERBOSITY: 3 + # This is very dubious... It *may* work because these are just cpp libraries that should not depend on the python version. Still, super-dubious. + CIBW_TEST_REQUIRES: "gitpython" + CIBW_TEST_COMMAND: "python {project}/tests/test_basic.py" + CIBW_BUILD: "${{ matrix.cpversion }}-${{ matrix.os.cibw-arch }}" + CIBW_TEST_SKIP: "*-macosx_arm64" + CIBW_ENVIRONMENT: "MAX_JOBS=${{ matrix.os.runs-on == 'macos-latest' && 3 || 2 }}" + # Why universal2 here? It's not included above in CIBW_BUILD + CIBW_ARCHS_MACOS: "x86_64 arm64 universal2" + CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=10.13 CMAKE_OSX_ARCHITECTURES=\"${{ matrix.os.cibw-arch == 'macosx_x86_64' && 'x86_64' || matrix.os.cibw-arch == 'macosx_arm64' && 'arm64' || matrix.os.cibw-arch == 'macosx_universal2' && 'arm64;x86_64' || '' }}\"" + strategy: fail-fast: false matrix: @@ -53,30 +68,14 @@ jobs: - os: - runs-on: macos-latest cibw-arch: macosx_arm64 - cpversion: "cp36" + cpversion: cp36 - os: - runs-on: macos-latest cibw-arch: macosx_arm64 - cpversion: "cp37" - - name: Build wheels ${{ matrix.cpversion }}-${{ matrix.os.cibw-arch }} - runs-on: ${{ matrix.os.runs-on }} - - env: - CIBW_BUILD_VERBOSITY: 3 - # This is very dubious... It *may* work because these are just cpp libraries that should not depend on the python version. Still, super-dubious. - CIBW_TEST_REQUIRES: "gitpython" - CIBW_TEST_COMMAND: "python {project}/tests/test_basic.py" - CIBW_BUILD: "${{ matrix.cpversion }}-${{ matrix.os.cibw-arch }}" - CIBW_TEST_SKIP: "*-macosx_arm64" - CIBW_ENVIRONMENT: "MAX_JOBS=${{ matrix.os.runs-on == 'macos-latest' && 3 || 2 }}" - # Why universal2 here? It's not included above in CIBW_BUILD - CIBW_ARCHS_MACOS: "x86_64 arm64 universal2" - CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=10.13 CMAKE_OSX_ARCHITECTURES=\"${{ matrix.os.cibw-arch == 'macosx_x86_64' && 'x86_64' || matrix.os.cibw-arch == 'macosx_arm64' && 'arm64' || matrix.os.cibw-arch == 'macosx_universal2' && 'arm64;x86_64' || '' }}\"" - + cpversion: cp37 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v5 name: Install Python @@ -93,13 +92,14 @@ jobs: # Upload binaries to github - uses: actions/upload-artifact@v4 with: - path: | + name: artefact-${{ matrix.cpversion }}-${{ matrix.os.cibw-arch }} + path: |- ./wheelhouse/*.whl ./wheelhouse/*.tar.gz # # Push the resulting binaries to pypi on a tag starting with 'v' upload_pypi: - needs: [build_wheels] + needs: build_wheels runs-on: ubuntu-latest # upload to PyPI on every tag starting with 'v' # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') From ac3dc9aca1c98341dddefd0f5c14ed11e8c05770 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 9 Feb 2024 15:34:59 +0000 Subject: [PATCH 06/10] Revert to `v3` --- .github/workflows/wheels.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index c4c07839..da44c2f6 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -21,7 +21,7 @@ jobs: - name: Check metadata run: pipx run twine check dist/* - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v3 with: path: dist/*.tar.gz @@ -90,9 +90,8 @@ jobs: python -m cibuildwheel --output-dir wheelhouse # Upload binaries to github - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v3 with: - name: artefact-${{ matrix.cpversion }}-${{ matrix.os.cibw-arch }} path: |- ./wheelhouse/*.whl ./wheelhouse/*.tar.gz @@ -106,7 +105,7 @@ jobs: # alternatively, to publish when a GitHub Release is created, use the following rule: if: github.event_name == 'release' && github.event.action == 'published' steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v3 with: name: artifact path: dist From f7cecbf4b9e561eb8a8acbd35c3b629f5ea9c21c Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 9 Feb 2024 15:39:05 +0000 Subject: [PATCH 07/10] Back to `v4` but merge names --- .github/workflows/wheels.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index da44c2f6..b22f8eab 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -21,8 +21,9 @@ jobs: - name: Check metadata run: pipx run twine check dist/* - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: artifact-sdist path: dist/*.tar.gz build_wheels: @@ -90,8 +91,9 @@ jobs: python -m cibuildwheel --output-dir wheelhouse # Upload binaries to github - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: artifact-wheel-${{ matrix.cpversion }}-${{ matrix.os.cibw-arch }} path: |- ./wheelhouse/*.whl ./wheelhouse/*.tar.gz @@ -105,10 +107,11 @@ jobs: # alternatively, to publish when a GitHub Release is created, use the following rule: if: github.event_name == 'release' && github.event.action == 'published' steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: artifact + merge-multiple: true path: dist + pattern: artifact-* - uses: pypa/gh-action-pypi-publish@v1.8.11 with: From 0d1e23e0f1487ae58964768766ff74c022a2eff1 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 9 Feb 2024 15:40:13 +0000 Subject: [PATCH 08/10] Change order --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index b22f8eab..746245ba 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -109,9 +109,9 @@ jobs: steps: - uses: actions/download-artifact@v4 with: + pattern: artifact-* merge-multiple: true path: dist - pattern: artifact-* - uses: pypa/gh-action-pypi-publish@v1.8.11 with: From 450fcf00bb80b90ae6c637f7f3515b6ac24da21f Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 9 Feb 2024 17:26:54 +0000 Subject: [PATCH 09/10] Fix exclude --- .github/workflows/wheels.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 746245ba..49cf7518 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -66,14 +66,14 @@ jobs: - runs-on: windows-latest cibw-arch: win_amd64 exclude: - - os: + - cpversion: cp36 + os: - runs-on: macos-latest cibw-arch: macosx_arm64 - cpversion: cp36 - - os: + - cpversion: cp37 + os: - runs-on: macos-latest cibw-arch: macosx_arm64 - cpversion: cp37 steps: - uses: actions/checkout@v4 From fcb7a8df55e486793b43d1fe49249d57bec3bb90 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 9 Feb 2024 17:36:00 +0000 Subject: [PATCH 10/10] Convert to dict --- .github/workflows/wheels.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 49cf7518..32fa10bc 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -68,12 +68,12 @@ jobs: exclude: - cpversion: cp36 os: - - runs-on: macos-latest - cibw-arch: macosx_arm64 + runs-on: macos-latest + cibw-arch: macosx_arm64 - cpversion: cp37 os: - - runs-on: macos-latest - cibw-arch: macosx_arm64 + runs-on: macos-latest + cibw-arch: macosx_arm64 steps: - uses: actions/checkout@v4