Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
swift:
name: Swift build and test
runs-on: macos-15
timeout-minutes: 20

steps:
- name: Check out repository
uses: actions/checkout@v6

- name: Select Xcode 26
shell: bash
run: |
set -euo pipefail
xcode_app="$(find /Applications -maxdepth 1 -name 'Xcode_26*.app' -print | sort | tail -n 1)"
if [[ -z "$xcode_app" ]]; then
echo "Xcode 26 is required for Swift tools 6.2 but was not found." >&2
exit 1
fi
echo "DEVELOPER_DIR=$xcode_app/Contents/Developer" >> "$GITHUB_ENV"
echo "Selected $xcode_app"

- name: Print tool versions
run: |
xcodebuild -version
swift --version

- name: Build
run: swift build

- name: Test
run: swift test
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ When launching a test build that someone might manually test, pass `CATCH_GLOBAL

## Verification And Debugging

### Continuous Integration

`.github/workflows/build.yml` runs on pushes to `main` and pull requests to `main`. It selects an installed Xcode 26 toolchain for Swift tools 6.2, then runs `swift build` and `swift test`.

The release packaging workflow stays separate in `.github/workflows/release.yml` and only runs for `v*` tags or manual dispatch. To make the per-commit build block merges, a repository admin still needs to add the `Swift build and test` check to the `main` branch protection rule in GitHub settings.

### SwiftUI Previews

Open the package in Xcode and select the `CatchKit` scheme before refreshing SwiftUI previews. `CatchKit` is exposed as a dynamic library product so previews can build through a framework scheme; using the `Catch` executable scheme can produce Xcode's `ENABLE_DEBUG_DYLIB` preview error.
Expand Down