-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (77 loc) · 2.03 KB
/
pull_request.yml
File metadata and controls
82 lines (77 loc) · 2.03 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Pull Request
on:
pull_request:
branches: [ main ]
workflow_dispatch:
env:
SCHEME: "CodablePlus"
jobs:
Lint:
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Lint
run: swiftformat --lint . --reporter github-actions-log
Swift:
strategy:
fail-fast: false
matrix:
os: [
macos-26,
ubuntu-latest,
]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cache
uses: actions/cache@v5
with:
path: |
.build
~/Library/Developer/Xcode/DerivedData/ModuleCache.noindex
~/Library/Caches/org.swift.swiftpm
~/Library/org.swift.swiftpm
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.swift', '**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Package Resolution
run: swift package resolve
- name: Build
run: swift build
- name: Test
run: swift test
Xcode:
strategy:
fail-fast: false
matrix:
platform: [
"macOS",
"iOS",
"tvOS",
"watchOS",
"visionOS",
"macOS,variant=Mac Catalyst",
]
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cache
uses: actions/cache@v5
with:
path: |
.build
~/Library/Developer/Xcode/DerivedData/ModuleCache.noindex
~/Library/Caches/org.swift.swiftpm
~/Library/org.swift.swiftpm
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.swift', '**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-
- name: Package Resolution
run: set -o pipefail && xcodebuild -resolvePackageDependencies | xcbeautify
- name: Build
env:
DESTINATION: "generic/platform=${{ matrix.platform }}"
run: set -o pipefail && xcodebuild build -scheme "$SCHEME" -destination "$DESTINATION" | xcbeautify