@@ -70,11 +70,12 @@ To add a new Swift Package Manager project, use the following template:
70
70
"path" : " project" ,
71
71
"branch" : " master" ,
72
72
"maintainer" :
" [email protected] " ,
73
- "compatibility" : {
74
- "3.0" : {
73
+ "compatibility" : [
74
+ {
75
+ "version" : " 3.0" ,
75
76
"commit" : " 195cd8cde2bb717242b3081f9c367ccd0a2f0121"
76
77
}
77
- } ,
78
+ ] ,
78
79
"platforms" : [
79
80
" Darwin"
80
81
],
@@ -90,10 +91,13 @@ To add a new Swift Package Manager project, use the following template:
90
91
}
91
92
~~~
92
93
93
- The ` commit ` field specifies a commit hash to pin the repository to. It's
94
- contained inside a ` compatibility ` field which specifies the version of Swift
95
- the commit is known to compile against. Multiple commits compatible with
96
- different versions of Swift can be specified.
94
+ The ` compatibility ` field contains a list of version dictionaries, each
95
+ containing a Swift version and a commit. Commits are checked out before
96
+ building a project in the associated Swift version compatibility mode. The
97
+ Swift version is the earliest version of Swift known to compile the project at
98
+ the given commit. The goal is to have multiple commits at different points in a
99
+ project's history that are compatible with all supported Swift version
100
+ compatibility modes.
97
101
98
102
The ` platforms ` field specifies the platforms that can be used to build the
99
103
project. Linux and Darwin can currently be specified.
@@ -109,11 +113,12 @@ To add a new Swift Xcode workspace, use the following template:
109
113
"path" : " project" ,
110
114
"branch" : " master" ,
111
115
"maintainer" :
" [email protected] " ,
112
- "compatibility" : {
113
- "3.0" : {
116
+ "compatibility" : [
117
+ {
118
+ "version" : " 3.0" ,
114
119
"commit" : " 195cd8cde2bb717242b3081f9c367ccd0a2f0121"
115
120
}
116
- } ,
121
+ ] ,
117
122
"platforms" : [
118
123
" Darwin"
119
124
],
@@ -177,11 +182,12 @@ To add a new Swift Xcode project, use the following template:
177
182
"path" : " project" ,
178
183
"branch" : " master" ,
179
184
"maintainer" :
" [email protected] " ,
180
- "compatibility" : {
181
- "3.0" : {
185
+ "compatibility" : [
186
+ {
187
+ "version" : " 3.0" ,
182
188
"commit" : " 195cd8cde2bb717242b3081f9c367ccd0a2f0121"
183
189
}
184
- } ,
190
+ ] ,
185
191
"platforms" : [
186
192
" Darwin"
187
193
],
@@ -206,15 +212,15 @@ in Xcode 8.0.
206
212
# Select Xcode 8.0 GM
207
213
sudo xcode-select -s /Applications/Xcode.app
208
214
# Build project at pinned commit against selected Xcode
209
- ./project_precommit_check project-path-field
215
+ ./project_precommit_check project-path-field --earliest-compatible-swift-version 3.0
210
216
~~~
211
217
212
218
On Linux, you can build against the Swift 3.0 release toolchain:
213
219
214
220
~~~ bash
215
221
curl -O https://swift.org/builds/swift-3.0-release/ubuntu1510/swift-3.0-RELEASE/swift-3.0-RELEASE-ubuntu15.10.tar.gz
216
222
tar xzvf swift-3.0-RELEASE-ubuntu15.10.tar.gz
217
- ./project_precommit_check project-path-field --swiftc swift-3.0-RELEASE-ubuntu15.10/usr/bin/swiftc
223
+ ./project_precommit_check project-path-field --earliest-compatible-swift-version 3.0 -- swiftc swift-3.0-RELEASE-ubuntu15.10/usr/bin/swiftc
218
224
~~~
219
225
220
226
## Maintaining Projects
@@ -238,13 +244,13 @@ To build all projects against a specified Swift compiler locally, use the
238
244
` runner.py ` utility as shown below.
239
245
240
246
~~~ bash
241
- ./runner.py --swift-branch master --projects projects.json --swift-version 3 -- include-actions ' action.startswith("Build")' --swiftc path/to/swiftc
247
+ ./runner.py --swift-branch master --projects projects.json --include-actions ' action.startswith("Build")' --swiftc path/to/swiftc
242
248
~~~
243
249
244
250
Use the ` --include-repos ` flag to build a specific project.
245
251
246
252
~~~ bash
247
- ./runner.py --swift-branch master --projects projects.json --swift-version 3 -- include-actions ' action.startswith("Build")' --include-repos ' path == "Alamofire"' --swiftc path/to/swiftc
253
+ ./runner.py --swift-branch master --projects projects.json --include-actions ' action.startswith("Build")' --include-repos ' path == "Alamofire"' --swiftc path/to/swiftc
248
254
~~~
249
255
250
256
By default, build output is redirected to per-action ` .log ` files in the current
0 commit comments