From 74a85091be0e72f9c7db9636772e6228013b05c7 Mon Sep 17 00:00:00 2001 From: Michael-J-Ward Date: Wed, 21 Aug 2024 19:41:23 -0500 Subject: [PATCH 1/5] update actions/upload-artifact from v3 to v4 --- .github/workflows/build.yml | 12 ++++++------ .github/workflows/conda.yml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 350be46d..dd55591c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,7 +51,7 @@ jobs: override: true - name: Generate license file run: python ./dev/create_license.py - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: python-wheel-license path: LICENSE.txt @@ -110,7 +110,7 @@ jobs: run: find target/wheels/ - name: Archive wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dist path: target/wheels/* @@ -162,7 +162,7 @@ jobs: run: find target/wheels/ - name: Archive wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dist path: target/wheels/* @@ -191,7 +191,7 @@ jobs: rustup-components: rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153 args: --release --manylinux 2014 --features protoc,substrait - name: Archive wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dist path: target/wheels/* @@ -221,7 +221,7 @@ jobs: rustup-components: rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153 args: --release --features protoc,substrait - name: Archive wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dist path: target/wheels/* @@ -247,7 +247,7 @@ jobs: rustup-components: rust-std rustfmt args: --release --sdist --out dist --features protoc,substrait - name: Archive wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: dist path: target/wheels/* diff --git a/.github/workflows/conda.yml b/.github/workflows/conda.yml index f25a431c..52888cb1 100644 --- a/.github/workflows/conda.yml +++ b/.github/workflows/conda.yml @@ -101,7 +101,7 @@ jobs: run: | conda mambabuild --test packages/${{ matrix.arch }}/*.tar.bz2 - name: Upload conda packages as artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "conda nightlies (python - ${{ matrix.python }}, arch - ${{ matrix.arch }})" # need to install all conda channel metadata to properly install locally From 68f5aaa3cd629b3ce880cf53317b9c3371b0bb17 Mon Sep 17 00:00:00 2001 From: Michael-J-Ward Date: Wed, 21 Aug 2024 19:42:53 -0500 Subject: [PATCH 2/5] update actions/download-artifact from v3 to v4 --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd55591c..d71f6262 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,7 +84,7 @@ jobs: - run: rm LICENSE.txt - name: Download LICENSE.txt - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: python-wheel-license path: . @@ -145,7 +145,7 @@ jobs: - run: rm LICENSE.txt - name: Download LICENSE.txt - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: python-wheel-license path: . @@ -175,7 +175,7 @@ jobs: - uses: actions/checkout@v4 - run: rm LICENSE.txt - name: Download LICENSE.txt - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: python-wheel-license path: . @@ -204,7 +204,7 @@ jobs: - uses: actions/checkout@v4 - run: rm LICENSE.txt - name: Download LICENSE.txt - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: python-wheel-license path: . @@ -234,7 +234,7 @@ jobs: - uses: actions/checkout@v4 - run: rm LICENSE.txt - name: Download LICENSE.txt - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: python-wheel-license path: . @@ -258,7 +258,7 @@ jobs: # needs: [build-manylinux, build-python-mac-win] # runs-on: ubuntu-latest # steps: - # - uses: actions/download-artifact@v3 + # - uses: actions/download-artifact@v4 # - name: Publish to PyPI # uses: pypa/gh-action-pypi-publish@master # with: From 089448943e71abe37fbb88e90fd5897de4c9c65e Mon Sep 17 00:00:00 2001 From: Michael-J-Ward Date: Wed, 21 Aug 2024 22:24:27 -0500 Subject: [PATCH 3/5] build(dist): each build artifact gets a unique key and merged separately Uploads are now immutable for actions/upload-artifact@v4. This gives each build artifact a unique key, and then merges them together at the end. The [migration guide] suggests this pattern. [migration guide]: https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md#merging-multiple-artifacts --- .github/workflows/build.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d71f6262..690eb14f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -112,7 +112,7 @@ jobs: - name: Archive wheels uses: actions/upload-artifact@v4 with: - name: dist + name: dist-mac-win path: target/wheels/* build-macos-aarch64: @@ -164,7 +164,7 @@ jobs: - name: Archive wheels uses: actions/upload-artifact@v4 with: - name: dist + name: dist-macos-aarch64 path: target/wheels/* build-manylinux: @@ -193,7 +193,7 @@ jobs: - name: Archive wheels uses: actions/upload-artifact@v4 with: - name: dist + name: dist-manylinux path: target/wheels/* build-manylinux-aarch64: @@ -223,7 +223,7 @@ jobs: - name: Archive wheels uses: actions/upload-artifact@v4 with: - name: dist + name: dist-manylinux-aarch64 path: target/wheels/* build-sdist: @@ -249,9 +249,24 @@ jobs: - name: Archive wheels uses: actions/upload-artifact@v4 with: - name: dist + name: dist-sdist path: target/wheels/* - + + merge-build-artifacts: + runs-on: ubuntu-latest + needs: + - build-python-mac-win + - build-macos-aarch64 + - build-manylinux + - build-manylinux-aarch64 + - build-sdist + steps: + - name: Merge Build Artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: dist + pattern: dist-* + # NOTE: PyPI publish needs to be done manually for now after release passed the vote # release: # name: Publish in PyPI From 93bbc687f597b854ea99937591820226fc280b8f Mon Sep 17 00:00:00 2001 From: Michael-J-Ward Date: Wed, 21 Aug 2024 22:59:03 -0500 Subject: [PATCH 4/5] use matrix.os to create unique upload key for build-python-mac-win job --- .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 690eb14f..fa3ce294 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -112,7 +112,7 @@ jobs: - name: Archive wheels uses: actions/upload-artifact@v4 with: - name: dist-mac-win + name: dist-${{ matrix.os }} path: target/wheels/* build-macos-aarch64: From c03e9ef367f43ad285d30c28809ad88020004134 Mon Sep 17 00:00:00 2001 From: Michael-J-Ward Date: Fri, 23 Aug 2024 09:09:12 -0500 Subject: [PATCH 5/5] use manylinux-x86_64 name for consistency with manylinux-aarch64 --- .github/workflows/build.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa3ce294..0b974f2d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -167,7 +167,7 @@ jobs: name: dist-macos-aarch64 path: target/wheels/* - build-manylinux: + build-manylinux-x86_64: needs: [generate-license] name: Manylinux runs-on: ubuntu-latest @@ -193,7 +193,7 @@ jobs: - name: Archive wheels uses: actions/upload-artifact@v4 with: - name: dist-manylinux + name: dist-manylinux-x86_64 path: target/wheels/* build-manylinux-aarch64: @@ -246,18 +246,22 @@ jobs: manylinux: auto rustup-components: rust-std rustfmt args: --release --sdist --out dist --features protoc,substrait - - name: Archive wheels - uses: actions/upload-artifact@v4 - with: - name: dist-sdist - path: target/wheels/* + - name: Assert sdist build does not generate wheels + run: | + if [ "$(ls -A target/wheels)" ]; then + echo "Error: Sdist build generated wheels" + exit 1 + else + echo "Directory is clean" + fi + shell: bash merge-build-artifacts: runs-on: ubuntu-latest needs: - build-python-mac-win - build-macos-aarch64 - - build-manylinux + - build-manylinux-x86_64 - build-manylinux-aarch64 - build-sdist steps: