mirror of
https://github.com/VibedByKaKi/commet.git
synced 2026-11-10 16:52:52 +01:00
Drop find|head under pipefail, and replace deprecated upload-artifact@v3 in integration-test and benchmark. Co-authored-by: Cursor <cursoragent@cursor.com>
78 lines
No EOL
2.3 KiB
YAML
78 lines
No EOL
2.3 KiB
YAML
on:
|
|
merge_group:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
name: benchmark
|
|
|
|
permissions:
|
|
contents: write
|
|
deployments: write
|
|
|
|
env:
|
|
PROJECT_PATH: commet
|
|
|
|
jobs:
|
|
benchmark:
|
|
name: benchmark
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'true'
|
|
|
|
- name: Setup Flutter
|
|
uses: subosito/flutter-action@v2.8.0
|
|
with:
|
|
flutter-version: '3.41.9'
|
|
channel: 'stable'
|
|
|
|
- name: Setup Dependencies
|
|
run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y ninja-build libgtk-3-dev libmpv-dev mpv ffmpeg libmimalloc-dev
|
|
|
|
|
|
- name: Configure Flutter
|
|
run: flutter config --enable-linux-desktop
|
|
|
|
- name: Code Generation
|
|
run: |
|
|
cd $PROJECT_PATH
|
|
dart run scripts/codegen.dart
|
|
|
|
- name: Benchmark
|
|
run: |
|
|
cd $PROJECT_PATH
|
|
export DISPLAY=:99
|
|
sudo Xvfb -ac :99 -screen 0 1920x1080x24 > /dev/null 2>&1 &
|
|
ffmpeg -f x11grab -video_size 1920x1080 -framerate 15 -i :99 -vcodec libx264 -preset ultrafast -qp 0 -nostdin -loglevel quiet -pix_fmt yuv444p video.mkv &
|
|
flutter drive -d linux --driver=test_driver/benchmark_driver.dart --target=integration_test/benchmark/benchmark.dart --profile
|
|
INTEGRATION_TEST_EXIT_CODE=$?
|
|
sleep 1
|
|
kill $(pgrep ffmpeg)
|
|
exit $INTEGRATION_TEST_EXIT_CODE
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: result.mkv
|
|
path: commet/video.mkv
|
|
archive: false
|
|
|
|
|
|
- name: Store benchmark result - separate results repo
|
|
uses: benchmark-action/github-action-benchmark@v1
|
|
with:
|
|
name: Benchmark
|
|
tool: 'customSmallerIsBetter'
|
|
output-file-path: commet/build/customSmallerIsBetter.json
|
|
github-token: ${{ secrets.BENCHMARK_ACTION_BOT_TOKEN }}
|
|
auto-push: true
|
|
# Show alert with commit comment on detecting possible performance regression
|
|
alert-threshold: '350%'
|
|
comment-on-alert: true
|
|
fail-on-alert: false
|
|
summary-always: true
|
|
gh-repository: 'github.com/commetchat/commet_benchmark_results' |