-
-
Notifications
You must be signed in to change notification settings - Fork 445
56 lines (46 loc) · 1.84 KB
/
Copy pathbenchmark_phpunit.yaml
File metadata and controls
56 lines (46 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Benchmark PHPUnit
# A/B wall-time benchmark: serial phpunit vs the Go parallel runner.
# Scheduled only (not on pull requests); runs every 2 hours on ubuntu + windows.
# Reminder: cron fires only from the default branch, so this starts running
# once the file is on `main`.
on:
schedule:
- cron: '0 */2 * * *'
workflow_dispatch: null
env:
COMPOSER_ROOT_VERSION: "dev-main"
jobs:
benchmark:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
php-versions: ['8.4', '8.5']
runs-on: ${{ matrix.os }}
timeout-minutes: 15
name: benchmark (${{ matrix.os }})
steps:
- uses: actions/checkout@v5
-
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
ini-values: zend.assertions=1
- uses: "ramsey/composer-install@v4"
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Serial phpunit
shell: bash
run: |
printf '| platform | php | mode | wall time |\n| --- | --- | --- | --- |\n' >> "$GITHUB_STEP_SUMMARY"
start=$SECONDS
vendor/bin/phpunit
echo "| ${{ matrix.os }} | ${{ matrix.php-versions }} | serial | $((SECONDS - start))s |" >> "$GITHUB_STEP_SUMMARY"
- name: Go parallel runner
shell: bash
run: |
start=$SECONDS
go run ./utils-tests-runner/main.go
echo "| ${{ matrix.os }} | ${{ matrix.php-versions }} | go-runner | $((SECONDS - start))s |" >> "$GITHUB_STEP_SUMMARY"