From 279abdb630b9ae5601b210d6d355b7cc2c69252d Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Tue, 24 Sep 2024 22:16:01 +0200 Subject: [PATCH 1/2] bump artifact upload/download actions versions --- .github/workflows/readme_listings.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/readme_listings.yml b/.github/workflows/readme_listings.yml index 6763a829..22f645fe 100644 --- a/.github/workflows/readme_listings.yml +++ b/.github/workflows/readme_listings.yml @@ -36,7 +36,7 @@ jobs: - uses: julia-actions/setup-julia@v1 - run: mkdir readme_output - run: julia readme.jl > readme_output/julia.txt - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: readme_output path: readme_output @@ -63,7 +63,7 @@ jobs: - run: mkdir readme_output - run: python -We readme.py > readme_output/python.txt - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: readme_output path: readme_output @@ -90,7 +90,7 @@ jobs: cd readme_fortran ./build/main > ../readme_output/fortran.txt - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: readme_output path: readme_output @@ -101,7 +101,7 @@ jobs: steps: - uses: actions/setup-python@v2 - run: pip install numpy - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: readme_output path: readme_output @@ -148,7 +148,7 @@ jobs: startup-options: -nojvm command: diary('readme_output/matlab.txt'), readme - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: readme_output path: readme_output From 612059a85775f4103edb7cdaada07a2704bc5993 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Wed, 25 Sep 2024 16:05:41 +0200 Subject: [PATCH 2/2] merge-multiple and pattern options for artifact actions --- .github/workflows/readme_listings.yml | 11 ++++++----- .github/workflows/tests+pypi.yml | 14 ++++++++------ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/readme_listings.yml b/.github/workflows/readme_listings.yml index 22f645fe..7ba93344 100644 --- a/.github/workflows/readme_listings.yml +++ b/.github/workflows/readme_listings.yml @@ -38,7 +38,7 @@ jobs: - run: julia readme.jl > readme_output/julia.txt - uses: actions/upload-artifact@v4 with: - name: readme_output + name: readme_output-julia path: readme_output python: @@ -65,7 +65,7 @@ jobs: - run: python -We readme.py > readme_output/python.txt - uses: actions/upload-artifact@v4 with: - name: readme_output + name: readme_output-python path: readme_output fortran: @@ -92,7 +92,7 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: readme_output + name: readme_output-fortran path: readme_output assert: @@ -103,7 +103,8 @@ jobs: - run: pip install numpy - uses: actions/download-artifact@v4 with: - name: readme_output + pattern: readme_output-* + merge-multiple: true path: readme_output - run : python -c 'import numpy as np; import os; dir="readme_output/"; data=[float(np.loadtxt(dir+file)) for file in os.listdir(dir)]; print("data:", data); similar_as_first = np.array([abs(data[0]-k)/data[0] for k in data[1:]]); print("similar_as_first", similar_as_first); assert((similar_as_first < .5).all())' @@ -150,6 +151,6 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: readme_output + name: readme_output-matlab path: readme_output diff --git a/.github/workflows/tests+pypi.yml b/.github/workflows/tests+pypi.yml index 8f832c7b..54080396 100644 --- a/.github/workflows/tests+pypi.yml +++ b/.github/workflows/tests+pypi.yml @@ -179,9 +179,9 @@ jobs: - if: matrix.platform == 'ubuntu-latest' run: rm dist/*-linux_* - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: - name: dist + name: dist-${{platform}}-${{manylinux}}-${{python-version}} path: dist - env: @@ -219,9 +219,10 @@ jobs: with: python-version: "3.11" - run: pip install twine auditwheel - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: - name: dist + pattern: dist-* + merge-multiple: true path: dist - run: twine check --strict dist/* - run: for i in dist/*-manylinux*.whl; do auditwheel show $i; done; @@ -232,9 +233,10 @@ jobs: permissions: id-token: write steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: - name: dist + pattern: dist-* + merge-multiple: true path: dist - if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: pypa/gh-action-pypi-publish@unstable/v1