This is an automated email from the ASF dual-hosted git repository.

agrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-python.git


The following commit(s) were added to refs/heads/main by this push:
     new 22c70ef  build(deps): upgrade actions/{upload,download}-artifact@v3 to 
v4 (#829)
22c70ef is described below

commit 22c70ef55fb56e38d9f4465b974b33b3685a6a40
Author: Michael J Ward <[email protected]>
AuthorDate: Fri Aug 23 14:30:52 2024 -0500

    build(deps): upgrade actions/{upload,download}-artifact@v3 to v4 (#829)
    
    * update actions/upload-artifact from v3 to v4
    
    * update actions/download-artifact from v3 to v4
    
    * 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
    
    * use matrix.os to create unique upload key for build-python-mac-win job
    
    * use manylinux-x86_64 name for consistency with manylinux-aarch64
---
 .github/workflows/build.yml | 59 ++++++++++++++++++++++++++++++---------------
 .github/workflows/conda.yml |  2 +-
 2 files changed, 40 insertions(+), 21 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 350be46..0b974f2 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
@@ -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: .
@@ -110,9 +110,9 @@ jobs:
         run: find target/wheels/
 
       - name: Archive wheels
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
-          name: dist
+          name: dist-${{ matrix.os  }}
           path: target/wheels/*
 
   build-macos-aarch64:
@@ -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: .
@@ -162,12 +162,12 @@ jobs:
         run: find target/wheels/
 
       - name: Archive wheels
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
-          name: dist
+          name: dist-macos-aarch64
           path: target/wheels/*
 
-  build-manylinux:
+  build-manylinux-x86_64:
     needs: [generate-license]
     name: Manylinux
     runs-on: ubuntu-latest
@@ -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: .
@@ -191,9 +191,9 @@ 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
+          name: dist-manylinux-x86_64
           path: target/wheels/*
 
   build-manylinux-aarch64:
@@ -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: .
@@ -221,9 +221,9 @@ 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
+          name: dist-manylinux-aarch64
           path: target/wheels/*
 
   build-sdist:
@@ -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: .
@@ -246,19 +246,38 @@ jobs:
           manylinux: auto
           rustup-components: rust-std rustfmt
           args: --release --sdist --out dist --features protoc,substrait
-      - name: Archive wheels
-        uses: actions/upload-artifact@v3
+      - 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-x86_64
+      - build-manylinux-aarch64
+      - build-sdist
+    steps:
+      - name: Merge Build Artifacts
+        uses: actions/upload-artifact/merge@v4
         with:
           name: dist
-          path: target/wheels/*
-
+          pattern: dist-*
+  
   # NOTE: PyPI publish needs to be done manually for now after release passed 
the vote
   # release:
   #   name: Publish in PyPI
   #   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:
diff --git a/.github/workflows/conda.yml b/.github/workflows/conda.yml
index f25a431..52888cb 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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to