From 1bc2ea942e6bc490d4dcb9482acb6f688f8af0ca Mon Sep 17 00:00:00 2001 From: Will Shanks Date: Wed, 17 Apr 2024 10:55:15 -0400 Subject: [PATCH 1/3] Update Python version in build.yml to 3.12 Python 3.7 has fallen out of support and could not install the latest versions of build tools like setuptools and cibuildwheel. Also, the setup-python action was updated to v5 as the v1 version was producing warnings about end of life. With the latest version of setuptools, `python setup.py sdist` no longer works so the sdist creation step was modified to use pypa/build instead. --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b5f29f..3e440ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,10 +26,10 @@ jobs: run: | choco install windows-sdk-8.1 - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.7' + python-version: '3.12' - name: Build wheels env: @@ -42,13 +42,13 @@ jobs: CIBW_ENVIRONMENT_MACOS: CMAKE_GENERATOR="Unix Makefiles" CIBW_ENVIRONMENT_WINDOWS: CMAKE_GENERATOR="Visual Studio 17 2022" CMAKE_GENERATOR_PLATFORM=x64 run: | - python -m pip install cibuildwheel + python -m pip install cibuildwheel build python -m cibuildwheel --output-dir wheelhouse - name: Build source if: startsWith(matrix.os, 'ubuntu') run: | - python setup.py sdist --dist-dir=wheelhouse + python -m build --sdist --outdir=wheelhouse - name: Release to pypi if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') From 8a4732b8997812d471e1fbc02b5660166fd0b32d Mon Sep 17 00:00:00 2001 From: Will Shanks Date: Wed, 17 Apr 2024 11:28:17 -0400 Subject: [PATCH 2/3] Update upload-artifact action to v5 (latest) The main upload-artifact action no longer supports merging so the artifacts must be uploaded independently with unique names and merged in a follow up step using subaction from upload-artifact called "merge". --- .github/workflows/build.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3e440ef..f1efc42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,7 +60,19 @@ jobs: twine upload wheelhouse/* - name: Upload artifacts to github - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-${{ matrix.os }} path: ./wheelhouse + + merge_artifacts: + name: Merge wheel artifacts from build_wheels OS matrix jobs + runs-on: ubuntu-latest + needs: build_wheels + steps: + - name: Merge artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: wheels + pattern: wheels-* + delete-merged: true From 742405b3342916ca38c434c276fe19046f8decd1 Mon Sep 17 00:00:00 2001 From: Will Shanks Date: Wed, 17 Apr 2024 11:31:04 -0400 Subject: [PATCH 3/3] Update setup-msbuild action to v2 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1efc42..349db46 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: submodules: 'recursive' - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 + uses: microsoft/setup-msbuild@v2 if: startsWith(matrix.os,'windows') - name: Add Windows SDK