mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 22:53:28 +00:00
ci: use hetzner for 2e2 regression perf
This commit is contained in:
70
.github/workflows/e2e-test.yml
vendored
70
.github/workflows/e2e-test.yml
vendored
@@ -55,7 +55,7 @@ jobs:
|
|||||||
- uses: ./.github/actions/install
|
- uses: ./.github/actions/install
|
||||||
|
|
||||||
- name: zig build release
|
- name: zig build release
|
||||||
run: zig build -Doptimize=ReleaseFast -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
|
run: zig build -Doptimize=ReleaseFast -Dcpu=x86_64 -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
|
||||||
|
|
||||||
- name: upload artifact
|
- name: upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@@ -65,56 +65,6 @@ jobs:
|
|||||||
zig-out/bin/lightpanda
|
zig-out/bin/lightpanda
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
puppeteer-perf:
|
|
||||||
name: puppeteer-perf
|
|
||||||
needs: zig-build-release
|
|
||||||
|
|
||||||
env:
|
|
||||||
MAX_MEMORY: 30000
|
|
||||||
MAX_AVG_DURATION: 24
|
|
||||||
LIGHTPANDA_DISABLE_TELEMETRY: true
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 15
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: 'lightpanda-io/demo'
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- run: npm install
|
|
||||||
|
|
||||||
- name: download artifact
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: lightpanda-build-release
|
|
||||||
|
|
||||||
- run: chmod a+x ./lightpanda
|
|
||||||
|
|
||||||
- name: run puppeteer
|
|
||||||
run: |
|
|
||||||
python3 -m http.server 1234 -d ./public & echo $! > PYTHON.pid
|
|
||||||
./lightpanda serve & echo $! > LPD.pid
|
|
||||||
RUNS=100 npm run bench-puppeteer-cdp > puppeteer.out || exit 1
|
|
||||||
cat /proc/`cat LPD.pid`/status |grep VmHWM|grep -oP '\d+' > LPD.VmHWM
|
|
||||||
kill `cat LPD.pid` `cat PYTHON.pid`
|
|
||||||
|
|
||||||
- name: puppeteer result
|
|
||||||
run: cat puppeteer.out
|
|
||||||
|
|
||||||
- name: memory regression
|
|
||||||
run: |
|
|
||||||
export LPD_VmHWM=`cat LPD.VmHWM`
|
|
||||||
echo "Peak resident set size: $LPD_VmHWM"
|
|
||||||
test "$LPD_VmHWM" -le "$MAX_MEMORY"
|
|
||||||
|
|
||||||
- name: duration regression
|
|
||||||
run: |
|
|
||||||
export PUPPETEER_AVG_DURATION=`cat puppeteer.out|grep 'avg run'|sed 's/avg run duration (ms) //'`
|
|
||||||
echo "puppeteer avg duration: $PUPPETEER_AVG_DURATION"
|
|
||||||
test "$PUPPETEER_AVG_DURATION" -le "$MAX_AVG_DURATION"
|
|
||||||
|
|
||||||
demo-scripts:
|
demo-scripts:
|
||||||
name: demo-scripts
|
name: demo-scripts
|
||||||
needs: zig-build-release
|
needs: zig-build-release
|
||||||
@@ -147,8 +97,10 @@ jobs:
|
|||||||
name: cdp-and-hyperfine-bench
|
name: cdp-and-hyperfine-bench
|
||||||
needs: zig-build-release
|
needs: zig-build-release
|
||||||
|
|
||||||
# Don't execute on PR
|
env:
|
||||||
if: github.event_name != 'pull_request'
|
MAX_MEMORY: 27000
|
||||||
|
MAX_AVG_DURATION: 23
|
||||||
|
LIGHTPANDA_DISABLE_TELEMETRY: true
|
||||||
|
|
||||||
# use a self host runner.
|
# use a self host runner.
|
||||||
runs-on: lpd-bench-hetzner
|
runs-on: lpd-bench-hetzner
|
||||||
@@ -185,6 +137,18 @@ jobs:
|
|||||||
- name: puppeteer result
|
- name: puppeteer result
|
||||||
run: cat puppeteer.out
|
run: cat puppeteer.out
|
||||||
|
|
||||||
|
- name: memory regression
|
||||||
|
run: |
|
||||||
|
export LPD_VmHWM=`cat LPD.VmHWM`
|
||||||
|
echo "Peak resident set size: $LPD_VmHWM"
|
||||||
|
test "$LPD_VmHWM" -le "$MAX_MEMORY"
|
||||||
|
|
||||||
|
- name: duration regression
|
||||||
|
run: |
|
||||||
|
export PUPPETEER_AVG_DURATION=`cat puppeteer.out|grep 'avg run'|sed 's/avg run duration (ms) //'`
|
||||||
|
echo "puppeteer avg duration: $PUPPETEER_AVG_DURATION"
|
||||||
|
test "$PUPPETEER_AVG_DURATION" -le "$MAX_AVG_DURATION"
|
||||||
|
|
||||||
- name: json output
|
- name: json output
|
||||||
run: |
|
run: |
|
||||||
export AVG_DURATION=`cat puppeteer.out|grep 'avg run'|sed 's/avg run duration (ms) //'`
|
export AVG_DURATION=`cat puppeteer.out|grep 'avg run'|sed 's/avg run duration (ms) //'`
|
||||||
|
|||||||
Reference in New Issue
Block a user