Skip to content

Commit

Permalink
[CI] Only upload stats when actually building something
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkak committed Apr 16, 2024
1 parent fdf3309 commit be76b8a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/base-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -517,11 +517,11 @@ jobs:
name: win-test-reports-native-${{matrix.category}}-${{ needs.get-test-matrix.outputs.artifacts-suffix }}
path: 'test-reports.tgz'
- name: Collect build JSON stats
if: ${{ always() && inputs.build-stats-tag != 'null' }}
if: ${{ startsWith(matrix.os-name, 'windows') && inputs.build-stats-tag != 'null' }}
shell: bash
run: find . -name '*runner*.json' | tar czvf build-stats.tgz -T -
- name: Upload build JSON stats
if: ${{ always() && inputs.build-stats-tag != 'null' }}
if: ${{ startsWith(matrix.os-name, 'windows') && inputs.build-stats-tag != 'null' }}
uses: actions/upload-artifact@v4
with:
name: build-stats-${{matrix.category}}-${{ needs.get-test-matrix.outputs.artifacts-suffix }}
Expand All @@ -539,15 +539,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: startsWith(matrix.os-name, 'windows')
with:
repository: graalvm/mandrel
fetch-depth: 1
path: workflow-mandrel
- uses: actions/download-artifact@v4
if: startsWith(matrix.os-name, 'windows')
with:
name: build-stats-${{matrix.category}}-${{ needs.get-test-matrix.outputs.artifacts-suffix }}
path: .
- name: Extract and import build stats
if: startsWith(matrix.os-name, 'windows')
env:
UPLOAD_TOKEN: ${{ secrets.UPLOAD_COLLECTOR_TOKEN }}
shell: bash
Expand Down

0 comments on commit be76b8a

Please sign in to comment.