-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
Copy pathazure-pipelines.yml
104 lines (98 loc) · 2.94 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
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
trigger:
- main
variables:
CI: 'true'
jobs:
- job: spm_linux
displayName: 'SPM, Linux : Swift 6'
pool:
vmImage: 'ubuntu-24.04' # "Noble Numbat"
container: swift:6.0-noble
steps:
- script: swift test --parallel -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
displayName: Run tests
- job: bazel_linux
displayName: 'Bazel, Linux : Swift 6'
pool:
vmImage: 'ubuntu-24.04'
steps:
- script: |
export PATH="/usr/share/swift/usr/bin:$PATH"
git apply --ignore-whitespace .bcr/patches/no-warnings-as-errors.patch
bazel build :swiftlint
displayName: Build SwiftLint with Bazel
env:
CC: "clang"
- job: tests_macos
displayName: 'Tests, macOS'
strategy:
maxParallel: '10'
matrix:
'14 : Xcode 15.4':
image: 'macOS-14'
xcode: '15.4'
# '14 : Xcode 16.2': Runs on Buildkite.
'15 : Xcode 15.4':
image: 'macOS-15'
xcode: '15.4'
'15 : Xcode 16.2':
image: 'macOS-15'
xcode: '16.2'
pool:
vmImage: $(image)
variables:
DEVELOPER_DIR: /Applications/Xcode_$(xcode).app
steps:
- script: swift test --parallel -Xswiftc -DDISABLE_FOCUSED_EXAMPLES
displayName: Run tests
- job: plugins_linux # Plugins shall be able to run on older Swift versions.
displayName: 'Plugins, Linux'
pool:
vmImage: 'ubuntu-24.04' # "Noble Numbat"
strategy:
maxParallel: '10'
matrix:
': Swift 5.9':
image: swift:5.9-focal
': Swift 5.10':
image: swift:5.10-noble
': Swift 6':
image: swift:6.0-noble
container: $[ variables['image'] ]
steps:
- script: swift build -c release --product SwiftLintCommandPlugin
displayName: Build command plugin
- script: swift build -c release --product SwiftLintBuildToolPlugin
displayName: Build build tool plugin
- job: Jazzy
pool:
vmImage: 'macOS-14'
variables:
DEVELOPER_DIR: /Applications/Xcode_15.4.app
steps:
- script: swift run swiftlint generate-docs
displayName: Generate documentation
- script: bundle install --path vendor/bundle
displayName: Install dependencies
- 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'
displayName: Publish API docs
- task: DownloadSecureFile@1
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')
inputs:
secureFile: doc_deploy_key
displayName: Download deploy key
- script: ./tools/push-docs
displayName: Push documentation to GitHub Pages
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main')