-
Notifications
You must be signed in to change notification settings - Fork 45
163 lines (123 loc) · 4.25 KB
/
Copy pathswift.yaml
File metadata and controls
163 lines (123 loc) · 4.25 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: Swift CI
permissions:
contents: read
pull-requests: write
on:
push:
branches:
- main
pull_request:
env:
XCODE_VERSION: 26.3
TUIST_TEST_DEVICE: iPad (10th generation)
TUIST_TEST_PLATFORM: iOS
# NOTE: When modifying jobs, you'll likely need to update the required status checks in GitHub repo settings.
# At time of writing, this can be found via (requires admin access):
# Settings → Branches → Edit "main" rule → "Require status checks to pass before merging"
# E.g. if the sdk version in the matrix below was bumped from 18.1 to 18.5, you would add 'development-tests [iOS 18.5]' to the required status checks, and remove 'development-tests [iOS 18.1]'.
jobs:
development-tests:
runs-on: macos-26
name: "development-tests [iOS ${{ matrix.sdk }}]"
env:
TUIST_TEST_SCHEME: UnitTests
strategy:
fail-fast: false
matrix:
include:
- sdk: "16.4"
simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-16-4"
installation_required: true
- sdk: "17.5"
simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-17-5"
installation_required: true
- sdk: "26.2"
simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-26-2"
installation_required: false
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- name: Switch to Xcode ${{ env.XCODE_VERSION }}
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
- name: Install iOS ${{ matrix.sdk }}
if: ${{ matrix.installation_required }}
run: |
sudo xcodes runtimes install "iOS ${{ matrix.sdk }}"
xcrun simctl list
- name: Ensure sim exists
run: |
xcrun simctl create \
"${{ env.TUIST_TEST_DEVICE }}" \
"${{ env.TUIST_TEST_DEVICE }}" \
"${{ matrix.simctl_runtime }}"
- name: Install dependencies
run: tuist install --path Samples
- name: Run Tests
run: tuist test --path Samples ${{ matrix.scheme }} --os "${{ matrix.sdk }}"
snapshot-tests:
runs-on: macos-26
env:
TUIST_TEST_OS: 26.2
TUIST_TEST_SCHEME: SnapshotTests
name: "snapshot-tests [iOS ${{ matrix.sdk }}]"
strategy:
fail-fast: false # Don’t fail-fast so that we get all snapshot test changes
matrix:
include:
- sdk: "26.2"
simctl_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-26-2"
installation_required: false
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- name: Switch Xcode
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
- name: Install iOS ${{ matrix.sdk }}
if: ${{ matrix.installation_required }}
run: |
sudo xcodes runtimes install "iOS ${{ matrix.sdk }}"
xcrun simctl list
- name: Ensure sim exists
run: |
xcrun simctl create \
"${{ env.TUIST_TEST_DEVICE }}" \
"${{ env.TUIST_TEST_DEVICE }}" \
"${{ matrix.simctl_runtime }}"
- name: Install dependencies
run: tuist install --path Samples
- name: Run Snapshot Tests
run: tuist test --path Samples
package-tests:
runs-on: macos-26
steps:
- uses: actions/checkout@v4
- name: Switch Xcode
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
- name: Clear cache
run: swift package clean
- name: Build
run: swift build --triple arm64-darwin-macosx --build-tests
# Command line swift runs on the host platform.
# On macOS we can run macro tests.
- name: Test macOS
run: swift test
tutorial:
runs-on: macos-26
env:
TUIST_TEST_DEVICE: iPad Air 11-inch (M3)
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- name: Switch Xcode
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
- name: Install dependencies
run: tuist install --path Samples/Tutorial
- name: Tutorial App
run: tuist test --path Samples/Tutorial TutorialTests
swiftformat:
runs-on: macos-26
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
- name: Run swiftformat
run: swiftformat --lint .