name: CI on: pull_request: push: branches: [master] env: CARGO_TERM_COLOR: always RUSTC_WRAPPER: sccache SCCACHE_GHA_ENABLED: "true" SCCACHE_CACHE_SIZE: "2G" jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v5 - name: Setup Rust uses: dtolnay/rust-toolchain@stable with: components: rustfmt, clippy - name: Install sccache uses: taiki-e/install-action@sccache - name: Configure sccache uses: actions/github-script@v7 with: script: | core.exportVariable("ACTIONS_RESULTS_URL", process.env.ACTIONS_RESULTS_URL || ""); core.exportVariable("ACTIONS_RUNTIME_TOKEN", process.env.ACTIONS_RUNTIME_TOKEN || ""); - name: Rust cache uses: Swatinem/rust-cache@v2 with: workspaces: src-tauri - name: Setup pnpm uses: pnpm/action-setup@v4 with: version: 10 - name: Setup Node uses: actions/setup-node@v4 with: node-version: 20 cache: "pnpm" - name: Install JS deps run: pnpm install --frozen-lockfile --prefer-offline - name: Install Linux dependencies run: | sudo apt-get update sudo apt-get install -y --no-install-recommends \ build-essential \ libxdo-dev \ libglib2.0-dev \ libwebkit2gtk-4.1-dev \ libayatana-appindicator3-dev \ librsvg2-dev \ patchelf # this will run again in next step, but we run it here to separate the error from the frontend build step - name: Generate frontend bindings run: pnpm run generate-types - name: Build frontend (tsc + vite) run: | pnpm run build # implicitly runs generate-types - name: Format check run: cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check - name: Clippy run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features -- -D warnings - name: Run tests run: cargo test --manifest-path src-tauri/Cargo.toml --all-features - name: sccache stats if: always() run: sccache --show-stats