Skip to content

Commit

Permalink
ci: Merge upload actions to fix usage in v4 (#4515)
Browse files Browse the repository at this point in the history
* ci: Merge upload actions to avoid issues

* ci: Ensure bench reports are uploaded w/ unique names

* ci: Fix artifact names

* ci: Access name for result correctly
  • Loading branch information
rschristian authored Oct 1, 2024
1 parent 9d3a4f5 commit 6a66daa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,20 @@ jobs:
with:
name: npm-package
- run: mv preact.tgz preact-local.tgz
- name: Upload locally built preact package
uses: actions/upload-artifact@v4
with:
name: bench-environment
path: preact-local.tgz
- name: Download base package
uses: andrewiggins/download-base-artifact@v3
with:
artifact: npm-package
workflow: ci.yml
required: false
- run: mv preact.tgz preact-main.tgz
- name: Upload base preact package
- name: Upload locally build & base preact package
uses: actions/upload-artifact@v4
with:
name: bench-environment
path: preact-main.tgz
path: |
preact-local.tgz
preact-main.tgz
bench_todo:
name: Bench todo
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/run-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,12 @@ jobs:
id: log-artifact-name
run: |
NAME=$(echo "${{ inputs.benchmark }}" | sed -r 's/[\/]+/_/g')
echo "clean_name=$NAME" >> $GITHUB_OUTPUT
echo "artifact_name=logs_$NAME" >> $GITHUB_OUTPUT
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: results
name: results-${{ steps.log-artifact-name.outputs.clean_name }}
path: benchmarks/out/results/${{ inputs.benchmark }}.json
- name: Upload logs
uses: actions/upload-artifact@v4
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/single-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ jobs:
with:
name: npm-package
- run: mv preact.tgz preact-local.tgz
- name: Upload locally built preact package
uses: actions/upload-artifact@v4
with:
name: bench-environment
path: preact-local.tgz
- name: Clear working directory
run: |
ls -al
Expand All @@ -77,11 +72,13 @@ jobs:
with:
name: base-npm-package
- run: mv preact.tgz preact-main.tgz
- name: Upload base preact package
- name: Upload locally built & base preact package
uses: actions/upload-artifact@v4
with:
name: bench-environment
path: preact-main.tgz
path: |
preact-local.tgz
preact-main.tgz
benchmark:
name: Bench ${{ inputs.benchmark }}
Expand Down

0 comments on commit 6a66daa

Please sign in to comment.