-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
azure-pipelines.yml
78 lines (74 loc) · 2.07 KB
/
azure-pipelines.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
trigger:
- main
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-24.04'
strategy:
maxParallel: 10
matrix:
'Swift 6':
image: swift:6.0-noble
container: $[ variables['image'] ]
steps:
- script: swift test --parallel -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
displayName: swift test
- job: macOS
strategy:
maxParallel: 10
matrix:
'13':
image: 'macOS-13'
xcode: '15.2'
'14':
image: 'macOS-14'
xcode: '15.4'
pool:
vmImage: $(image)
variables:
DEVELOPER_DIR: /Applications/Xcode_$(xcode).app
steps:
- script: swift test --parallel -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
displayName: swift test
- job: CocoaPods
pool:
vmImage: 'macOS-14'
variables:
DEVELOPER_DIR: /Applications/Xcode_16.app
steps:
- script: bundle install --path vendor/bundle
displayName: bundle install
- script: bundle exec pod repo update
displayName: pod repo update
- script: bundle exec pod lib lint --platforms=macos --verbose
displayName: pod lib lint
- job: Jazzy
pool:
vmImage: 'macOS-14'
variables:
DEVELOPER_DIR: /Applications/Xcode_15.4.app
steps:
- script: swift run swiftlint generate-docs
displayName: Run swiftlint generate-docs
- script: bundle install --path vendor/bundle
displayName: bundle install
- script: bundle exec jazzy
displayName: Run jazzy
- script: >
if ruby -rjson -e "j = JSON.parse(File.read('docs/undocumented.json')); exit j['warnings'].length != 0"; then
echo "Undocumented declarations:"
cat docs/undocumented.json
exit 1
fi
displayName: Validate documentation coverage
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'API Docs'
targetPath: 'docs'
- task: DownloadSecureFile@1
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
inputs:
secureFile: doc_deploy_key
- script: ./tools/push-docs
displayName: Publish
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')