forked from getsentry/sentry-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
96 lines (80 loc) · 2.72 KB
/
azure-pipelines.yml
File metadata and controls
96 lines (80 loc) · 2.72 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
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- "*"
pr: none
variables:
ARTIFACT_DIR: 'sentrypad-data'
stages:
- stage: prepare_build_files
displayName: Prepare sources
jobs:
- job: package_sources
displayName: "; package sources"
pool:
vmImage: "macos-10.13"
steps:
- bash: |
set -eux
bash package.sh
mv out sp-sources
zip -r sp-sources sp-sources/
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: 'sp-sources.zip'
artifactName: $(ARTIFACT_DIR)
- stage: build_per_platform
displayName: Build Crashpad
jobs:
- template: azure-pipelines/build-crashpad.yml
parameters:
vmImage: "macos-10.13"
platform: "macosx"
buildSystem: "gmake2"
buildScript: |
make
# Smoke test
./bin/Release/sentry_example_crashpad || true
- template: azure-pipelines/build-crashpad.yml
parameters:
vmImage: "vs2017-win2016"
platform: "windows"
buildSystem: "vs2017"
buildScript: |
MSBUILD="/c/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/MSBuild/15.0/Bin/MSBuild.exe"
"$MSBUILD" Sentrypad.sln //m //p:Configuration=Release //p:Platform=Win64 //t:Clean,Build
# Smoke test
./bin/Win64/Release/sentry_example_crashpad.exe || true
- stage: package_all
displayName: Package the final archive
jobs:
- job: package_all
pool:
vmImage: "macos-10.13"
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: $(ARTIFACT_DIR)
downloadPath: '.'
- bash: |
set -eux
mkdir out
cd out
unzip -q "../${ARTIFACT_DIR}/sp-sources.zip"
PLATFORMS=(macosx windows)
# Copy gen_* directories from available archives
for PLATFORM in "${PLATFORMS[@]}"; do
rm -rf ./sentrypad
unzip -q "../${ARTIFACT_DIR}/sentrypad-crashpad-${PLATFORM}.zip"
rm -rf "./sp-sources/gen_${PLATFORM}"
mv "sentrypad/gen_${PLATFORM}" "./sp-sources/gen_${PLATFORM}"
done
rm -rf ./sentrypad
mv sp-sources sentrypad
zip -r sentrypad-crashpad-all sentrypad/
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: 'out/sentrypad-crashpad-all.zip'
artifactName: $(ARTIFACT_DIR)