Skip to content

Commit

Permalink
Only upload benchmarks result from main branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
1pkg committed Aug 21, 2024
1 parent f0b9ecd commit f77b98c
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,20 @@ jobs:
- name: Run benchmarks autotuned
if: ${{ inputs.benchmarkAgents == '' }}
run: make run-benchmark-autotuned index-benchmark-results
run: make run-benchmark-autotuned

- name: Run benchmarks self tuned
if: ${{ inputs.benchmarkAgents != '' }}
run: make run-benchmark index-benchmark-results
run: make run-benchmark

# Results are only indexed and uploaded if the run happens on the main branch.

- name: Index benchmarks result
if: github.ref == 'refs/heads/main'
run: make index-benchmark-results

- name: Download PNG
if: github.ref == 'refs/heads/main'
run: >-
${{ github.workspace }}/.ci/scripts/download-png-from-kibana.sh
${{ secrets.KIBANA_BENCH_ENDPOINT }}
Expand All @@ -134,13 +141,15 @@ jobs:
$PNG_REPORT_FILE
- name: Upload PNG
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: kibana-png-report
path: ${{ env.WORKING_DIRECTORY }}/${{ env.PNG_REPORT_FILE }}
if-no-files-found: error

- name: Upload PNG to AWS S3
if: github.ref == 'refs/heads/main'
id: s3-upload-png
env:
AWS_DEFAULT_REGION: us-east-1
Expand All @@ -150,8 +159,8 @@ jobs:
echo "png_report_url=https://elastic-apm-server-benchmark-reports.s3.amazonaws.com/${DEST_NAME}" >> "$GITHUB_OUTPUT"
- name: Upload benchmark result
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
if: always()
with:
name: benchmark-result
path: ${{ env.WORKING_DIRECTORY }}/${{ env.BENCHMARK_RESULT }}
Expand Down

0 comments on commit f77b98c

Please sign in to comment.