name: debug (interactive SSH on real runners)
on:
workflow_dispatch:
inputs:
os:
description: 'OS to debug on'
required: true
default: 'linux'
type: choice
options:
- linux
- windows
jobs:
linux-debug:
if: inputs.os == 'linux'
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev glib-networking xvfb gdb curl
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --release
- name: reproduce (serve under xvfb, logged)
run: |
RUST_BACKTRACE=full WEBKIT_FORCE_SANDBOX=0 WEBKIT_DISABLE_DMABUF_RENDERER=1 \
xvfb-run -a -s "-screen 0 1280x800x24" setsid \
./target/release/navette serve --port 8765 > serve.log 2>&1 &
sleep 3
curl -sf -X POST http://127.0.0.1:8765/navigate -H 'Content-Type: application/json' \
-d '{"url":"http://127.0.0.1:8901/smoke-page.html","with_content":true}' > nav-resp.json || true
cat nav-resp.json || true
- name: interactive SSH (tmate)
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
windows-debug:
if: inputs.os == 'windows'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: ensure WebView2 runtime
shell: pwsh
run: |
if (-not (Test-Path "C:\Program Files (x86)\Microsoft\EdgeWebView\Application")) {
Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -OutFile wv2.exe
Start-Process -FilePath "./wv2.exe" -ArgumentList "/silent","/install" -Wait
}
- run: cargo build --release
- name: reproduce (serve, logged)
shell: bash
run: |
RUST_BACKTRACE=1 ./target/release/navette.exe serve --port 8765 > serve.log 2>&1 &
sleep 5
curl -s -X POST http://127.0.0.1:8765/navigate -H 'Content-Type: application/json' \
-d '{"url":"https://example.com","with_content":true}' > nav-resp.json || true
cat nav-resp.json || true
- name: interactive SSH (tmate)
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true