Skip to content

Commit ddcb597

Browse files
committed
ci: use hetzner for 2e2 regression perf
1 parent 9c75f29 commit ddcb597

File tree

1 file changed

+17
-53
lines changed

1 file changed

+17
-53
lines changed

.github/workflows/e2e-test.yml

Lines changed: 17 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- uses: ./.github/actions/install
5656

5757
- name: zig build release
58-
run: zig build -Doptimize=ReleaseFast -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
58+
run: zig build -Doptimize=ReleaseFast -Dcpu=x86_64 -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
5959

6060
- name: upload artifact
6161
uses: actions/upload-artifact@v4
@@ -65,56 +65,6 @@ jobs:
6565
zig-out/bin/lightpanda
6666
retention-days: 1
6767

68-
puppeteer-perf:
69-
name: puppeteer-perf
70-
needs: zig-build-release
71-
72-
env:
73-
MAX_MEMORY: 30000
74-
MAX_AVG_DURATION: 24
75-
LIGHTPANDA_DISABLE_TELEMETRY: true
76-
77-
runs-on: ubuntu-latest
78-
timeout-minutes: 15
79-
80-
steps:
81-
- uses: actions/checkout@v4
82-
with:
83-
repository: 'lightpanda-io/demo'
84-
fetch-depth: 0
85-
86-
- run: npm install
87-
88-
- name: download artifact
89-
uses: actions/download-artifact@v4
90-
with:
91-
name: lightpanda-build-release
92-
93-
- run: chmod a+x ./lightpanda
94-
95-
- name: run puppeteer
96-
run: |
97-
python3 -m http.server 1234 -d ./public & echo $! > PYTHON.pid
98-
./lightpanda serve & echo $! > LPD.pid
99-
RUNS=100 npm run bench-puppeteer-cdp > puppeteer.out || exit 1
100-
cat /proc/`cat LPD.pid`/status |grep VmHWM|grep -oP '\d+' > LPD.VmHWM
101-
kill `cat LPD.pid` `cat PYTHON.pid`
102-
103-
- name: puppeteer result
104-
run: cat puppeteer.out
105-
106-
- name: memory regression
107-
run: |
108-
export LPD_VmHWM=`cat LPD.VmHWM`
109-
echo "Peak resident set size: $LPD_VmHWM"
110-
test "$LPD_VmHWM" -le "$MAX_MEMORY"
111-
112-
- name: duration regression
113-
run: |
114-
export PUPPETEER_AVG_DURATION=`cat puppeteer.out|grep 'avg run'|sed 's/avg run duration (ms) //'`
115-
echo "puppeteer avg duration: $PUPPETEER_AVG_DURATION"
116-
test "$PUPPETEER_AVG_DURATION" -le "$MAX_AVG_DURATION"
117-
11868
demo-scripts:
11969
name: demo-scripts
12070
needs: zig-build-release
@@ -147,8 +97,10 @@ jobs:
14797
name: cdp-and-hyperfine-bench
14898
needs: zig-build-release
14999

150-
# Don't execute on PR
151-
if: github.event_name != 'pull_request'
100+
env:
101+
MAX_MEMORY: 27000
102+
MAX_AVG_DURATION: 23
103+
LIGHTPANDA_DISABLE_TELEMETRY: true
152104

153105
# use a self host runner.
154106
runs-on: lpd-bench-hetzner
@@ -185,6 +137,18 @@ jobs:
185137
- name: puppeteer result
186138
run: cat puppeteer.out
187139

140+
- name: memory regression
141+
run: |
142+
export LPD_VmHWM=`cat LPD.VmHWM`
143+
echo "Peak resident set size: $LPD_VmHWM"
144+
test "$LPD_VmHWM" -le "$MAX_MEMORY"
145+
146+
- name: duration regression
147+
run: |
148+
export PUPPETEER_AVG_DURATION=`cat puppeteer.out|grep 'avg run'|sed 's/avg run duration (ms) //'`
149+
echo "puppeteer avg duration: $PUPPETEER_AVG_DURATION"
150+
test "$PUPPETEER_AVG_DURATION" -le "$MAX_AVG_DURATION"
151+
188152
- name: json output
189153
run: |
190154
export AVG_DURATION=`cat puppeteer.out|grep 'avg run'|sed 's/avg run duration (ms) //'`

0 commit comments

Comments
 (0)