Skip to content

Commit 8884161

Browse files
nightly build pipeline (#4444)
* nightly build pipeline
1 parent b26092e commit 8884161

15 files changed

+383
-18
lines changed

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
2020
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
2121
https://dotnet.myget.org/F/roslyn-analyzers/api/v3/index.json;
22+
https://pkgs.dev.azure.com/dnceng/public/_packaging/MachineLearning/nuget/v3/index.json;
2223
</RestoreSources>
2324
</PropertyGroup>
2425

Microsoft.ML.sln

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Vision", "src\
285285
EndProject
286286
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.TestFrameworkCommon", "test\Microsoft.ML.TestFrameworkCommon\Microsoft.ML.TestFrameworkCommon.csproj", "{A22FAD27-77E8-4460-8B92-EC7090B7173A}"
287287
EndProject
288+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.NightlyBuild.Tests", "test\Microsoft.ML.NightlyBuild.Tests\Microsoft.ML.NightlyBuild.Tests.csproj", "{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}"
289+
EndProject
290+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.NugetPackageVersionUpdater", "test\Microsoft.ML.NugetPackageVersionUpdater\Microsoft.ML.NugetPackageVersionUpdater.csproj", "{C8DB58DC-6434-4431-A81F-263D86E2A5F3}"
291+
EndProject
288292
Global
289293
GlobalSection(SolutionConfigurationPlatforms) = preSolution
290294
Debug|Any CPU = Debug|Any CPU
@@ -1716,6 +1720,42 @@ Global
17161720
{A22FAD27-77E8-4460-8B92-EC7090B7173A}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
17171721
{A22FAD27-77E8-4460-8B92-EC7090B7173A}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU
17181722
{A22FAD27-77E8-4460-8B92-EC7090B7173A}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU
1723+
{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1724+
{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}.Debug|x64.ActiveCfg = Debug|Any CPU
1725+
{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}.Debug-netcoreapp3_0|Any CPU.ActiveCfg = Debug-netcoreapp3_0|Any CPU
1726+
{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}.Debug-netcoreapp3_0|x64.ActiveCfg = Debug-netcoreapp3_0|Any CPU
1727+
{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU
1728+
{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}.Debug-netfx|x64.ActiveCfg = Debug-netfx|Any CPU
1729+
{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}.Release|Any CPU.ActiveCfg = Release|Any CPU
1730+
{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}.Release|x64.ActiveCfg = Release|Any CPU
1731+
{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}.Release-netcoreapp3_0|Any CPU.ActiveCfg = Release-netcoreapp3_0|Any CPU
1732+
{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}.Release-netcoreapp3_0|x64.ActiveCfg = Release-netcoreapp3_0|Any CPU
1733+
{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU
1734+
{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU
1735+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1736+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
1737+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Debug|x64.ActiveCfg = Debug|Any CPU
1738+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Debug|x64.Build.0 = Debug|Any CPU
1739+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Debug-netcoreapp3_0|Any CPU.ActiveCfg = Debug-netcoreapp3_0|Any CPU
1740+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Debug-netcoreapp3_0|Any CPU.Build.0 = Debug-netcoreapp3_0|Any CPU
1741+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Debug-netcoreapp3_0|x64.ActiveCfg = Debug-netcoreapp3_0|Any CPU
1742+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Debug-netcoreapp3_0|x64.Build.0 = Debug-netcoreapp3_0|Any CPU
1743+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU
1744+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU
1745+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Debug-netfx|x64.ActiveCfg = Debug-netfx|Any CPU
1746+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Debug-netfx|x64.Build.0 = Debug-netfx|Any CPU
1747+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
1748+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release|Any CPU.Build.0 = Release|Any CPU
1749+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release|x64.ActiveCfg = Release|Any CPU
1750+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release|x64.Build.0 = Release|Any CPU
1751+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release-netcoreapp3_0|Any CPU.ActiveCfg = Release-netcoreapp3_0|Any CPU
1752+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release-netcoreapp3_0|Any CPU.Build.0 = Release-netcoreapp3_0|Any CPU
1753+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release-netcoreapp3_0|x64.ActiveCfg = Release-netcoreapp3_0|Any CPU
1754+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release-netcoreapp3_0|x64.Build.0 = Release-netcoreapp3_0|Any CPU
1755+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU
1756+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
1757+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU
1758+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU
17191759
EndGlobalSection
17201760
GlobalSection(SolutionProperties) = preSolution
17211761
HideSolutionNode = FALSE
@@ -1806,6 +1846,8 @@ Global
18061846
{3817A875-278C-4140-BF66-3C4A8CA55F0D} = {D3D38B03-B557-484D-8348-8BADEE4DF592}
18071847
{419F93D5-4135-4DA0-A76E-EFC23E04093D} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
18081848
{A22FAD27-77E8-4460-8B92-EC7090B7173A} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
1849+
{A1CAC86F-F4BB-4B6D-9D18-E9AE15B3C66E} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
1850+
{C8DB58DC-6434-4431-A81F-263D86E2A5F3} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
18091851
EndGlobalSection
18101852
GlobalSection(ExtensibilityGlobals) = postSolution
18111853
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}

build.proj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@
9797
Targets="RunTests" />
9898
</Target>
9999

100+
<Target Name="RunNightlyBuildTests">
101+
<MSBuild Projects="test\run-night-build-tests.proj"
102+
Targets="RunNightlyBuildTests" />
103+
</Target>
104+
100105
<!-- Override CleanAllProjects from dir.traversal.targets and just remove the full BinDir -->
101106
<Target Name="CleanAllProjects">
102107
<RemoveDir Directories="$(BinDir)" />

build/.night-build.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
################################################################################
2+
# ML.NET's nightly build
3+
################################################################################
4+
5+
# no PR builds
6+
pr: none
7+
8+
# no CI builds
9+
trigger: none
10+
11+
# scheduled trigger, runs at UTC 8:00 every day which is midnight of GMT-8
12+
schedules:
13+
- cron: "0 8 * * *"
14+
displayName: Nightly Build at midnight
15+
branches:
16+
include:
17+
- master
18+
- releases/1.0
19+
- features/automl
20+
- features/integrationPackage
21+
always: true
22+
23+
resources:
24+
containers:
25+
- container: CentosContainer
26+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-mlnet-8bba86b-20190314145033
27+
28+
- container: UbuntuContainer
29+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-mlnet-207e097-20190312152303
30+
31+
jobs:
32+
- template: /build/ci/job-template.yml
33+
parameters:
34+
name: Centos_x64_NetCoreApp30
35+
buildScript: ./build.sh
36+
container: CentosContainer
37+
customMatrixes:
38+
Debug_Build:
39+
_configuration: Debug-netcoreapp3_0
40+
_config_short: DI
41+
_includeBenchmarkData: false
42+
Release_Build:
43+
_configuration: Release-netcoreapp3_0
44+
_config_short: RI
45+
_includeBenchmarkData: true
46+
nightlyBuild: true
47+
pool:
48+
name: Hosted Ubuntu 1604
49+
50+
- template: /build/ci/job-template.yml
51+
parameters:
52+
name: Ubuntu_x64_NetCoreApp21
53+
buildScript: ./build.sh
54+
container: UbuntuContainer
55+
nightlyBuild: true
56+
pool:
57+
name: Hosted Ubuntu 1604
58+
59+
- template: /build/ci/job-template.yml
60+
parameters:
61+
name: MacOS_x64_NetCoreApp21
62+
buildScript: ./build.sh
63+
nightlyBuild: true
64+
pool:
65+
name: Hosted macOS High Sierra
66+
67+
- template: /build/ci/job-template.yml
68+
parameters:
69+
name: Windows_x64_NetCoreApp30
70+
buildScript: build.cmd
71+
customMatrixes:
72+
Debug_Build:
73+
_configuration: Debug-netcoreapp3_0
74+
_config_short: DI
75+
_includeBenchmarkData: false
76+
Release_Build:
77+
_configuration: Release-netcoreapp3_0
78+
_config_short: RI
79+
_includeBenchmarkData: true
80+
nightlyBuild: true
81+
pool:
82+
name: NetCorePublic-Pool
83+
queue: buildpool.windows.10.amd64.vs2017.open
84+
85+
- template: /build/ci/job-template.yml
86+
parameters:
87+
name: Windows_x64_NetCoreApp21
88+
buildScript: build.cmd
89+
nightlyBuild: true
90+
pool:
91+
name: Hosted VS2017
92+
93+
- template: /build/ci/job-template.yml
94+
parameters:
95+
name: Windows_x64_NetFx461
96+
buildScript: build.cmd
97+
customMatrixes:
98+
Debug_Build:
99+
_configuration: Debug-netfx
100+
_config_short: DFX
101+
_includeBenchmarkData: false
102+
Release_Build:
103+
_configuration: Release-netfx
104+
_config_short: RFX
105+
_includeBenchmarkData: false
106+
nightlyBuild: true
107+
pool:
108+
name: Hosted VS2017
109+
110+
- template: /build/ci/job-template.yml
111+
parameters:
112+
name: Windows_x86_NetCoreApp21
113+
architecture: x86
114+
buildScript: build.cmd
115+
nightlyBuild: true
116+
pool:
117+
name: Hosted VS2017

build/ci/job-template.yml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,24 @@ parameters:
55
pool: {}
66
customMatrixes: ''
77
codeCoverage: false
8+
nightlyBuild: false
89
container: ''
910

1011
jobs:
1112
- job: ${{ parameters.name }}
12-
${{ if eq(parameters.codeCoverage, 'false') }}:
13+
${{ if eq(parameters.nightlyBuild, 'true') }}:
14+
timeoutInMinutes: 20
15+
${{ if and(eq(parameters.nightlyBuild, 'false'), eq(parameters.codeCoverage, 'false')) }}:
1316
timeoutInMinutes: 75
1417
${{ if eq(parameters.codeCoverage, 'true') }}:
1518
timeoutInMinutes: 60
19+
variables:
20+
dotnetPath: $(Build.SourcesDirectory)/Tools/dotnetcli/dotnet
21+
nugetFeed: https://pkgs.dev.azure.com/dnceng/public/_packaging/MachineLearning/nuget/v3/index.json
22+
nightlyBuildProjPath: $(Build.SourcesDirectory)/test/Microsoft.ML.NightlyBuild.Tests/Microsoft.ML.NightlyBuild.Tests.csproj
23+
nightlyBuildRunPath: (Build.SourcesDirectory)/bin/AnyCPU.(_configuration)/Microsoft.ML.NightlyBuild.Tests/netcoreapp2.1
24+
packageUpdaterProjPath: $(Build.SourcesDirectory)/test/Microsoft.ML.NugetPackageVersionUpdater/Microsoft.ML.NugetPackageVersionUpdater.csproj
25+
versionFilePath: $(Build.SourcesDirectory)/test/Microsoft.ML.NugetPackageVersionUpdater/latest_versions.txt
1626
strategy:
1727
matrix:
1828
${{ if eq(parameters.customMatrixes, '') }}:
@@ -35,12 +45,27 @@ jobs:
3545
- ${{ if eq(parameters.pool.name, 'Hosted macOS High Sierra') }}:
3646
- script: brew update && brew install https://github.com/raw/Homebrew/homebrew-core/f5b1ac99a7fba27c19cee0bc4f036775c889b359/Formula/libomp.rb && brew install mono-libgdiplus gettext && brew link gettext --force && brew link libomp --force
3747
displayName: Install build dependencies
48+
- ${{ if and( eq(parameters.nightlyBuild, 'true'), eq(parameters.name, 'Ubuntu_x64_NetCoreApp21')) }}:
49+
- bash: echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]$(nightlyBuildRunPath):$LD_LIBRARY_PATH"
50+
displayName: Set LD_LIBRARY_PATH for Ubuntu to locate Native shared library in current running path
3851
- script: ${{ parameters.buildScript }} -$(_configuration) -buildArch=${{ parameters.architecture }}
3952
displayName: Build
40-
- script: ${{ parameters.buildScript }} -- /t:DownloadExternalTestFiles /p:IncludeBenchmarkData=$(_includeBenchmarkData)
41-
displayName: Download Benchmark Data
42-
- script: ${{ parameters.buildScript }} -$(_configuration) -runtests -coverage=${{ parameters.codeCoverage }}
43-
displayName: Run Tests.
53+
- ${{ if eq(parameters.nightlyBuild, 'true') }}:
54+
- script: $(dotnetPath) restore $(nightlyBuildProjPath)
55+
displayName: Restore nightly build project
56+
- script: $(dotnetPath) list $(nightlyBuildProjPath) package --source $(nugetFeed) --outdated > $(versionFilePath)
57+
displayName: List latest package versions
58+
- script: $(dotnetPath) run --project $(packageUpdaterProjPath)
59+
displayName: Update package versions for nightly build
60+
- script: $(dotnetPath) msbuild -restore $(nightlyBuildProjPath) /p:ReferenceTypeForTestFramework="Nuget" /p:Configuration=$(_configuration) /p:TargetArchitecture=${{ parameters.architecture }}
61+
displayName: Build Nightly-Build Project with latest package versions
62+
- script: ${{ parameters.buildScript }} -$(_configuration) -runnightlybuildtests
63+
displayName: Run Nightly Build Tests
64+
- ${{ if eq(parameters.nightlyBuild, 'false') }}:
65+
- script: ${{ parameters.buildScript }} -- /t:DownloadExternalTestFiles /p:IncludeBenchmarkData=$(_includeBenchmarkData)
66+
displayName: Download Benchmark Data
67+
- script: ${{ parameters.buildScript }} -$(_configuration) -runtests -coverage=${{ parameters.codeCoverage }}
68+
displayName: Run Tests.
4469
- script: $(Build.SourcesDirectory)/Tools/dotnetcli/dotnet msbuild build/Codecoverage.proj /p:CodeCovToken=$(CODECOV_TOKEN)
4570
displayName: Upload coverage to codecov.io
4671
condition: and(succeeded(), eq(${{ parameters.codeCoverage }}, True))
@@ -77,7 +102,7 @@ jobs:
77102
pathToPublish: $(Build.ArtifactStagingDirectory)
78103
artifactName: ${{ parameters.name }} $(_config_short)
79104
artifactType: container
80-
- ${{ if eq(parameters.buildScript, 'build.cmd') }}:
105+
- ${{ if and(eq(parameters.nightlyBuild, 'false'), eq(parameters.buildScript, 'build.cmd')) }}:
81106
- powershell: |
82107
$taskListOutput = & TaskList /FI "IMAGENAME eq dotnet.exe" | Out-String
83108
if ($taskListOutput.Contains("dotnet.exe"))
@@ -107,5 +132,6 @@ jobs:
107132
Remove-Item -Force -Recurse .\tmp\
108133
Write-Output "Done cleaning up binary folder..."
109134
displayName: Clean up test data
110-
- script: ${{ parameters.buildScript }} -buildPackages
111-
displayName: Build Packages
135+
- ${{ if eq(parameters.nightlyBuild, 'false') }}:
136+
- script: ${{ parameters.buildScript }} -buildPackages
137+
displayName: Build Packages

config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@
7878
"values": [],
7979
"defaultValue": ""
8080
},
81+
"RunNightlyBuildTests": {
82+
"description": "MsBuild target that run the nightly build tests. Call this after building.",
83+
"valueType": "target",
84+
"values": [],
85+
"defaultValue": ""
86+
},
8187
"Coverage": {
8288
"description": "Turn on code coverge.",
8389
"valueType": "property",
@@ -160,6 +166,12 @@
160166
"RunTests": "default"
161167
}
162168
},
169+
"runnightlybuildtests": {
170+
"description": "Runs the nightly build tests. Call this after building.",
171+
"settings": {
172+
"RunNightlyBuildTests": "default"
173+
}
174+
},
163175
"verbose": {
164176
"description": "Passes /flp:v=diag to the msbuild command or the value passed by the user.",
165177
"settings": {

test/Microsoft.ML.Functional.Tests/Microsoft.ML.Functional.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<SignAssembly>false</SignAssembly>
66
<!-- DON'T CHANGE THIS!!! We are turning off strong naming to ensure we never add `InternalsVisibleTo` for these tests -->
77
<PublicSign>false</PublicSign>
8+
<ReferenceTypeForTestFramework>Project</ReferenceTypeForTestFramework>
89
</PropertyGroup>
910

1011
<ItemGroup>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<!-- DON'T CHANGE THIS!!! We are turning off strong naming to ensure we never add `InternalsVisibleTo` for these tests -->
5+
<SignAssembly>false</SignAssembly>
6+
<!-- DON'T CHANGE THIS!!! We are turning off strong naming to ensure we never add `InternalsVisibleTo` for these tests -->
7+
<PublicSign>false</PublicSign>
8+
<IsPackable>false</IsPackable>
9+
</PropertyGroup>
10+
11+
<Import Project="..\NightlyBuildDependency.props" />
12+
13+
<ItemGroup>
14+
<Compile Include="..\Microsoft.ML.Functional.Tests\**\*.cs" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<NativeAssemblyReference Include="CpuMathNative" />
19+
<NativeAssemblyReference Include="FastTreeNative" />
20+
<NativeAssemblyReference Include="MatrixFactorizationNative" />
21+
<NativeAssemblyReference Include="LdaNative" />
22+
<NativeAssemblyReference Include="SymSgdNative" />
23+
<NativeAssemblyReference Include="MklProxyNative" />
24+
<NativeAssemblyReference Include="MklImports" />
25+
<NativeAssemblyReference Condition="'$(OS)' == 'Windows_NT'" Include="libiomp5md" />
26+
</ItemGroup>
27+
28+
<ItemGroup>
29+
<ProjectReference Include="..\Microsoft.ML.TestFrameworkCommon\Microsoft.ML.TestFrameworkCommon.csproj" />
30+
</ItemGroup>
31+
32+
</Project>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<StartupObject>Microsoft.ML.NugetPackageVersionUpdater.Program</StartupObject>
6+
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
7+
</PropertyGroup>
8+
9+
</Project>

0 commit comments

Comments
 (0)