fix(swe): resolve tool server startup failures with port allocation, retries, and shell fallback #59
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_NET_RETRY: 10 | |
| RUST_BACKTRACE: short | |
| jobs: | |
| # ────────────────────────────────────────────── | |
| # Fast checks (clippy + fmt) — run first, fail fast | |
| # ────────────────────────────────────────────── | |
| lint: | |
| name: Lint & Format | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install mold linker | |
| run: sudo apt-get update -qq && sudo apt-get install -y -qq mold clang | |
| - name: Install Rust nightly | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: clippy, rustfmt | |
| - name: Cache cargo registry + target | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: lint-${{ runner.os }}-nightly-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| lint-${{ runner.os }}-nightly- | |
| - name: Check formatting | |
| run: cargo +nightly fmt --all -- --check | |
| - name: Clippy | |
| run: cargo +nightly clippy --all-targets --all-features -- -D warnings | |
| # ────────────────────────────────────────────── | |
| # Build (release profile, nightly, max parallelism, mold) | |
| # ────────────────────────────────────────────── | |
| build: | |
| name: Build (nightly, release) | |
| runs-on: blacksmith-32vcpu-ubuntu-2404 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install mold linker | |
| run: sudo apt-get update -qq && sudo apt-get install -y -qq mold clang | |
| - name: Install Rust nightly | |
| uses: dtolnay/rust-toolchain@nightly | |
| - name: Cache cargo registry + target | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: build-${{ runner.os }}-nightly-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| build-${{ runner.os }}-nightly- | |
| - name: Build release | |
| run: cargo +nightly build --release -j $(nproc) | |
| env: | |
| RUSTFLAGS: "-C debuginfo=0 -C target-cpu=native -C link-arg=-fuse-ld=mold -D warnings" | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: swe-forge-linux-x86_64 | |
| path: target/release/swe-forge | |
| retention-days: 7 | |
| # ────────────────────────────────────────────── | |
| # Tests (parallel, nightly, 32 vCPU, mold) | |
| # ────────────────────────────────────────────── | |
| test: | |
| name: Tests | |
| runs-on: blacksmith-32vcpu-ubuntu-2404 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install mold linker | |
| run: sudo apt-get update -qq && sudo apt-get install -y -qq mold clang | |
| - name: Install Rust nightly | |
| uses: dtolnay/rust-toolchain@nightly | |
| - name: Cache cargo registry + target | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: test-${{ runner.os }}-nightly-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| test-${{ runner.os }}-nightly- | |
| - name: Run tests | |
| run: cargo +nightly test --release -j $(nproc) -- --test-threads=$(nproc) | |
| env: | |
| RUST_LOG: warn | |
| # ────────────────────────────────────────────── | |
| # Doc tests (separate, lighter) | |
| # ────────────────────────────────────────────── | |
| doc: | |
| name: Doc tests | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install mold linker | |
| run: sudo apt-get update -qq && sudo apt-get install -y -qq mold clang | |
| - name: Install Rust nightly | |
| uses: dtolnay/rust-toolchain@nightly | |
| - name: Cache cargo registry + target | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: doc-${{ runner.os }}-nightly-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| doc-${{ runner.os }}-nightly- | |
| - name: Run doc tests | |
| run: cargo +nightly test --doc -j $(nproc) | |
| # ────────────────────────────────────────────── | |
| # Security audit | |
| # ────────────────────────────────────────────── | |
| audit: | |
| name: Security audit | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit --locked | |
| - name: Run audit | |
| run: cargo audit | |
| continue-on-error: true |