-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (60 loc) · 1.75 KB
/
build.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build
on:
push:
branches:
- "main"
paths:
- ".github/workflows/build.yml"
- "**.swift"
pull_request:
paths:
- ".github/workflows/build.yml"
- "**.swift"
concurrency:
group: build-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-macos:
name: Build macOS
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "15.0"
- name: Run tests
run: swift test -v
build-other-platforms:
runs-on: macos-14
name: Build ${{ matrix.destination.name }}
strategy:
matrix:
destination:
- name: iOS
value: "platform=iOS Simulator,name=iPhone 14,OS=latest"
- name: tvOS
value: "platform=tvOS Simulator,name=Apple TV,OS=latest"
- name: watchOS
value: "platform=watchOS Simulator,name=Apple Watch Series 8 (41mm),OS=latest"
- name: Catalyst
value: "platform=macOS,variant=Mac Catalyst,arch=arm64"
# - name: visionOS
# value: "generic/platform=visionOS"
steps:
- uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "15.0"
- name: Build
run: |-
set -o pipefail && NSUnbufferedIO=YES xcodebuild clean build \
-scheme ColorToolbox \
-destination '${{ matrix.destination.value }}' \
| xcpretty
- name: Run tests
run: |-
set -o pipefail && NSUnbufferedIO=YES xcodebuild test \
-scheme ColorToolbox \
-destination '${{ matrix.destination.value }}' \
-sdk iphonesimulator \
| xcpretty