From 04b0fab8c232b06363178fe5b4f2ae72a3b0155c Mon Sep 17 00:00:00 2001 From: Mirko Galimberti Date: Wed, 1 May 2024 19:36:02 +0200 Subject: [PATCH] Make proper changes for `action/upload-artifact@v4` (wheels) (#8712) * Make proper changes for action/upload-artifact@v4 in windows_wheels * Add comment about sdist and avoid downloading all the wheels when testing * Fix upload/download locations also for manylinux and rpi * kivy-examples are needed * Use a valid name for armv7l_wheels --- .github/workflows/manylinux_wheels.yml | 8 +++++--- .github/workflows/rpi_wheels.yml | 8 ++++---- .github/workflows/windows_wheels.yml | 17 +++++++++++++---- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/manylinux_wheels.yml b/.github/workflows/manylinux_wheels.yml index 23d6130f8..0d4627de5 100644 --- a/.github/workflows/manylinux_wheels.yml +++ b/.github/workflows/manylinux_wheels.yml @@ -84,7 +84,7 @@ jobs: - name: Upload wheels as artifact uses: actions/upload-artifact@v4 with: - name: manylinux_wheels + name: manylinux_wheels-${{ matrix.cibw_archs }} path: ./wheelhouse/*.whl manylinux_wheel_upload: @@ -99,7 +99,8 @@ jobs: python-version: 3.x - uses: actions/download-artifact@v4 with: - name: manylinux_wheels + pattern: manylinux_wheels-* + merge-multiple: true path: dist - name: Rename wheels if: github.event.ref_type != 'tag' @@ -143,7 +144,8 @@ jobs: python-version: ${{ matrix.python }} - uses: actions/download-artifact@v4 with: - name: manylinux_wheels + pattern: manylinux_wheels-* + merge-multiple: true path: dist - name: Setup env run: | diff --git a/.github/workflows/rpi_wheels.yml b/.github/workflows/rpi_wheels.yml index 44850a371..fa5323da2 100644 --- a/.github/workflows/rpi_wheels.yml +++ b/.github/workflows/rpi_wheels.yml @@ -16,17 +16,17 @@ jobs: if: github.event_name == 'schedule' || (github.event_name == 'create' && github.event.ref_type == 'tag') || contains(github.event.head_commit.message, '[build wheel]') || contains(github.event.head_commit.message, '[build wheel armv7l]') || contains(github.event.pull_request.title, '[build wheel]') || contains(github.event.pull_request.title, '[build wheel armv7l]') strategy: matrix: - docker_images: ['balenalib/raspberrypi3-debian-python:3.9-bullseye', 'balenalib/raspberrypi3-debian-python:3.11-bookworm'] + image_version: ['3.9-bullseye', '3.11-bookworm'] steps: - uses: actions/checkout@v4 - name: Generate version metadata run: | source .ci/ubuntu_ci.sh update_version_metadata - - name: Make ${{ matrix.docker_images }} wheel + - name: Make ${{ matrix.image_version }} wheel run: | source .ci/ubuntu_ci.sh - generate_rpi_wheels ${{ matrix.docker_images }} + generate_rpi_wheels balenalib/raspberrypi3-debian-python:${{ matrix.image_version }} - name: Rename wheels if: github.event.ref_type != 'tag' run: | @@ -43,7 +43,7 @@ jobs: uses: actions/upload-artifact@v4 if: github.event_name == 'pull_request' with: - name: armv7l_wheels + name: armv7l_wheels-${{ matrix.image_version }} path: dist - name: Upload to GitHub Release uses: softprops/action-gh-release@v2.0.4 diff --git a/.github/workflows/windows_wheels.yml b/.github/workflows/windows_wheels.yml index 354dc7a88..f677cdcb0 100644 --- a/.github/workflows/windows_wheels.yml +++ b/.github/workflows/windows_wheels.yml @@ -50,7 +50,7 @@ jobs: - name: Upload wheels as artifact uses: actions/upload-artifact@v4 with: - name: windows_wheels + name: windows_wheels-${{ matrix.python }}-${{ matrix.arch }} path: dist windows_wheel_upload: @@ -65,7 +65,8 @@ jobs: python-version: 3.x - uses: actions/download-artifact@v4 with: - name: windows_wheels + pattern: windows_wheels-*-* + merge-multiple: true path: dist - name: Fix wheel names if: github.event.ref_type != 'tag' @@ -113,7 +114,11 @@ jobs: architecture: ${{ matrix.arch }} - uses: actions/download-artifact@v4 with: - name: windows_wheels + # Only one windows_wheels-*-* artifact contains the kivy-examples + # However, all artifacts are downloaded ATM, to avoid using + # a specific name. + pattern: windows_wheels-*-* + merge-multiple: true path: dist - name: Install Kivy Wheel run: | @@ -145,7 +150,11 @@ jobs: python-version: 3.x - uses: actions/download-artifact@v4 with: - name: windows_wheels + # Only one windows_wheels-*-* artifact contains the sdist + # However, all artifacts are downloaded ATM, to avoid using + # a specific name. + pattern: windows_wheels-*-* + merge-multiple: true path: dist - name: Install Kivy sdist env: