Madhava/update #701
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: Test | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - '**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: false | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup workspace | |
| if: runner.os != 'Windows' | |
| run: | | |
| chmod +x scripts/setup-workspace.sh | |
| ./scripts/setup-workspace.sh | |
| - name: Setup workspace (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: .\win.ps1 ./scripts/setup-workspace.sh | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run lint checks | |
| run: ./lint.sh --check | |
| scenario-tests: | |
| name: ${{ matrix.scenario }} (${{ matrix.platform }})${{ matrix.client_mode == 'go' && ' -go' || '' }} | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # flows-collab smoke test (linux) | |
| - scenario: flows-collab | |
| platform: linux-x86_64 | |
| runner: namespace-profile-linux-medium | |
| client_mode: rust | |
| tauri_binary: src-tauri/target/release/bv-desktop | |
| run_prefix: "xvfb-run -a" | |
| # flows-collab smoke test (windows) | |
| - scenario: flows-collab | |
| platform: windows-x86_64 | |
| runner: namespace-profile-windows-medium | |
| client_mode: rust | |
| tauri_binary: src-tauri/target/release/bv-desktop | |
| run_prefix: "" | |
| # jupyter-collab smoke test (linux) | |
| - scenario: jupyter-collab | |
| platform: linux-x86_64 | |
| runner: namespace-profile-linux-large | |
| client_mode: rust | |
| tauri_binary: src-tauri/target/release/bv-desktop | |
| run_prefix: "xvfb-run -a" | |
| # jupyter-collab smoke test (macOS) | |
| - scenario: jupyter-collab | |
| platform: macos-arm64 | |
| runner: namespace-profile-mac-medium | |
| client_mode: rust | |
| tauri_binary: src-tauri/target/release/bv-desktop | |
| run_prefix: "" | |
| # jupyter-collab smoke test (windows) | |
| - scenario: jupyter-collab | |
| platform: windows-x86_64 | |
| runner: namespace-profile-windows-medium | |
| client_mode: rust | |
| tauri_binary: src-tauri/target/release/bv-desktop | |
| run_prefix: "" | |
| # pipelines-multiparty-flow smoke test (linux) | |
| - scenario: pipelines-multiparty-flow | |
| platform: linux-x86_64 | |
| runner: namespace-profile-linux-medium | |
| client_mode: rust | |
| tauri_binary: src-tauri/target/release/bv-desktop | |
| run_prefix: "xvfb-run -a" | |
| # syqure-multiparty-flow secure-only smoke test (linux) | |
| - scenario: syqure-multiparty-flow-secure-only | |
| platform: linux-x86_64 | |
| runner: namespace-profile-linux-medium | |
| client_mode: rust | |
| tauri_binary: src-tauri/target/release/bv-desktop | |
| run_prefix: "xvfb-run -a" | |
| # syqure-multiparty-allele-freq (linux) | |
| - scenario: syqure-multiparty-allele-freq | |
| platform: linux-x86_64 | |
| runner: namespace-profile-linux-large | |
| client_mode: rust | |
| tauri_binary: src-tauri/target/release/bv-desktop | |
| run_prefix: "xvfb-run -a" | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| SKIP_PLAYWRIGHT_INSTALL: "1" | |
| AUTO_REBUILD_TAURI: "1" | |
| BV_DEVSTACK_CLIENT_MODE: ${{ matrix.client_mode }} | |
| BV_SKIP_SYQURE: "1" | |
| steps: | |
| - name: Free disk space (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| echo "=== Disk space before cleanup ===" | |
| df -h / | |
| # Remove unnecessary large packages to free ~10GB | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/.ghcup | |
| sudo apt-get clean | |
| echo "=== Disk space after cleanup ===" | |
| df -h / | |
| - name: Enable long paths (Windows) | |
| if: runner.os == 'Windows' | |
| run: git config --system core.longpaths true | |
| shell: pwsh | |
| - uses: actions/checkout@v4 | |
| - name: Cache workspace dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/../biovault | |
| ${{ github.workspace }}/../syftbox-sdk | |
| ${{ github.workspace }}/../syftbox-crypto | |
| ${{ github.workspace }}/../syftbox | |
| ${{ github.workspace }}/../biovault-beaver | |
| ${{ github.workspace }}/../sbenv | |
| ${{ github.workspace }}/../bioscript | |
| ${{ github.workspace }}/../syqure | |
| key: workspace-deps-${{ runner.os }}-${{ hashFiles('scripts/setup-workspace.sh') }} | |
| restore-keys: | | |
| workspace-deps-${{ runner.os }}- | |
| - name: Setup workspace | |
| if: runner.os != 'Windows' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| BV_SKIP_SYQURE: ${{ contains(matrix.scenario, 'syqure') && '0' || '1' }} | |
| run: | | |
| chmod +x scripts/setup-workspace.sh | |
| ./scripts/setup-workspace.sh | |
| - name: Setup workspace (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| BV_SKIP_SYQURE: ${{ contains(matrix.scenario, 'syqure') && '0' || '1' }} | |
| run: .\win.ps1 ./scripts/setup-workspace.sh | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup sccache | |
| uses: mozilla-actions/sccache-action@v0.0.6 | |
| - name: Enable sccache (if available) | |
| if: runner.os != 'Windows' | |
| run: | | |
| if SCCACHE_GHA_ENABLED=true sccache --start-server; then | |
| echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
| echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
| else | |
| echo "sccache unavailable; proceeding without cache." | |
| fi | |
| - name: Enable sccache (if available, Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $env:SCCACHE_GHA_ENABLED = "true" | |
| & sccache --start-server | |
| $sccacheExit = $LASTEXITCODE | |
| if ($sccacheExit -eq 0) { | |
| "RUSTC_WRAPPER=sccache" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| "SCCACHE_GHA_ENABLED=true" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| } else { | |
| Write-Host "sccache unavailable; proceeding without cache." | |
| $global:LASTEXITCODE = 0 | |
| } | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: | | |
| src-tauri | |
| biovault/cli | |
| syftbox-sdk | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: '1.1.38' | |
| - name: Cache Bun downloads | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| ~/.cache/bun | |
| ~/Library/Caches/bun | |
| ~/AppData/Local/bun/install/cache | |
| key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} | |
| - name: Setup Go (syftbox) | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: syftbox/go.mod | |
| cache: true | |
| cache-dependency-path: syftbox/go.sum | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v3 | |
| - name: Install protoc | |
| uses: arduino/setup-protoc@v2 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Linux dependencies (Tauri + headless) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| xvfb \ | |
| libwebkit2gtk-4.1-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| libgtk-3-dev \ | |
| libssl-dev \ | |
| libsqlite3-dev \ | |
| libxdo-dev \ | |
| build-essential \ | |
| pkg-config \ | |
| coturn | |
| turnserver --version || true | |
| - name: Install syqure build dependencies (Linux) | |
| if: runner.os == 'Linux' && contains(matrix.scenario, 'syqure') | |
| run: | | |
| UBUNTU_CODENAME=$(lsb_release -cs 2>/dev/null || echo "jammy") | |
| wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc >/dev/null | |
| echo "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-17 main" | sudo tee /etc/apt/sources.list.d/llvm-17.list | |
| sudo apt-get update | |
| sudo apt-get install -y llvm-17-dev libgmp-dev zstd | |
| # NOTE: Docker setup for macOS removed since pipelines-collab tests are skipped on macOS | |
| # (GitHub macOS runners don't support nested virtualization needed for Docker) | |
| - name: Check Docker availability (macOS) | |
| if: runner.os == 'macOS' | |
| continue-on-error: true | |
| run: | | |
| echo "=== Docker availability check (macOS) ===" | |
| if command -v docker >/dev/null 2>&1; then | |
| docker --version || true | |
| docker info || true | |
| else | |
| echo "docker not found on PATH" | |
| fi | |
| - name: Install npm dependencies | |
| if: runner.os != 'Windows' | |
| run: npm ci | |
| - name: Install npm dependencies (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: npm ci | |
| - name: Install bun dependencies | |
| if: runner.os != 'Windows' | |
| run: bun install --frozen-lockfile | |
| - name: Install bun dependencies (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: bun install --frozen-lockfile | |
| - name: Cache Playwright browsers | |
| id: cache-playwright | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/ms-playwright | |
| ~/AppData/Local/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json', 'bun.lock') }} | |
| - name: Install Playwright browsers (Linux) | |
| if: runner.os == 'Linux' && steps.cache-playwright.outputs.cache-hit != 'true' | |
| run: bunx --bun playwright install --with-deps chromium | |
| - name: Install Playwright browsers (non-Linux) | |
| if: runner.os != 'Linux' && runner.os != 'Windows' && steps.cache-playwright.outputs.cache-hit != 'true' | |
| run: bunx --bun playwright install chromium | |
| - name: Install Playwright browsers (Windows) | |
| if: runner.os == 'Windows' && steps.cache-playwright.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| run: bunx --bun playwright install chromium | |
| - name: Cache bundled dependencies | |
| id: cache-bundled | |
| uses: actions/cache@v4 | |
| with: | |
| path: src-tauri/resources/bundled | |
| key: bundled-${{ runner.os }}-${{ hashFiles('scripts/fetch-bundled-deps.sh', 'scripts/windows/bundle-deps.ps1', 'scripts/bundled-deps.json') }} | |
| - name: Fetch bundled dependencies | |
| if: runner.os != 'Windows' && steps.cache-bundled.outputs.cache-hit != 'true' | |
| run: | | |
| chmod +x scripts/fetch-bundled-deps.sh | |
| ./scripts/fetch-bundled-deps.sh | |
| - name: Fetch bundled dependencies (Windows) | |
| if: runner.os == 'Windows' && steps.cache-bundled.outputs.cache-hit != 'true' | |
| shell: pwsh | |
| run: .\scripts\windows\bundle-deps.ps1 | |
| - name: Ensure bundled dependency permissions | |
| if: runner.os != 'Windows' | |
| run: chmod -R u+rw src-tauri/resources/bundled/ || true | |
| - name: Materialize templates | |
| if: runner.os != 'Windows' | |
| run: | | |
| chmod +x scripts/materialize-templates.sh || true | |
| ./scripts/materialize-templates.sh || true | |
| - name: Materialize templates (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: .\win.ps1 ./scripts/materialize-templates.sh | |
| - name: Build syftbox client | |
| if: runner.os != 'Windows' | |
| run: | | |
| chmod +x scripts/build-syftbox-prod.sh | |
| ./scripts/build-syftbox-prod.sh | |
| - name: Build syftbox client (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: .\win.ps1 ./scripts/build-syftbox-prod.sh | |
| - name: Build Tauri binary (release) | |
| if: runner.os != 'Windows' | |
| run: | | |
| cd src-tauri | |
| cargo build --release | |
| - name: Build Tauri binary (release, Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: cargo build --release | |
| working-directory: src-tauri | |
| - name: Build native syqure binary | |
| if: contains(matrix.scenario, 'syqure') | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| cd ${{ github.workspace }}/../syqure | |
| # Override SSH submodule URLs to HTTPS (no SSH keys in CI) | |
| git config --file .gitmodules submodule.codon.url https://github.com/madhavajay/codon.git | |
| git config --file .gitmodules submodule.sequre.url https://github.com/madhavajay/sequre.git | |
| git submodule sync | |
| git submodule update --init --depth 1 codon sequre | |
| # Build bundle and binary (matches syqure CI smoke test) | |
| BUNDLE_ROOT="bin/linux-x86/codon" | |
| BUNDLE_DIR="$(mktemp -d)" | |
| BUNDLE_TAR="$BUNDLE_DIR/codon-linux-x86.tar.zst" | |
| tar -C "$BUNDLE_ROOT" -ch . | zstd -19 -o "$BUNDLE_TAR" | |
| export SYQURE_BUNDLE_FILE="$BUNDLE_TAR" | |
| export SYQURE_BUNDLE_CACHE="$BUNDLE_DIR/cache" | |
| export SYQURE_CPP_INCLUDE="$BUNDLE_ROOT/include" | |
| export SYQURE_CPP_LIB_DIRS="$BUNDLE_ROOT/lib/codon" | |
| export SYQURE_LLVM_INCLUDE="$(llvm-config-17 --includedir)" | |
| cargo build -p syqure | |
| - name: Install maturin (uv) | |
| if: runner.os != 'Windows' && matrix.scenario == 'jupyter-collab' | |
| run: | | |
| uv venv .venv | |
| uv pip install --python .venv/bin/python maturin | |
| - name: Install maturin (uv, Windows) | |
| if: runner.os == 'Windows' && matrix.scenario == 'jupyter-collab' | |
| shell: pwsh | |
| run: | | |
| uv venv .venv | |
| uv pip install --python .venv\Scripts\python.exe maturin | |
| - name: Pre-build syftbox-sdk wheel | |
| if: runner.os != 'Windows' && matrix.scenario == 'jupyter-collab' | |
| run: | | |
| cd syftbox-sdk/python | |
| "${{ github.workspace }}/.venv/bin/maturin" build --release | |
| - name: Pre-build syftbox-sdk wheel (Windows) | |
| if: runner.os == 'Windows' && matrix.scenario == 'jupyter-collab' | |
| shell: pwsh | |
| run: | | |
| $maturin = Join-Path $env:GITHUB_WORKSPACE ".venv\\Scripts\\maturin.exe" | |
| if (-not (Test-Path $maturin)) { | |
| throw "maturin not found at $maturin" | |
| } | |
| & $maturin build --release | |
| working-directory: syftbox-sdk/python | |
| - name: Setup Podman (Windows flows-collab) | |
| if: runner.os == 'Windows' && (startsWith(matrix.scenario, 'pipelines-') || matrix.scenario == 'flows-collab') | |
| shell: pwsh | |
| run: | | |
| choco install podman-cli -y | |
| $env:CONTAINERS_MACHINE_PROVIDER = "hyperv" | |
| $machine = "podman-hyperv" | |
| try { | |
| podman machine init $machine | |
| } catch { | |
| Write-Host "podman machine init failed (maybe exists): $($_.Exception.Message)" | |
| } | |
| podman machine start $machine | |
| try { | |
| podman system connection default $machine | |
| } catch { | |
| Write-Host "Warning: failed to set default connection $machine" | |
| podman system connection list | |
| } | |
| podman info | |
| podman ps | |
| - name: Install biosynth CLI (Linux) | |
| if: runner.os == 'Linux' && matrix.scenario == 'flows-solo' | |
| run: | | |
| curl -fsSL https://github.com/OpenMined/biosynth/releases/latest/download/bvs-x86_64-unknown-linux-gnu.tar.gz | tar -xz | |
| sudo mv bvs /usr/local/bin/ | |
| bvs --version | |
| - name: Install biosynth CLI (macOS) | |
| if: runner.os == 'macOS' && matrix.scenario == 'flows-solo' | |
| run: | | |
| curl -fsSL https://github.com/OpenMined/biosynth/releases/latest/download/bvs-aarch64-apple-darwin.tar.gz | tar -xz | |
| sudo mv bvs /usr/local/bin/ | |
| bvs --version | |
| - name: Cache genostats database | |
| if: matrix.scenario == 'flows-solo' | |
| id: cache-genostats | |
| uses: actions/cache@v4 | |
| with: | |
| path: data/genostats.sqlite | |
| key: genostats-v1 | |
| - name: Cache MinIO binary | |
| id: cache-minio | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.sbdev/bin | |
| key: minio-${{ runner.os }}-${{ runner.arch }}-v1 | |
| - name: Run flows pause/resume scenario | |
| if: runner.os != 'Windows' && matrix.scenario == 'flows-pause-resume' | |
| env: | |
| SKIP_PLAYWRIGHT_INSTALL: "1" | |
| AUTO_REBUILD_TAURI: "0" | |
| run: ${{ matrix.run_prefix }} ./test-scenario.sh --flows-pause-resume | |
| - name: Run flows collab scenario | |
| if: runner.os != 'Windows' && matrix.scenario == 'flows-collab' | |
| env: | |
| SKIP_PLAYWRIGHT_INSTALL: "1" | |
| AUTO_REBUILD_TAURI: "0" | |
| run: | | |
| if [ -n "${{ matrix.run_prefix }}" ]; then | |
| ${{ matrix.run_prefix }} ./test-scenario.sh --flows-collab | |
| else | |
| ./test-scenario.sh --flows-collab | |
| fi | |
| - name: Run flows collab scenario (Windows) | |
| if: runner.os == 'Windows' && matrix.scenario == 'flows-collab' | |
| shell: pwsh | |
| env: | |
| SKIP_PLAYWRIGHT_INSTALL: "1" | |
| AUTO_REBUILD_TAURI: "0" | |
| run: .\win.ps1 ./test-scenario.sh --flows-collab | |
| - name: Run jupyter collab scenario | |
| if: runner.os != 'Windows' && matrix.scenario == 'jupyter-collab' | |
| env: | |
| SKIP_PLAYWRIGHT_INSTALL: "1" | |
| AUTO_REBUILD_TAURI: "0" | |
| run: | | |
| if [ -n "${{ matrix.run_prefix }}" ]; then | |
| ${{ matrix.run_prefix }} ./test-scenario.sh --jupyter-collab biovault-beaver/notebooks/02-advanced-features.json | |
| else | |
| ./test-scenario.sh --jupyter-collab biovault-beaver/notebooks/02-advanced-features.json | |
| fi | |
| - name: Run jupyter collab scenario (Windows) | |
| if: runner.os == 'Windows' && matrix.scenario == 'jupyter-collab' | |
| shell: pwsh | |
| env: | |
| SKIP_PLAYWRIGHT_INSTALL: "1" | |
| AUTO_REBUILD_TAURI: "0" | |
| run: .\win.ps1 ./test-scenario.sh --jupyter-collab biovault-beaver/notebooks/02-advanced-features.json | |
| - name: Run pipelines multiparty flow scenario | |
| if: matrix.scenario == 'pipelines-multiparty-flow' | |
| env: | |
| SKIP_PLAYWRIGHT_INSTALL: "1" | |
| AUTO_REBUILD_TAURI: "0" | |
| run: | | |
| if [ -n "${{ matrix.run_prefix }}" ]; then | |
| ${{ matrix.run_prefix }} ./test-scenario.sh --pipelines-multiparty-flow | |
| else | |
| ./test-scenario.sh --pipelines-multiparty-flow | |
| fi | |
| - name: Run syqure multiparty flow secure-only scenario | |
| if: matrix.scenario == 'syqure-multiparty-flow-secure-only' | |
| env: | |
| SKIP_PLAYWRIGHT_INSTALL: "1" | |
| AUTO_REBUILD_TAURI: "0" | |
| BV_SKIP_SYQURE: "0" | |
| SYQURE_SCENARIO_TIMEOUT: "20m" | |
| run: | | |
| # Hard cap runtime so a stuck syqure flow cannot burn CI minutes indefinitely. | |
| if [ -n "${{ matrix.run_prefix }}" ]; then | |
| timeout --preserve-status "$SYQURE_SCENARIO_TIMEOUT" ${{ matrix.run_prefix }} ./test-scenario.sh --syqure-multiparty-flow --syqure-secure-only | |
| else | |
| timeout --preserve-status "$SYQURE_SCENARIO_TIMEOUT" ./test-scenario.sh --syqure-multiparty-flow --syqure-secure-only | |
| fi | |
| - name: Run syqure multiparty allele-freq scenario | |
| if: matrix.scenario == 'syqure-multiparty-allele-freq' | |
| env: | |
| SKIP_PLAYWRIGHT_INSTALL: "1" | |
| AUTO_REBUILD_TAURI: "0" | |
| BV_SKIP_SYQURE: "0" | |
| SYQURE_SCENARIO_TIMEOUT: "20m" | |
| run: | | |
| # Hard cap runtime so a stuck syqure flow cannot burn CI minutes indefinitely. | |
| if [ -n "${{ matrix.run_prefix }}" ]; then | |
| timeout --preserve-status "$SYQURE_SCENARIO_TIMEOUT" ${{ matrix.run_prefix }} ./test-scenario.sh --syqure-multiparty-allele-freq | |
| else | |
| timeout --preserve-status "$SYQURE_SCENARIO_TIMEOUT" ./test-scenario.sh --syqure-multiparty-allele-freq | |
| fi | |
| - name: Upload test artifacts on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.scenario }}-${{ matrix.platform }}-${{ matrix.client_mode }}-test-results | |
| path: | | |
| logs/ | |
| test-results/ | |
| artifacts/ | |
| profiles-e2e: | |
| name: profiles-e2e (linux-x86_64) | |
| runs-on: namespace-profile-linux-medium | |
| env: | |
| BV_SKIP_SYQURE: "1" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache workspace dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/../biovault | |
| ${{ github.workspace }}/../syftbox-sdk | |
| ${{ github.workspace }}/../syftbox-crypto | |
| ${{ github.workspace }}/../syftbox | |
| ${{ github.workspace }}/../biovault-beaver | |
| ${{ github.workspace }}/../sbenv | |
| ${{ github.workspace }}/../bioscript | |
| ${{ github.workspace }}/../syqure | |
| key: workspace-deps-${{ runner.os }}-${{ hashFiles('scripts/setup-workspace.sh') }} | |
| restore-keys: | | |
| workspace-deps-${{ runner.os }}- | |
| - name: Setup workspace | |
| run: | | |
| chmod +x scripts/setup-workspace.sh | |
| ./scripts/setup-workspace.sh | |
| - name: Install system dependencies (Tauri + Xvfb) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| xvfb \ | |
| libwebkit2gtk-4.1-dev \ | |
| build-essential \ | |
| pkg-config \ | |
| curl \ | |
| xdg-utils \ | |
| wget \ | |
| file \ | |
| lsof \ | |
| libxdo-dev \ | |
| libssl-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| libsqlite3-dev \ | |
| libgtk-3-dev \ | |
| coturn | |
| turnserver --version || true | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup sccache | |
| uses: mozilla-actions/sccache-action@v0.0.6 | |
| - name: Enable sccache (if available) | |
| run: | | |
| if SCCACHE_GHA_ENABLED=true sccache --start-server; then | |
| echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
| echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
| else | |
| echo "sccache unavailable; proceeding without cache." | |
| fi | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: | | |
| src-tauri | |
| biovault/cli | |
| syftbox-sdk | |
| - name: Setup Go (syftbox devstack) | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: syftbox/go.mod | |
| cache: true | |
| cache-dependency-path: syftbox/go.sum | |
| - name: Install protoc | |
| uses: arduino/setup-protoc@v2 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: '1.1.38' | |
| - name: Install coturn (macOS) | |
| run: | | |
| brew install coturn | |
| turnserver --version || true | |
| - name: Cache Bun downloads | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| ~/.cache/bun | |
| ~/Library/Caches/bun | |
| ~/AppData/Local/bun/install/cache | |
| key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Install bun dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Cache Playwright browsers | |
| id: cache-playwright-profiles | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/ms-playwright | |
| ~/AppData/Local/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json', 'bun.lock') }} | |
| - name: Install Playwright browsers | |
| if: steps.cache-playwright-profiles.outputs.cache-hit != 'true' | |
| run: bunx --bun playwright install --with-deps chromium | |
| - name: Cache bundled dependencies | |
| id: cache-bundled-profiles | |
| uses: actions/cache@v4 | |
| with: | |
| path: src-tauri/resources/bundled | |
| key: bundled-${{ runner.os }}-${{ hashFiles('scripts/fetch-bundled-deps.sh') }} | |
| - name: Fetch bundled dependencies | |
| if: steps.cache-bundled-profiles.outputs.cache-hit != 'true' | |
| run: | | |
| export BUNDLED_OS="linux" | |
| export BUNDLED_ARCH="x86_64" | |
| chmod +x scripts/fetch-bundled-deps.sh | |
| ./scripts/fetch-bundled-deps.sh | |
| - name: Ensure bundled dependency permissions | |
| run: chmod -R u+rw src-tauri/resources/bundled/ || true | |
| - name: Materialize templates | |
| run: | | |
| chmod +x scripts/materialize-templates.sh || true | |
| ./scripts/materialize-templates.sh || true | |
| - name: Build bv-desktop (release) | |
| run: cargo build --release | |
| working-directory: src-tauri | |
| - name: Run profiles E2E scenario (headless) | |
| env: | |
| SKIP_PLAYWRIGHT_INSTALL: '1' | |
| BV_DEVSTACK_CLIENT_MODE: 'rust' | |
| run: xvfb-run -a ./test-scenario.sh --profiles | |
| - name: Upload test artifacts on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: profiles-e2e-test-results-linux-x86_64 | |
| path: | | |
| logs/ | |
| test-results/ | |
| artifacts/ | |
| profiles-e2e-macos: | |
| name: profiles-e2e (macos-arm64) | |
| runs-on: namespace-profile-mac-medium | |
| env: | |
| BV_SKIP_SYQURE: "1" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache workspace dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/../biovault | |
| ${{ github.workspace }}/../syftbox-sdk | |
| ${{ github.workspace }}/../syftbox-crypto | |
| ${{ github.workspace }}/../syftbox | |
| ${{ github.workspace }}/../biovault-beaver | |
| ${{ github.workspace }}/../sbenv | |
| ${{ github.workspace }}/../bioscript | |
| ${{ github.workspace }}/../syqure | |
| key: workspace-deps-${{ runner.os }}-${{ hashFiles('scripts/setup-workspace.sh') }} | |
| restore-keys: | | |
| workspace-deps-${{ runner.os }}- | |
| - name: Setup workspace | |
| run: | | |
| chmod +x scripts/setup-workspace.sh | |
| ./scripts/setup-workspace.sh | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup sccache | |
| uses: mozilla-actions/sccache-action@v0.0.6 | |
| - name: Enable sccache (if available) | |
| run: | | |
| if SCCACHE_GHA_ENABLED=true sccache --start-server; then | |
| echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
| echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
| else | |
| echo "sccache unavailable; proceeding without cache." | |
| fi | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: | | |
| src-tauri | |
| biovault/cli | |
| syftbox-sdk | |
| - name: Setup Go (syftbox devstack) | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: syftbox/go.mod | |
| cache: true | |
| cache-dependency-path: syftbox/go.sum | |
| - name: Install protoc | |
| uses: arduino/setup-protoc@v2 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: '1.1.38' | |
| - name: Cache Bun downloads | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| ~/.cache/bun | |
| ~/Library/Caches/bun | |
| key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Install bun dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Cache Playwright browsers | |
| id: cache-playwright-profiles-macos | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/ms-playwright | |
| ~/Library/Caches/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json', 'bun.lock') }} | |
| - name: Install Playwright browsers | |
| if: steps.cache-playwright-profiles-macos.outputs.cache-hit != 'true' | |
| run: bunx --bun playwright install chromium | |
| - name: Cache bundled dependencies | |
| id: cache-bundled-profiles-macos | |
| uses: actions/cache@v4 | |
| with: | |
| path: src-tauri/resources/bundled | |
| key: bundled-${{ runner.os }}-${{ hashFiles('scripts/fetch-bundled-deps.sh') }} | |
| - name: Fetch bundled dependencies | |
| if: steps.cache-bundled-profiles-macos.outputs.cache-hit != 'true' | |
| run: | | |
| chmod +x scripts/fetch-bundled-deps.sh | |
| ./scripts/fetch-bundled-deps.sh | |
| - name: Ensure bundled dependency permissions | |
| run: chmod -R u+rw src-tauri/resources/bundled/ || true | |
| - name: Materialize templates | |
| run: | | |
| chmod +x scripts/materialize-templates.sh || true | |
| ./scripts/materialize-templates.sh || true | |
| - name: Build bv-desktop (release) | |
| run: cargo build --release | |
| working-directory: src-tauri | |
| - name: Run profiles E2E scenario | |
| env: | |
| SKIP_PLAYWRIGHT_INSTALL: '1' | |
| BV_DEVSTACK_CLIENT_MODE: 'rust' | |
| run: ./test-scenario.sh --profiles | |
| - name: Upload test artifacts on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: profiles-e2e-test-results-macos-arm64 | |
| path: | | |
| logs/ | |
| test-results/ | |
| artifacts/ | |
| profiles-e2e-windows: | |
| name: profiles-e2e (windows-x86_64) | |
| runs-on: namespace-profile-windows-medium | |
| defaults: | |
| run: | |
| shell: pwsh | |
| env: | |
| BV_SKIP_SYQURE: "1" | |
| BV_DEVSTACK_NO_TURN: "1" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache workspace dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/../biovault | |
| ${{ github.workspace }}/../syftbox-sdk | |
| ${{ github.workspace }}/../syftbox-crypto | |
| ${{ github.workspace }}/../syftbox | |
| ${{ github.workspace }}/../biovault-beaver | |
| ${{ github.workspace }}/../sbenv | |
| ${{ github.workspace }}/../bioscript | |
| ${{ github.workspace }}/../syqure | |
| key: workspace-deps-${{ runner.os }}-${{ hashFiles('scripts/setup-workspace.sh') }} | |
| restore-keys: | | |
| workspace-deps-${{ runner.os }}- | |
| - name: Setup workspace | |
| run: .\win.ps1 ./scripts/setup-workspace.sh | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Setup sccache | |
| uses: mozilla-actions/sccache-action@v0.0.6 | |
| - name: Enable sccache (if available) | |
| run: | | |
| $env:SCCACHE_GHA_ENABLED = "true" | |
| & sccache --start-server | |
| $sccacheExit = $LASTEXITCODE | |
| if ($sccacheExit -eq 0) { | |
| "RUSTC_WRAPPER=sccache" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| "SCCACHE_GHA_ENABLED=true" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| } else { | |
| Write-Host "sccache unavailable; proceeding without cache." | |
| $global:LASTEXITCODE = 0 | |
| } | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: | | |
| src-tauri | |
| biovault/cli | |
| syftbox-sdk | |
| - name: Setup Go (syftbox devstack) | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: syftbox/go.mod | |
| cache: true | |
| cache-dependency-path: syftbox/go.sum | |
| - name: Install protoc | |
| uses: arduino/setup-protoc@v2 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: '1.1.38' | |
| - name: Cache Bun downloads | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.bun/install/cache | |
| ~/.cache/bun | |
| ~/Library/Caches/bun | |
| ~/AppData/Local/bun/install/cache | |
| key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Install bun dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Cache Playwright browsers | |
| id: cache-playwright-profiles | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/ms-playwright | |
| ~/AppData/Local/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json', 'bun.lock') }} | |
| - name: Install Playwright browsers | |
| if: steps.cache-playwright-profiles.outputs.cache-hit != 'true' | |
| run: bunx --bun playwright install chromium | |
| - name: Cache bundled dependencies | |
| id: cache-bundled-profiles | |
| uses: actions/cache@v4 | |
| with: | |
| path: src-tauri/resources/bundled | |
| key: bundled-${{ runner.os }}-${{ hashFiles('scripts/fetch-bundled-deps.sh', 'scripts/windows/bundle-deps.ps1', 'scripts/bundled-deps.json') }} | |
| - name: Fetch bundled dependencies | |
| if: steps.cache-bundled-profiles.outputs.cache-hit != 'true' | |
| run: .\scripts\windows\bundle-deps.ps1 | |
| - name: Ensure bundled dependency permissions | |
| run: Write-Host "Skipping chmod on Windows." | |
| - name: Materialize templates | |
| run: .\win.ps1 ./scripts/materialize-templates.sh | |
| - name: Build bv-desktop (release) | |
| run: cargo build --release | |
| working-directory: src-tauri | |
| - name: Run profiles E2E scenario | |
| env: | |
| SKIP_PLAYWRIGHT_INSTALL: '1' | |
| BV_DEVSTACK_CLIENT_MODE: 'rust' | |
| run: .\win.ps1 ./test-scenario.sh --profiles | |
| - name: Upload test artifacts on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: profiles-e2e-test-results-windows-x86_64 | |
| path: | | |
| logs/ | |
| test-results/ | |
| artifacts/ |