From b539ffac50c5094c1e9a9063b10bd47a7a2c4d25 Mon Sep 17 00:00:00 2001 From: Dance Chess Date: Sun, 6 Sep 2026 22:38:40 -0700 Subject: [PATCH] Run the tests, the Swift build and the smoke check on every pull request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Until now the only workflow ran on a tag push, so a pull request carried no checks at all. This runs what a release would run, minus the DMG: cargo test, the bindings regenerated by build-core.sh, the SwiftPM build, and StudioSmoke against a real Stockfish — on the same macos-15 runner, so a green check here means the release build gets through too. The structural work that follows (per-window databases, native tabs) touches the write-back path, and it is going in as pull requests precisely so it can be reviewed and reverted as a unit. A check that means something is the first half of that. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01F9o9DSzZas4GsekCpG5M8T --- .github/workflows/ci.yml | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3152355 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,55 @@ +name: CI + +# Every pull request and every push to main: the Rust tests, the Swift +# build against freshly generated bindings, and the end-to-end smoke run +# with a real Stockfish. Same machine and setup as the release workflow, so +# a green check here means the release build will get through too. +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + check: + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + run: | + command -v cargo || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \ + | sh -s -- -y --default-toolchain stable --profile minimal + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + + - name: Cache cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + core/target + key: cargo-${{ runner.os }}-${{ hashFiles('core/Cargo.lock') }} + restore-keys: cargo-${{ runner.os }}- + + # StudioSmoke drives a real engine; the bridge checks run without it + - name: Install Stockfish + run: brew install stockfish + + - name: Test the core + run: cargo test --manifest-path core/Cargo.toml --release + + - name: Build the core and generate bindings + run: ./scripts/build-core.sh + + - name: Build the app (SwiftPM, no Xcode) + run: swift build --package-path app + + - name: Smoke test (bridge + UCI) + run: swift run --package-path app StudioSmoke