Skip to content

Commit

Permalink
Bump actions/{upload,download}-artifact to v4 (#11772)
Browse files Browse the repository at this point in the history
This bumps `upload-artifact` and `download-artifact` to version 4.  The
jump from version 3 to version 4 is a major incompatible change,
especially around uploading to an existing artefact, which we do during
our wheel builds.  The new recommended pattern is to use different file
names for each call to `upload-artifact`, and match the download with a
glob match in `download-artifact`.

(cherry picked from commit cc5873d)
  • Loading branch information
jakelishman authored and mergify[bot] committed Feb 26, 2024
1 parent 160f68e commit 19a1c64
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: tox run -e docs

- name: Store built documentation artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: qiskit-docs
path: |
Expand Down
26 changes: 15 additions & 11 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
CIBW_ENVIRONMENT: 'RUSTUP_TOOLCHAIN="stable" RUSTFLAGS="-Cprofile-use=/tmp/pgo-data/merged.profdata -Cllvm-args=-pgo-warn-missing-function"'
CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin" CARGO_NET_GIT_FETCH_WITH_CLI="true" RUSTUP_TOOLCHAIN="stable" RUSTFLAGS="-Cprofile-use=/tmp/pgo-data/merged.profdata -Cllvm-args=-pgo-warn-missing-function"'
CIBW_ENVIRONMENT_WINDOWS: 'RUSTUP_TOOLCHAIN="stable" RUSTFLAGS="-Cprofile-use=c:\\Users\\runneradmin\\merged.profdata -Cllvm-args=-pgo-warn-missing-function"'
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: shared-wheel-builds
name: wheels-${{ matrix.os }}
build_wheels_32bit:
name: Build wheels 32bit
runs-on: ${{ matrix.os }}
Expand All @@ -54,10 +54,10 @@ jobs:
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_SKIP: 'pp* cp36-* cp37-* *musllinux* *amd64 *x86_64'
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: shared-wheel-builds
name: wheels-${{ matrix.os }}-32
build_wheels_macos_arm:
name: Build wheels on macOS arm
runs-on: ${{ matrix.os }}
Expand All @@ -81,10 +81,10 @@ jobs:
CIBW_ENVIRONMENT: >-
CARGO_BUILD_TARGET="aarch64-apple-darwin"
PYO3_CROSS_LIB_DIR="/Library/Frameworks/Python.framework/Versions/$(python -c 'import sys; print(str(sys.version_info[0])+"."+str(sys.version_info[1]))')/lib/python$(python -c 'import sys; print(str(sys.version_info[0])+"."+str(sys.version_info[1]))')"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: shared-wheel-builds
name: wheels-${{ matrix.os }}-arm
upload_shared_wheels:
name: Upload shared build wheels
runs-on: ubuntu-latest
Expand All @@ -93,9 +93,10 @@ jobs:
id-token: write
needs: ["build_wheels", "build_wheels_macos_arm", "build_wheels_32bit"]
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: shared-wheel-builds
pattern: 'wheels-*'
merge-multiple: true
path: deploy
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down Expand Up @@ -127,8 +128,9 @@ jobs:
env:
CIBW_ARCHS_LINUX: s390x
CIBW_TEST_SKIP: "cp*"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-s390x
path: ./wheelhouse/*.whl
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down Expand Up @@ -160,8 +162,9 @@ jobs:
env:
CIBW_ARCHS_LINUX: ppc64le
CIBW_TEST_SKIP: "cp*"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-ppc64le
path: ./wheelhouse/*.whl
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down Expand Up @@ -192,8 +195,9 @@ jobs:
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ARCHS_LINUX: aarch64
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-aarch64
path: ./wheelhouse/*.whl
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down

0 comments on commit 19a1c64

Please sign in to comment.