-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathci.yml
154 lines (131 loc) · 3.9 KB
/
ci.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
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
variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
CI_BUILD_NUMBER: $(Build.BuildId)
BRANCH_NAME: $(Build.SourceBranchName)
TAG_NAME: $(Build.SourceBranchName)
SDK_VERSION: 3.x
trigger:
- master
- refs/tags/v*
pr:
branches:
include:
- master
schedules:
- cron: "0 0 * * *"
displayName: "Daily midnight build"
branches:
include:
- master
jobs:
- template: jobs/build_and_test.yml
parameters:
name: linux
vmImage: 'ubuntu-18.04'
- template: jobs/build_and_test.yml
parameters:
name: windows
vmImage: 'windows-2019'
- template: jobs/build_and_test.yml
parameters:
name: mac
vmImage: 'macOS-10.15'
- template: jobs/build_and_test_intrinsics.yml
parameters:
name: intrinsics
vmImage: 'ubuntu-18.04'
- job: deploy
dependsOn:
- linux
- windows
- mac
pool:
vmImage: 'windows-2019'
condition: and( succeeded(), startsWith( variables['Build.SourceBranch'], 'refs/tags' ) )
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: current
artifactName: 'NuGet-Packed'
downloadPath: .
# Hack for file not found when using ./build.sh deploy
# With ls -la the files are listed, but can't be found anyway.
# I tried quite a lot, relative and absolute path, nothing worked.
# This hack does the job.
- bash: |
chmod u+x ./build.sh
echo "-------------------------------------------------"
echo "Nuget-Packed:"
ls -la "NuGet-Packed"
if [[ "$TAG_NAME" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)(-(preview-[0-9]+))$ ]]; then
mkdir deploy_myget
for package in NuGet-Packed/*.nupkg; do
mv $package deploy_myget
done
elif [[ "$TAG_NAME" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
mkdir deploy_nuget
for package in NuGet-Packed/*.nupkg; do
mv $package deploy_nuget
done
else
echo "no deploy, as $TAG_NAME does not match"
echo ##vso[task.complete result=Skipped;]tag does not match for deploy
fi
echo "-------------------------------------------------"
echo "myget:"
ls -la deploy_myget
echo "-------------------------------------------------"
echo "nuget:"
ls -la deploy_nuget
echo "-------------------------------------------------"
displayName: 'deploy to myget / nuget'
- task: NuGetCommand@2
inputs:
command: push
packagesToPush: deploy_myget/*.nupkg
nuGetFeedType: external
publishFeedCredentials: 'myget - gfoidl'
displayName: deploy_myget
- task: NuGetCommand@2
inputs:
command: push
packagesToPush: deploy_nuget/*.nupkg
nuGetFeedType: external
publishFeedCredentials: 'nuget - gfoidl'
displayName: deploy_nuget
- template: jobs/demo.yml
parameters:
name: demo_linux
vmImage: 'ubuntu-18.04'
dependsOn: linux
- template: jobs/demo.yml
parameters:
name: demo_windows
vmImage: 'windows-2019'
dependsOn: windows
- template: jobs/demo.yml
parameters:
name: demo_mac
vmImage: 'macOS-10.15'
dependsOn: mac
- template: jobs/benchmarks.yml
parameters:
name: benchmarks_linux
vmImage: 'ubuntu-18.04'
dependsOn: linux
- template: jobs/benchmarks.yml
parameters:
name: benchmarks_windows
vmImage: 'windows-2019'
dependsOn: windows
- template: jobs/benchmarks.yml
parameters:
name: benchmarks_mac
vmImage: 'macOS-10.15'
dependsOn: mac
- template: jobs/benchmarks_net_full.yml
parameters:
name: benchmarks_net_full
vmImage: 'windows-2019'
dependsOn: windows