-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
174 lines (173 loc) · 6.38 KB
/
azure-pipelines.yml
File metadata and controls
174 lines (173 loc) · 6.38 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
164
165
166
167
168
169
170
171
172
173
174
trigger:
branches:
exclude:
- master
tags:
include:
- '*'
exclude:
- '*-test*'
stages:
- stage: test
displayName: 'Build & Test'
jobs:
- job: macos
strategy:
matrix:
macosSwift59:
imageName: 'macOS-14'
DEVELOPER_DIR: '/Applications/Xcode_15.2.app'
IOS_SIMULATOR: 'iPhone 15'
WATCHOS_SIMULATOR: 'Apple Watch Series 6 (44mm)'
macosSwift510:
imageName: 'macOS-14'
DEVELOPER_DIR: '/Applications/Xcode_15.4.app'
IOS_SIMULATOR: 'iPhone 15'
WATCHOS_SIMULATOR: 'Apple Watch Series 6 (44mm)'
macosSwift60:
imageName: 'macOS-15'
DEVELOPER_DIR: '/Applications/Xcode_16.2.app'
IOS_SIMULATOR: 'iPhone 16'
WATCHOS_SIMULATOR: 'Apple Watch Series 10 (42mm)'
macosSwift61:
imageName: 'macOS-15'
DEVELOPER_DIR: '/Applications/Xcode_16.4.app'
IOS_SIMULATOR: 'iPhone 16'
WATCHOS_SIMULATOR: 'Apple Watch Series 10 (42mm)'
macosSwift62:
imageName: 'macOS-15'
DEVELOPER_DIR: '/Applications/Xcode_26.3.app'
IOS_SIMULATOR: 'iPhone 16'
WATCHOS_SIMULATOR: 'Apple Watch Series 10 (42mm)'
pool:
vmImage: $(imageName)
steps:
- script: |
set -e -o xtrace
swift --version
swift build
swift test --filter BitByteDataTests
displayName: 'Build & Test'
- script: |
set -e -o xtrace
swift --version
swift build -c release # Check Release build just in case.
displayName: 'Build Release'
- script: |
set -e -o xtrace
xcodebuild -version
xcrun simctl list > /dev/null
xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=macOS" clean test
xcodebuild -downloadPlatform iOS
xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=iOS Simulator,name=$IOS_SIMULATOR" clean test
xcodebuild -downloadPlatform watchOS
xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=watchOS Simulator,name=$WATCHOS_SIMULATOR" clean test
xcodebuild -downloadPlatform tvOS
xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=tvOS Simulator,name=Apple TV" clean test
displayName: 'Build & Test Darwin Platforms'
- job: linux
strategy:
matrix:
linuxSwift59:
imageName: 'ubuntu-22.04'
containerImage: 'swift:5.9.2-jammy'
linuxSwift510:
imageName: 'ubuntu-24.04'
containerImage: 'swift:5.10.1-noble'
linuxSwift60:
imageName: 'ubuntu-24.04'
containerImage: 'swift:6.0.3-noble'
linuxSwift61:
imageName: 'ubuntu-24.04'
containerImage: 'swift:6.1.3-noble'
linuxSwift62:
imageName: 'ubuntu-24.04'
containerImage: 'swift:6.2.3-noble'
pool:
vmImage: $(imageName)
container: $[ variables['containerImage'] ]
steps:
- script: |
set -e -o xtrace
swift --version
swift build
swift test --filter BitByteDataTests
displayName: 'Build & Test'
- script: |
set -e -o xtrace
swift --version
swift build -c release # Check Release build just in case.
displayName: 'Build Release'
- job: windows
strategy:
matrix:
windowsSwift59:
imageName: 'windows-2022'
containerImage: 'swift:5.9.2-windowsservercore-ltsc2022'
# windowsSwift510:
# imageName: 'windows-2022'
# containerImage: 'swift:5.10.1-windowsservercore-ltsc2022'
windowsSwift60:
imageName: 'windows-2022'
containerImage: 'swift:6.0.3-windowsservercore-ltsc2022'
windowsSwift61:
imageName: 'windows-2022'
containerImage: 'swift:6.1.3-windowsservercore-ltsc2022'
windowsSwift62:
imageName: 'windows-2022'
containerImage: 'swift:6.2.3-windowsservercore-ltsc2022'
pool:
vmImage: $(imageName)
container: $[ variables['containerImage'] ]
steps:
- script: |
swift.exe --version
swift.exe build
swift.exe test --filter BitByteDataTests
displayName: 'Build & Test'
- script: |
swift.exe --version
swift.exe build -c release
displayName: 'Build Release'
- stage: deploy
displayName: Deploy
dependsOn: test
# Deploy on tags only; test tags are excluded in trigger section.
condition: and(not(eq(variables['Build.Reason'], 'PullRequest')), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
jobs:
- job: ghPages
displayName: 'Publish API docs to GH Pages'
pool:
vmImage: 'macOS-14'
variables:
DEVELOPER_DIR: '/Applications/Xcode_15.2.app'
steps:
- script: |
set -e -o xtrace
brew update
brew install sourcekitten
gem install -N jazzy
displayName: 'Install Tools'
- task: InstallSSHKey@0
inputs:
knownHostsEntry: 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk='
sshPublicKey: '$(bbdPubDeployKey)'
sshKeySecureFile: 'bbd_deploy_key'
displayName: 'Install an SSH key'
- script: git worktree add docs gh-pages
displayName: 'Prepare Worktree'
- script: |
sourcekitten doc --spm --module-name BitByteData > docs.json
jazzy
displayName: 'Before Deploy'
- script: |
set -e -o xtrace
git config --local user.name "Azure Pipelines"
git config --local user.email "azuredevops@microsoft.com"
cd docs
git add --all
git commit -m "Deploy to GH Pages [skip ci]" --amend
cd ..
git remote set-url --push origin git@github.com:tsolomko/BitByteData.git
git push --force origin gh-pages:gh-pages
displayName: 'Deploy to GH Pages'