-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 984 Bytes
/
ci.yml
File metadata and controls
42 lines (35 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: CI
on:
push:
branches: ["main"]
pull_request:
jobs:
build-and-test:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Select latest Xcode
shell: bash
run: |
set -euo pipefail
XCODE_PATH="$(ls -1d /Applications/Xcode*.app 2>/dev/null | sort -V | tail -n 1)"
if [[ -z "${XCODE_PATH:-}" ]]; then
echo "No Xcode installation found on runner." >&2
exit 1
fi
sudo xcode-select -s "$XCODE_PATH/Contents/Developer"
xcodebuild -version
- name: Verify Swift 6 toolchain
shell: bash
run: |
set -euo pipefail
swift --version
if ! swift --version | grep -E "Swift version 6\\." >/dev/null; then
echo "Swift 6.x is required for CI." >&2
exit 1
fi
- name: Build
run: swift build
- name: Test
run: swift test