-
Notifications
You must be signed in to change notification settings - Fork 1
108 lines (95 loc) · 2.91 KB
/
ci.yml
File metadata and controls
108 lines (95 loc) · 2.91 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- "**"
schedule:
- cron: "3 3 * * 2" # 3:03 AM, every Tuesday
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
# TODO: Re-enable when --ifdef no-indent works as intended
# lint:
# name: Lint
# runs-on: macos-latest
# steps:
# - name: Git Checkout
# uses: actions/checkout@v5
# - name: Install SwiftFormat
# run: |
# brew unlink swiftformat
# brew install swiftformat --HEAD
# - name: SwiftFormat Lint
# run: swiftformat --lint . --reporter github-actions-log
apple:
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.title, '[skip ci]')
name: ${{ matrix.platform }} (Swift ${{ matrix.swift }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
platform:
- iOS
- mac-catalyst
- macOS
- tvOS
- visionOS
- watchOS
swift:
- "6.1"
- "6.3"
include:
- swift: "6.1"
runner: macos-15
- swift: "6.3"
runner: macos-26
steps:
- name: Git Checkout
uses: actions/checkout@v5
- name: Select Xcode version
uses: mxcl/xcodebuild@v3
with:
swift: ~${{ matrix.swift }}
action: none
verbosity: xcbeautify
- name: Disable SwiftSyntax Prebuilts
# TODO: Drop or update Swift version constraint as prebuilts become available
if: ${{ matrix.swift == '6.3' }}
run: |
defaults write com.apple.dt.Xcode IDEPackageEnablePrebuilts -bool NO
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Developer/Xcode/SourcePackages
rm -rf ~/Library/Caches/org.swift.swiftpm
- if: ${{ matrix.platform != 'macOS' && matrix.platform != 'mac-catalyst' }}
name: Initialize Simulator Service
run: xcrun simctl list
- if: ${{ matrix.platform != 'macOS' && matrix.platform != 'mac-catalyst' }}
name: Download Default Runtime
uses: nick-fields/retry@v3
with:
timeout_minutes: 15
max_attempts: 3
command: xcodebuild -downloadPlatform ${{ matrix.platform }}
- name: Run Tests
uses: mxcl/xcodebuild@v3
with:
platform: ${{ matrix.platform }}
swift: ~${{ matrix.swift }}
action: test
verbosity: xcbeautify
check-swift-syntax-compatibility:
name: Swift Syntax Compatibility Check
runs-on: macos-latest
steps:
- name: Git Checkout
uses: actions/checkout@v5
- name: Run Swift Syntax Compatibility Check
uses: davdroman/swift-macro-compatibility-check@from-version
with:
run-tests: false
from-version: "601.0.0"
major-versions-only: true