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
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI
on:
push:
branches: [main]
pull_request:

jobs:
test:
runs-on: macos-15
steps:
- uses: actions/checkout@v4

- name: Select Xcode 16+
run: |
# Same selection logic as release.yml: pick the newest installed
# Xcode >= 16 (Package.swift needs Swift 6) rather than trusting the
# runner default.
sel="$(for app in /Applications/Xcode*.app; do
[ -d "$app" ] || continue
v="$("$app/Contents/Developer/usr/bin/xcodebuild" -version 2>/dev/null | awk 'NR==1{print $2}')"
[ -n "$v" ] || continue
printf '%s\t%s\n' "$v" "$app"
done | sort -V | awk -F'\t' '($1+0)>=16{last=$2} END{print last}')"
if [ -z "$sel" ]; then
echo "No Xcode 16+ found on this runner. Installed Xcodes:" >&2
ls -d /Applications/Xcode*.app >&2 || true
exit 1
fi
sudo xcode-select -s "$sel"
echo "Selected $(xcodebuild -version | head -1) at $sel"

- name: Build
run: swift build

- name: Test
run: swift test
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
sudo xcode-select -s "$sel"
echo "Selected $(xcodebuild -version | head -1) at $sel"

- name: Run unit tests
run: swift test

- name: Derive version numbers from tag
id: ver
run: |
Expand Down
Loading