overhead-benchmark-daily.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. name: Overhead benchmark (daily)
  2. on:
  3. schedule:
  4. # daily at 5:00 UTC
  5. - cron: "0 5 * * *"
  6. workflow_dispatch:
  7. jobs:
  8. run-overhead-tests:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
  12. - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
  13. with:
  14. ref: gh-pages
  15. path: gh-pages
  16. - name: Free disk space
  17. run: .github/scripts/gha-free-disk-space.sh
  18. - name: Copy results from gh-pages branch
  19. run: |
  20. rsync -avv gh-pages/benchmark-overhead/results/ benchmark-overhead/results/
  21. - name: Setup Gradle
  22. uses: gradle/actions/setup-gradle@d9336dac04dea2507a617466bc058a3def92b18b # v3.4.0
  23. - name: Run tests
  24. working-directory: benchmark-overhead
  25. run: ./gradlew test
  26. - name: Inspect the results dir
  27. working-directory: benchmark-overhead
  28. run: ls -lR results
  29. - name: Copy results back to gh-pages branch
  30. run: rsync -avv benchmark-overhead/results/ gh-pages/benchmark-overhead/results/ && rm -rf benchmark-overhead/results
  31. - name: Commit updated results
  32. uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
  33. with:
  34. add: "benchmark-overhead/results"
  35. cwd: "./gh-pages"
  36. branch: "gh-pages"
  37. message: "update test result data"
  38. author_name: opentelemetrybot
  39. author_email: 107717825+opentelemetrybot@users.noreply.github.com
  40. committer_name: opentelemetrybot
  41. committer_email: 107717825+opentelemetrybot@users.noreply.github.com
  42. workflow-notification:
  43. needs:
  44. - run-overhead-tests
  45. if: always()
  46. uses: ./.github/workflows/reusable-workflow-notification.yml
  47. with:
  48. success: ${{ needs.run-overhead-tests.result == 'success' }}