File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : CI - Perf
22
3+ # EXPERIMENTAL: This workflow is running with --tolerate-failure flag for phpbench
4+ # This is to gather data for a future historical interleaving of performance benchmarks.
5+
36on :
7+ # Run once per day no matter what
8+ schedule :
9+ - cron : ' 0 0 * * *'
10+ # Run on push to main, so we get a data point every merge
411 push :
5- paths :
6- - ' src/**'
7- - ' tests/**'
8- - ' .github/**'
9- pull_request :
10- paths :
11- - ' src/**'
12- - ' tests/**'
13- - ' .github/**'
12+ branches :
13+ - main
14+ # Allow manual triggering with rebaseline option
1415 workflow_dispatch :
1516 inputs :
1617 baseline :
2627 name : Benchmarks
2728 runs-on : ubuntu-latest
2829
29- continue-on-error : true # This job is experimental
3030 permissions :
3131 contents : write
32- pull-requests : write
3332
3433 steps :
3534 - uses : actions/checkout@v6
5150 if [ -z "$(ls -A .phpbench)" ] || [ "${{ github.event.inputs.baseline || 'latest' }}" = "rebaseline" ]; then
5251 vendor/bin/phpbench run --report=aggregate --progress=plain --store --tag=${GITHUB_SHA}
5352
54- # On main branch push, update baseline with tolerance for failures .
55- elif [ "${GITHUB_REF}" = "refs/heads/main" ] && [ "${GITHUB_EVENT_NAME}" = "push" ]; then
53+ # Baseline exists. Compare against it .
54+ else
5655 vendor/bin/phpbench run --report=aggregate --progress=plain --store --tag=${GITHUB_SHA} --ref=latest --tolerate-failure
57-
58- # On other branches, compare against latest baseline, fails if worse.
59- else
60- vendor/bin/phpbench run --report=aggregate --progress=plain --store --tag=${GITHUB_SHA} --ref=latest
6156 fi
6257
6358 # Generate report for human consumption
6762 cat report.md
6863
6964 - name : Commit Results
70- if : github.ref == 'refs/heads/main' && github.event_name == 'push'
65+ if : ( github.ref == 'refs/heads/main' && github.event_name == 'push') || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch '
7166 run : |
7267 set -euo pipefail
7368 git config user.name "github-actions[bot]"
You can’t perform that action at this time.
0 commit comments