Repository navigation
סימוני חיפוש חכם מדרגים את עמודי ההמשך בכל כרטיסייה #718
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Installed plugin resource scenario (Linux WPE) | |
| on: | |
| pull_request: | |
| paths: | |
| - 'integration_test/installed_plugin_resource_probe_test.dart' | |
| - 'integration_test/perf_resource_probe_test.dart' | |
| - 'integration_test/support/installed_plugin_*.dart' | |
| - 'integration_test/support/perf_*.dart' | |
| - 'integration_test/support/webview_probe_metrics.dart' | |
| - 'integration_test/support/webview_probe_window.dart' | |
| - 'test_driver/installed_plugin_resource_probe.dart' | |
| - 'test/tool/perf_probe/installed_plugin_probe_test.dart' | |
| - 'test/tool/perf_probe/installed_plugin_pdf*_test.dart' | |
| - 'test/tool/perf_probe/fixtures/installed_pdf_*.json' | |
| - 'test/tool/perf_probe/perf_fixture*_test.dart' | |
| - 'test/core/window_listener*_test.dart' | |
| - 'tool/perf_probe/*installed_plugin*' | |
| - 'tool/perf_probe/src/installed_plugin_contract.dart' | |
| - 'tool/perf_probe/src/installed_pdf_runtime_contract.dart' | |
| - 'tool/perf_probe/src/installed_pdf_desktop_contract.dart' | |
| - 'tool/perf_probe/installed_pdf_*.py' | |
| - 'tool/perf_probe/test_installed_pdf_desktop.py' | |
| - 'tool/perf_probe/test_installed_pdf_architecture.py' | |
| - 'tool/perf_probe/*posix*.py' | |
| - 'tool/perf_probe/validate_perf_probe_smoke.py' | |
| - 'tool/perf_probe/validate_pdf_multi_window.dart' | |
| - 'test/tool/perf_probe/pdf_multi_window_test.dart' | |
| - 'lib/core/windowing/**' | |
| - 'tool/perf_probe/probe_binding.py' | |
| - 'tool/perf_probe/framework_pdf_probe.dart' | |
| - 'tool/perf_probe/src/probe_*.dart' | |
| - 'integration_test/support/perf_resource_workload.dart' | |
| - 'integration_test/support/perf_framework_scheduler.dart' | |
| - 'tool/perf_probe/prepare_pdf_case.dart' | |
| - 'tool/perf_probe/analyze.dart' | |
| - 'tool/perf_probe/src/pdf_*.dart' | |
| - 'tool/perf_probe/src/report.dart' | |
| - 'lib/pdf_book/**' | |
| - 'lib/indexing/**' | |
| - 'lib/printing/**' | |
| - 'lib/plugins/**' | |
| - 'lib/core/diagnostics/**' | |
| - 'lib/core/window_listener.dart' | |
| - 'linux/**' | |
| - 'pubspec.yaml' | |
| - 'pubspec.lock' | |
| - '.github/workflows/installed_plugin_probe_linux.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: installed-plugin-linux-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| gate: | |
| uses: ./.github/workflows/ci_gate.yml | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| installed-linux: | |
| name: Actual app / Linux WPE ${{ matrix.arch }} / profile | |
| needs: gate | |
| if: needs.gate.outputs.run == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x64 | |
| runner: ubuntu-26.04 | |
| wpe_arch: x86_64 | |
| jdk_arch: amd64 | |
| wpe_sha256: ca7e706c0ec2f66623fede2c369e3e13339448843e125f2ccd1553f4a3c4bcaf | |
| pdfium_sha256: 1c251efce460d67437a4c76d4be9033ae2f17bf5603f5bff1af10209b94ca723 | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| wpe_arch: aarch64 | |
| jdk_arch: arm64 | |
| wpe_sha256: d59f7c7a00d2d15370afc805dfa3a2e017c04833320805f5299989865913dc3d | |
| # Producer binary hash: actions/runs/42466419382, ARM64 identity audit. | |
| pdfium_sha256: 8cdc437dce84a6493b9ec6c4f5ad9ff2c299e505acfd7b0ad38cb440805b2c70 | |
| runs-on: ${{ matrix.runner }} | |
| # Match the supported full-app build_linux recipe in flutter_tests.yml. | |
| container: | |
| image: debian:bookworm-slim | |
| timeout-minutes: 90 | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| BOT: 'true' | |
| CI: 'true' | |
| FLUTTER_SUPPRESS_ANALYTICS: 'true' | |
| DART_SUPPRESS_ANALYTICS: 'true' | |
| PYTHONUNBUFFERED: '1' | |
| PYTHONDONTWRITEBYTECODE: '1' | |
| CARGO_BUILD_JOBS: '2' | |
| WPE_SDK: /opt/wpe-sdk | |
| PKG_CONFIG_PATH: /opt/wpe-sdk/lib/pkgconfig | |
| LD_LIBRARY_PATH: /opt/wpe-sdk/lib | |
| LIBRARY_PATH: /opt/wpe-sdk/lib | |
| JAVA_HOME: /usr/lib/jvm/java-17-openjdk-${{ matrix.jdk_arch }} | |
| CC: clang | |
| CXX: clang++ | |
| CFLAGS: -Wno-error=unknown-warning-option | |
| CXXFLAGS: -Wno-error=unknown-warning-option | |
| steps: | |
| - name: Prepare build container and fresh artifact paths | |
| run: | | |
| set -euo pipefail | |
| root="$RUNNER_TEMP/installed-plugin-linux-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT" | |
| mkdir "$root" | |
| { | |
| echo "INSTALLED_PROBE_ROOT=$root" | |
| echo "INSTALLED_PROBE_DATA=$RUNNER_TEMP/installed-plugin-linux-data" | |
| echo "INSTALLED_PROBE_OUTPUT=$root/device" | |
| echo "INSTALLED_PROBE_REPORTS=$root/host" | |
| echo "INSTALLED_PROBE_STORE_SOURCE=$RUNNER_TEMP/installed-plugin-linux-source" | |
| echo "INSTALLED_PROBE_MACHINE_ID=$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT-linux-${{ matrix.arch }}-bookworm-xvfb" | |
| echo "RUSTUP_HOME=$RUNNER_TEMP/otzaria-rustup" | |
| echo "CARGO_HOME=$RUNNER_TEMP/otzaria-cargo" | |
| echo "PERF_POSIX_ROOT=$RUNNER_TEMP/perf-posix-linux" | |
| } >> "$GITHUB_ENV" | |
| cat /etc/os-release > "$root/os-release.txt" | |
| uname -a > "$root/kernel.txt" | |
| apt-get update -y 2>&1 | tee "$root/apt-update.log" | |
| apt-get install -y ca-certificates curl git jq unzip xz-utils zstd \ | |
| python3 nodejs 2>&1 | tee "$root/apt-bootstrap.log" | |
| git config --global --add safe.directory '*' | |
| - uses: actions/checkout@v7.0.1 | |
| - uses: subosito/flutter-action@v2 | |
| if: matrix.arch == 'x64' | |
| with: | |
| channel: stable | |
| flutter-version: 3.47.7 | |
| cache: false | |
| - name: Bootstrap the locked native ARM64 Flutter SDK | |
| if: matrix.arch == 'arm64' | |
| run: | | |
| set -euo pipefail | |
| git clone --depth 1 --branch 3.47.7 https://github.com/flutter/flutter.git /opt/flutter | |
| echo "/opt/flutter/bin" >> "$GITHUB_PATH" | |
| /opt/flutter/bin/flutter --version | |
| - name: Require the native host and Dart architecture | |
| run: | | |
| set -euo pipefail | |
| test "$(uname -m)" = '${{ matrix.wpe_arch }}' | |
| dart --version 2>&1 | tee "$INSTALLED_PROBE_ROOT/dart.txt" | |
| grep -F 'linux_${{ matrix.arch }}' "$INSTALLED_PROBE_ROOT/dart.txt" | |
| - name: Install native build and desktop session dependencies | |
| run: | | |
| set -euo pipefail | |
| apt-get install -y build-essential clang-14 cmake \ | |
| libblkid1 libcurl4-openssl-dev libglib2.0-dev libgtk-3-dev \ | |
| liblzma5 liblzma-dev libsecret-1-dev libsoup-3.0-dev \ | |
| libwebkit2gtk-4.1-dev libxkbcommon-dev ninja-build \ | |
| openjdk-17-jdk-headless pkg-config xvfb xauth binutils \ | |
| dbus dbus-x11 openbox wmctrl x11-utils x11-xserver-utils \ | |
| libgl1-mesa-dri libegl1 libglx-mesa0 mesa-utils \ | |
| 2>&1 | tee "$INSTALLED_PROBE_ROOT/apt-native.log" | |
| update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 100 | |
| update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 100 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Record toolchain and verified Store source | |
| run: | | |
| set -euo pipefail | |
| echo "$CARGO_HOME/bin" >> "$GITHUB_PATH" | |
| flutter --version --machine > "$INSTALLED_PROBE_ROOT/flutter.json" | |
| rustc -Vv > "$INSTALLED_PROBE_ROOT/rust.txt" | |
| cargo -V >> "$INSTALLED_PROBE_ROOT/rust.txt" | |
| rustup show >> "$INSTALLED_PROBE_ROOT/rust.txt" | |
| git rev-parse HEAD > "$INSTALLED_PROBE_ROOT/source-commit.txt" | |
| python3 tool/perf_probe/prepare_installed_plugin_source.py \ | |
| --output "$INSTALLED_PROBE_STORE_SOURCE" \ | |
| 2>&1 | tee "$INSTALLED_PROBE_ROOT/source.log" | |
| - name: Install the pinned WPE runtime SDK | |
| env: | |
| WPE_RUNTIME_SHA256: ${{ matrix.wpe_sha256 }} | |
| run: | | |
| set -euo pipefail | |
| asset=wpe-runtime-2.48.7-linux-${{ matrix.wpe_arch }}.tar.zst | |
| base=https://github.com/Otzaria/otzaria-wpe-runtime/releases/download/wpe-2.48.7-print-to-pdf | |
| curl -fSL --retry 3 --retry-delay 5 --max-time 300 \ | |
| -o "$RUNNER_TEMP/$asset" "$base/$asset" | |
| printf '%s %s\n' "$WPE_RUNTIME_SHA256" "$RUNNER_TEMP/$asset" \ | |
| | sha256sum -c - | tee "$INSTALLED_PROBE_ROOT/wpe-sdk-sha256.txt" | |
| tar -C /opt -I zstd -xf "$RUNNER_TEMP/$asset" | |
| test -f "$WPE_SDK/lib/pkgconfig/wpe-webkit-2.0.pc" | |
| pkg-config --print-errors --exists \ | |
| wpe-webkit-2.0 wpe-platform-2.0 wpe-platform-headless-2.0 wpe-1.0 | |
| cp "$WPE_SDK/VERSIONS" "$INSTALLED_PROBE_ROOT/wpe-sdk-versions.txt" | |
| - name: Resolve exact dependencies and analyze | |
| run: | | |
| set -euo pipefail | |
| flutter pub get --enforce-lockfile 2>&1 | tee "$INSTALLED_PROBE_ROOT/pub-get.log" | |
| flutter analyze --no-pub 2>&1 | tee "$INSTALLED_PROBE_ROOT/analyze.log" | |
| - name: Validate the runner, fixture and evidence contracts | |
| run: | | |
| set -euo pipefail | |
| python3 -m unittest discover -s tool/perf_probe -p 'test_installed_plugin_linux.py' -v \ | |
| 2>&1 | tee "$INSTALLED_PROBE_ROOT/session-tests.log" | |
| python3 -m unittest tool.perf_probe.test_installed_pdf_desktop tool.perf_probe.test_installed_pdf_architecture -v | |
| python3 -m unittest tool.perf_probe.test_perf_probe_posix -v \ | |
| 2>&1 | tee "$INSTALLED_PROBE_ROOT/posix-contracts.log" | |
| node --test tool/perf_probe/test_installed_plugin_fixture.mjs \ | |
| tool/perf_probe/test_installed_plugin_store.mjs \ | |
| 2>&1 | tee "$INSTALLED_PROBE_ROOT/fixture-tests.log" | |
| flutter test --no-pub --concurrency=1 --reporter expanded \ | |
| test/tool/perf_probe/installed_plugin_probe_test.dart \ | |
| test/tool/perf_probe/installed_plugin_pdf_runtime_test.dart test/tool/perf_probe/installed_plugin_pdf_desktop_test.dart test/tool/perf_probe/installed_plugin_memory_pressure_test.dart \ | |
| test/tool/perf_probe/installed_plugin_pdf_fixture_test.dart \ | |
| test/tool/perf_probe/perf_fixture_test.dart \ | |
| test/tool/perf_probe/perf_fixture_startup_settings_test.dart \ | |
| test/core/window_listener_native_visibility_test.dart \ | |
| test/core/window_listener_restore_from_minimize_test.dart \ | |
| test/core/window_listener_focus_keyboard_test.dart \ | |
| test/core/window_listener_hide_on_exit_test.dart \ | |
| 2>&1 | tee "$INSTALLED_PROBE_ROOT/contract-tests.log" | |
| - name: Build the actual app scenario in profile | |
| timeout-minutes: 40 | |
| run: | | |
| set -euo pipefail | |
| flutter build linux --profile --no-pub \ | |
| --target=integration_test/installed_plugin_resource_probe_test.dart \ | |
| --dart-define=INSTALLED_PROBE_FLUTTER_VERSION=3.47.7 \ | |
| --dart-define="INSTALLED_PROBE_COMMIT=$(git rev-parse HEAD)" \ | |
| --dart-define=INSTALLED_PROBE_IDLE_MS=1000 \ | |
| 2>&1 | tee "$INSTALLED_PROBE_ROOT/build-profile.log" | |
| - name: Audit PDFium 8125/5200 loader isolation in the actual bundle | |
| run: | | |
| set -euo pipefail | |
| libdir="build/linux/${{ matrix.arch }}/profile/bundle/lib" | |
| public="$libdir/libpdfium.so" | |
| private="$libdir/libpdfium_printing.so" | |
| plugin="$libdir/libprinting_plugin.so" | |
| test -f "$public" && test -f "$private" && test -f "$plugin" | |
| # PDFium 8125 for pdfrx must not be replaced by the printing copy. | |
| echo "${{ matrix.pdfium_sha256 }} $public" \ | |
| | sha256sum -c - | |
| cmp_status=0 | |
| cmp -s "$public" "$private" || cmp_status=$? | |
| if [ "$cmp_status" -ne 1 ]; then | |
| echo "::error::PDFium binaries must differ and both must be readable" | |
| exit 1 | |
| fi | |
| readelf -d "$plugin" | tee "$INSTALLED_PROBE_ROOT/printing-elf-dynamic.txt" | |
| if readelf -d "$plugin" | grep -E 'NEEDED.*(libpdfium|libpdfium_printing)'; then | |
| echo "::error::printing must not bind either PDFium in the base namespace" | |
| exit 1 | |
| fi | |
| if nm -D "$plugin" | grep -E ' U (FPDF|FPDFBitmap)'; then | |
| echo "::error::printing must resolve PDFium only from dlmopen namespace" | |
| exit 1 | |
| fi | |
| sha256sum "$public" "$private" | tee "$INSTALLED_PROBE_ROOT/pdfium-sha256.txt" | |
| stat -c '%n %s bytes' "$public" "$private" \ | |
| | tee "$INSTALLED_PROBE_ROOT/pdfium-disk-bytes.txt" | |
| - name: Run installed plugin and PDF runtime in the actual bundle | |
| timeout-minutes: 25 | |
| run: | | |
| set -euo pipefail | |
| python3 tool/perf_probe/run_installed_plugin_linux.py \ | |
| --output "$INSTALLED_PROBE_ROOT/session" --seconds 1320 \ | |
| --binary "build/linux/${{ matrix.arch }}/profile/bundle/otzaria" \ | |
| 2>&1 | tee "$INSTALLED_PROBE_ROOT/drive-profile.log" | |
| - name: Verify the native executable and mapped PDF module architecture | |
| run: | | |
| set -euo pipefail | |
| python3 tool/perf_probe/installed_pdf_architecture.py \ | |
| --reports "$INSTALLED_PROBE_REPORTS" --platform linux \ | |
| --architecture '${{ matrix.arch }}' --commit "$GITHUB_SHA" \ | |
| --executable "build/linux/${{ matrix.arch }}/profile/bundle/otzaria" \ | |
| | tee "$INSTALLED_PROBE_ROOT/pdf-architecture.json" | |
| - name: Measure the actual PDF reader with the POSIX profile runner | |
| if: matrix.arch == 'x64' | |
| timeout-minutes: 45 | |
| run: | | |
| set -euo pipefail | |
| test ! -e "$PERF_POSIX_ROOT" | |
| mkdir -p "$PERF_POSIX_ROOT/runtime" | |
| chmod 700 "$PERF_POSIX_ROOT/runtime" | |
| export XDG_RUNTIME_DIR="$PERF_POSIX_ROOT/runtime" | |
| export XDG_SESSION_TYPE=x11 GDK_BACKEND=x11 | |
| printf '%s\n' '{"schemaVersion":1,"source":{"kind":"generated","pageCount":600}}' \ | |
| > "$PERF_POSIX_ROOT/case-input.json" | |
| printf '%s\n' '{"schemaVersion":1,"source":{"kind":"generated","pageCount":10}}' \ | |
| > "$PERF_POSIX_ROOT/multi-window-case.json" | |
| xvfb-run --auto-servernum --error-file="$PERF_POSIX_ROOT/xvfb.log" \ | |
| --server-args="-screen 0 1440x1000x24 -dpi 96 -nolisten tcp" \ | |
| dbus-run-session -- bash <<'SESSION' | |
| set -euo pipefail | |
| openbox --sm-disable > "$PERF_POSIX_ROOT/openbox.log" 2>&1 & | |
| wm=$! | |
| trap 'kill "$wm" 2>/dev/null || true; wait "$wm" 2>/dev/null || true' EXIT | |
| ready=0 | |
| for attempt in {1..100}; do | |
| if wmctrl -m > "$PERF_POSIX_ROOT/window-manager.txt" 2>&1 && | |
| grep -q 'Name: Openbox' "$PERF_POSIX_ROOT/window-manager.txt"; then | |
| ready=1 | |
| break | |
| fi | |
| kill -0 "$wm" | |
| sleep 0.1 | |
| done | |
| test "$ready" = 1 | |
| xdpyinfo > "$PERF_POSIX_ROOT/display.txt" | |
| for binding in integration framework; do | |
| run_name=run | |
| if [ "$binding" = framework ]; then run_name=framework-run; fi | |
| python3 tool/perf_probe/run_perf_probe_posix.py \ | |
| --mode profile --cache-state cold --scenario-set pdf-reader --binding-mode "$binding" \ | |
| --pdf-case "$PERF_POSIX_ROOT/case-input.json" \ | |
| --warmup 0 --repetitions 1 --launches 1 --display-mode xvfb \ | |
| --hardware-id "$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT-linux-${{ matrix.arch }}-bookworm-xvfb" \ | |
| --build-timeout-seconds 1200 --timeout-seconds 180 \ | |
| --output "$PERF_POSIX_ROOT/$run_name" \ | |
| 2>&1 | tee "$PERF_POSIX_ROOT/$run_name.log" | |
| done | |
| python3 tool/perf_probe/run_perf_probe_posix.py \ | |
| --mode profile --cache-state cold --scenario-set pdf-multi-window --binding-mode framework \ | |
| --pdf-case "$PERF_POSIX_ROOT/multi-window-case.json" \ | |
| --warmup 0 --repetitions 1 --launches 1 --display-mode xvfb \ | |
| --hardware-id "$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT-linux-x64-bookworm-xvfb" \ | |
| --build-timeout-seconds 1200 --timeout-seconds 600 \ | |
| --output "$PERF_POSIX_ROOT/multi-window-run" \ | |
| 2>&1 | tee "$PERF_POSIX_ROOT/multi-window-run.log" | |
| SESSION | |
| for binding in integration framework; do | |
| run_name=run | |
| if [ "$binding" = framework ]; then run_name=framework-run; fi | |
| python3 tool/perf_probe/validate_perf_probe_smoke.py \ | |
| --root "$PERF_POSIX_ROOT/$run_name" --binding-mode "$binding" --platform linux --commit "$GITHUB_SHA" \ | |
| | tee "$PERF_POSIX_ROOT/verified-$binding.json" | |
| done | |
| dart tool/perf_probe/validate_pdf_multi_window.dart \ | |
| --root "$PERF_POSIX_ROOT/multi-window-run" \ | |
| --platform linux --mode profile --commit "$GITHUB_SHA" \ | |
| | tee "$PERF_POSIX_ROOT/verified-native-windows.json" | |
| - name: Preserve POSIX reader measurements and partial failures | |
| if: always() && matrix.arch == 'x64' | |
| uses: actions/upload-artifact@v7.0.2 | |
| with: | |
| name: perf-posix-linux-profile-pdf-reader | |
| if-no-files-found: warn | |
| retention-days: 14 | |
| path: | | |
| ${{ env.PERF_POSIX_ROOT }}/**/*.json | |
| ${{ env.PERF_POSIX_ROOT }}/**/*.jsonl | |
| ${{ env.PERF_POSIX_ROOT }}/**/*.csv | |
| ${{ env.PERF_POSIX_ROOT }}/**/*.log | |
| ${{ env.PERF_POSIX_ROOT }}/**/*.md | |
| ${{ env.PERF_POSIX_ROOT }}/**/*.txt | |
| ${{ env.PERF_POSIX_ROOT }}/multi-window-run/launch-*/pdf-multi-window-*/*.pdf | |
| ${{ env.PERF_POSIX_ROOT }}/multi-window-run/launch-*/pdf-multi-window-*/*.png | |
| !${{ env.PERF_POSIX_ROOT }}/run/data/** | |
| !${{ env.PERF_POSIX_ROOT }}/framework-run/data/** | |
| !${{ env.PERF_POSIX_ROOT }}/multi-window-run/data/** | |
| - name: Collect partial native build diagnostics | |
| if: always() | |
| run: | | |
| set -euo pipefail | |
| if [ -f "$INSTALLED_PROBE_STORE_SOURCE/source-provenance.json" ]; then | |
| cp "$INSTALLED_PROBE_STORE_SOURCE/source-provenance.json" "$INSTALLED_PROBE_ROOT/" | |
| fi | |
| python3 - <<'PY' | |
| import os | |
| from pathlib import Path | |
| import shutil | |
| root = Path(os.environ['INSTALLED_PROBE_ROOT']) / 'build-diagnostics' | |
| build = Path('build/linux') | |
| for name in ('CMakeCache.txt', 'CMakeError.log', 'CMakeOutput.log', 'CMakeConfigureLog.yaml'): | |
| for source in build.rglob(name): | |
| target = root / source.relative_to(build) | |
| target.parent.mkdir(parents=True, exist_ok=True) | |
| shutil.copyfile(source, target) | |
| PY | |
| - name: Preserve raw reports and partial failures | |
| if: always() | |
| uses: actions/upload-artifact@v7.0.2 | |
| with: | |
| name: installed-plugin-linux-wpe-${{ matrix.arch }}-profile | |
| if-no-files-found: warn | |
| path: ${{ env.INSTALLED_PROBE_ROOT }} |