-
Notifications
You must be signed in to change notification settings - Fork 41
/
azure-pipelines.yml
42 lines (39 loc) · 1.36 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
trigger:
- master
variables:
SWIFTPM_CACHE_FOLDER: '.build'
jobs:
- job: macOS
pool:
vmImage: 'macOS-15'
steps:
- bash: 'sudo xcode-select -s /Applications/Xcode_15.3.app/Contents/Developer'
- task: Cache@2
inputs:
key: 'v2 | "swiftpm" | "$(Agent.OS)" | Package.resolved'
path: $(SWIFTPM_CACHE_FOLDER)
displayName: Cache Swift build
- bash: 'swift --version'
- bash: 'swift package resolve'
- bash: 'swift test --enable-code-coverage'
- bash: 'xcrun llvm-profdata merge -sparse ./.build/debug/codecov/*.profraw -o coverage.profdata'
- bash: 'xcrun llvm-cov show ./.build/debug/SwiftRewriter -instr-profile=./coverage.profdata --ignore-filename-regex=ObjcParserAntlr Sources > coverage.txt'
- bash: 'bash <(curl -s https://codecov.io/bash)'
# Avoid caching build artifacts and focus on checkout state only
- bash: 'rm -r $(dirname $(swift build --show-bin-path))'
- job: Linux
container:
image: swift:6.0-focal
pool:
vmImage: ubuntu-20.04
steps:
- task: Cache@2
inputs:
key: 'v2 | "swiftpm" | "$(Agent.OS)" | Package.resolved'
path: $(SWIFTPM_CACHE_FOLDER)
displayName: Cache Swift build
- bash: 'swift --version'
- bash: 'swift package resolve'
- bash: 'swift test'
# Avoid caching build artifacts and focus on checkout state only
- bash: 'rm -r $(dirname $(swift build --show-bin-path))'