viewer: inbox+outbox panels, drag paths into other apps, noindex ever… #133
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: Build | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| env: | |
| GRCOV_VERSION: "0.10.5" | |
| RUST_VERSION: "1.95.0" | |
| jobs: | |
| build: | |
| name: Build & test & lint | |
| runs-on: ubuntu-latest | |
| outputs: | |
| deb-artifact-id: ${{ steps.upload-deb.outputs.artifact-id }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| libvulkan-dev \ | |
| libwayland-dev \ | |
| libxkbcommon-dev \ | |
| libxkbcommon-x11-dev \ | |
| libx11-dev \ | |
| libxcb1-dev \ | |
| libxcb-render0-dev \ | |
| libxcb-shm0-dev \ | |
| libxcb-xkb-dev \ | |
| libfontconfig-dev \ | |
| libfreetype-dev | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| components: clippy, rustfmt, llvm-tools | |
| - name: Cache cargo artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build without energy feature | |
| run: cargo check --locked --no-default-features --features gui | |
| - name: Build | |
| run: cargo build --locked --all-targets | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| RUSTFLAGS: "-Cinstrument-coverage" | |
| RUSTDOCFLAGS: "-Cinstrument-coverage" | |
| - name: Build headless | |
| run: cargo build --locked --no-default-features --features headless,happier-bridge,energy | |
| - name: Run tests | |
| run: cargo test --locked --all-targets --no-fail-fast | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| RUSTFLAGS: "-Cinstrument-coverage" | |
| RUSTDOCFLAGS: "-Cinstrument-coverage" | |
| - name: Run headless tests | |
| run: cargo test --locked --no-default-features --features headless --no-fail-fast | |
| - name: Check formatting | |
| run: cargo fmt -- --check | |
| - name: Clippy (GUI) | |
| run: cargo clippy --all-targets --locked -- -D warnings | |
| - name: Clippy (headless) | |
| run: cargo clippy --no-default-features --features headless,happier-bridge,energy --all-targets --locked -- -D warnings | |
| - name: Install grcov | |
| run: | | |
| mkdir -p "${HOME}/.local/bin" | |
| curl -sL https://github.com/mozilla/grcov/releases/download/v${GRCOV_VERSION}/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - -C "${HOME}/.local/bin" | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Run grcov | |
| run: grcov . --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./coverage.lcov | |
| flags: rust | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Build .deb packages | |
| run: | | |
| cargo install cargo-deb | |
| cargo deb -p tab-atelier --locked | |
| cargo deb -p tab-atelier --variant headless --locked | |
| - name: Upload .deb packages | |
| id: upload-deb | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: tab-atelier-deb | |
| path: target/debian/*.deb | |
| retention-days: 5 | |
| # Two .deb files now (GUI + headless). upload-artifact@v7 | |
| # with `archive: false` requires exactly one file; default | |
| # (archive: true) bundles them into a zip that the | |
| # download step unpacks on its end. | |
| integration: | |
| name: Integration test (debian:trixie-slim) | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| artifact-ids: ${{ needs.build.outputs.deb-artifact-id }} | |
| merge-multiple: true | |
| - name: Install .deb and run --check-crypto | |
| run: | | |
| # The two variants ship with `Conflicts:` against | |
| # each other (Cargo.toml metadata.deb), so installing | |
| # both at once breaks apt's solver. Install + probe | |
| # them sequentially. The GUI variant's --check-crypto | |
| # works headless because it only spins up rustls, | |
| # not gpui. | |
| docker run --rm \ | |
| -v "$PWD:/debs:ro" \ | |
| debian:trixie-slim \ | |
| sh -c "apt-get update \ | |
| && apt-get install -y --no-install-recommends /debs/tab-atelier-headless_*.deb \ | |
| && tab-atelier-headless --check-crypto \ | |
| && apt-get remove -y --purge tab-atelier-headless \ | |
| && apt-get install -y --no-install-recommends /debs/tab-atelier_*.deb \ | |
| && tab-atelier --check-crypto" |