Skip to content

Commit

Permalink
gha: Merge artifacts on download
Browse files Browse the repository at this point in the history
Turns out major versions break things.

Old behavior: Artifacts with same name are merged
New behavior: Artifacts with same name error

Using a pattern and merging on download should fix this at least on the
job-side. Though I do wonder if we'll start running into artifact limit
issues with the new way artifacts are handled...
  • Loading branch information
geky committed Sep 20, 2024
1 parent 72a4b57 commit 2c4b262
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,29 @@ jobs:
fetch-depth: 0

# try to get results from tests
- uses: dawidd6/action-download-artifact@v2
- uses: dawidd6/action-download-artifact@v6
continue-on-error: true
with:
workflow: ${{github.event.workflow_run.name}}
run_id: ${{github.event.workflow_run.id}}
name: sizes
pattern: '{sizes,sizes-*}'
merge-multiple: true
path: sizes
- uses: dawidd6/action-download-artifact@v2
- uses: dawidd6/action-download-artifact@v6
continue-on-error: true
with:
workflow: ${{github.event.workflow_run.name}}
run_id: ${{github.event.workflow_run.id}}
name: cov
pattern: '{cov,cov-*}'
merge-multiple: true
path: cov
- uses: dawidd6/action-download-artifact@v2
- uses: dawidd6/action-download-artifact@v6
continue-on-error: true
with:
workflow: ${{github.event.workflow_run.name}}
run_id: ${{github.event.workflow_run.id}}
name: bench
pattern: '{bench,bench-*}'
merge-multiple: true
path: bench

- name: find-version
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ jobs:
status:
runs-on: ubuntu-latest
steps:
- uses: dawidd6/action-download-artifact@v2
- uses: dawidd6/action-download-artifact@v6
continue-on-error: true
with:
workflow: ${{github.event.workflow_run.name}}
run_id: ${{github.event.workflow_run.id}}
name: status
pattern: '{status,status-*}'
merge-multiple: true
path: status
- name: update-status
continue-on-error: true
Expand Down Expand Up @@ -67,12 +68,13 @@ jobs:

steps:
# generated comment?
- uses: dawidd6/action-download-artifact@v2
- uses: dawidd6/action-download-artifact@v6
continue-on-error: true
with:
workflow: ${{github.event.workflow_run.name}}
run_id: ${{github.event.workflow_run.id}}
name: comment
pattern: '{comment,comment-*}'
merge-multiple: true
path: comment
- name: update-comment
continue-on-error: true
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -709,19 +709,22 @@ jobs:
if: ${{github.event_name == 'pull_request'}}
continue-on-error: true
with:
name: sizes-x86_64
pattern: '{sizes,sizes-*}'
merge-multiple: true
path: sizes
- uses: actions/download-artifact@v4.1.8
if: ${{github.event_name == 'pull_request'}}
continue-on-error: true
with:
name: cov
pattern: '{cov,cov-*}'
merge-multiple: true
path: cov
- uses: actions/download-artifact@v4.1.8
if: ${{github.event_name == 'pull_request'}}
continue-on-error: true
with:
name: bench
pattern: '{bench,bench-*}'
merge-multiple: true
path: bench

# try to find results from tests
Expand Down

0 comments on commit 2c4b262

Please sign in to comment.