perf(daemon): per-root DashMap sharding, normalizers, and bounded connection pool #3437
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: | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - 'Taskfile.yml' | |
| - 'flake.nix' | |
| - 'flake.lock' | |
| - '.github/workflows/test.yml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - 'Cargo.toml' | |
| - 'Cargo.lock' | |
| - 'Taskfile.yml' | |
| - 'flake.nix' | |
| - 'flake.lock' | |
| - '.github/workflows/test.yml' | |
| merge_group: | |
| branches: [main] | |
| jobs: | |
| test: | |
| name: Test on ${{ matrix.os }} (${{ matrix.test_mode }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| test_mode: wrapper | |
| test_threads: 4 | |
| daemon_pool: 4 | |
| - os: ubuntu-latest | |
| test_mode: daemon | |
| test_threads: 4 | |
| daemon_pool: 4 | |
| - os: ubuntu-latest | |
| test_mode: wrapper-daemon | |
| test_threads: 4 | |
| daemon_pool: 4 | |
| - os: windows-latest | |
| test_mode: wrapper | |
| test_threads: 4 | |
| daemon_pool: 4 | |
| - os: windows-latest | |
| test_mode: daemon | |
| test_threads: 4 | |
| daemon_pool: 4 | |
| - os: windows-latest | |
| test_mode: wrapper-daemon | |
| test_threads: 4 | |
| daemon_pool: 4 | |
| - os: macos-latest | |
| test_mode: wrapper | |
| test_threads: 2 | |
| daemon_pool: 2 | |
| - os: macos-latest | |
| test_mode: daemon | |
| test_threads: 2 | |
| daemon_pool: 2 | |
| - os: macos-latest | |
| test_mode: wrapper-daemon | |
| test_threads: 2 | |
| daemon_pool: 2 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| # submodules: true | |
| fetch-depth: 0 | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Cache dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| ${{ runner.os != 'Windows' && 'target' || '' }} | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Install Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| - name: Install Graphite CLI | |
| run: npm install -g @withgraphite/graphite-cli@stable | |
| - name: Install mold linker (Linux) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get install -y mold | |
| - name: Run tests | |
| run: cargo test -- --test-threads=${{ matrix.test_threads }} | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| GIT_AI_TEST_GIT_MODE: ${{ matrix.test_mode }} | |
| GIT_AI_TEST_SHARED_DAEMON_POOL_SIZE: ${{ matrix.daemon_pool }} | |
| RUSTFLAGS: ${{ runner.os == 'Linux' && '-C link-arg=-fuse-ld=mold' || '' }} | |
| test-ignored: | |
| name: Test SCM e2e tests on just Ubuntu | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| # submodules: true | |
| fetch-depth: 0 | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Cache dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| ${{ runner.os != 'Windows' && 'target' || '' }} | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Run ignored tests | |
| run: cargo test --test integration github_integration -- --ignored | |
| env: | |
| CARGO_INCREMENTAL: 0 |