Skip to content

Commit 54879d5

Browse files
authored
Merge pull request #779 from dotnet-maestro-bot/merge/release/2.1-to-release/2.2
[automated] Merge branch 'release/2.1' => 'release/2.2'
2 parents 1a3b26e + 89f122c commit 54879d5

File tree

140 files changed

+533
-14080
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+533
-14080
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,6 @@
6363
[submodule "src/roslyn-tools"]
6464
path = src/roslyn-tools
6565
url = https://github.com/dotnet/roslyn-tools
66+
[submodule "src/linker"]
67+
path = src/linker
68+
url = https://github.com/mono/linker.git

build.proj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<MakeDir Directories="$(SourceBuiltPackagesPath)" />
1818
<MakeDir Directories="$(SourceBuiltAssetsDir)" />
1919
<MakeDir Directories="$(LocalBlobStorageRoot)" />
20+
<MakeDir Directories="$(MSBuildDebugPathTargetDir)" />
2021
</Target>
2122

2223
<Target Name="InitBuild">

dependencies.props

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@
1717
<CurrentRefXmlPath>$(MSBuildThisFileFullPath)</CurrentRefXmlPath>
1818
</PropertyGroup>
1919

20-
<!-- ILLink.Tasks package version -->
21-
<PropertyGroup>
22-
<ILLinkTasksPackage>ILLink.Tasks</ILLinkTasksPackage>
23-
<ILLinkTasksPackageVersion>0.1.5-preview-1461378</ILLinkTasksPackageVersion>
24-
</PropertyGroup>
25-
2620
<!--
2721
Packages built by ProdCon, but not source-build. These are included as prebuilts, or embedded in
2822
the product as version strings to be used by the SDK to fetch extra content.

dir.props

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@
6262
<RestoreSourcePropsPath>$(IntermediatePath)RestoreSources.props</RestoreSourcePropsPath>
6363
<PackageVersionPropsPath>$(IntermediatePath)PackageVersions.props</PackageVersionPropsPath>
6464
<LoggingDir>$(BaseOutputPath)logs/</LoggingDir>
65+
<MSBuildDebugPathTargetDir>$(BaseOutputPath)msbuild-debug/</MSBuildDebugPathTargetDir>
6566
<!-- Dir where git info is generated during online builds. -->
6667
<GitInfoOutputDir>$(BaseOutputPath)git-info/</GitInfoOutputDir>
6768
<!-- Dir where git info is placed inside the tarball. -->
6869
<GitInfoOfflineDir>$(ProjectDir)git-info/</GitInfoOfflineDir>
6970
<PackageReportDir>$(BaseOutputPath)prebuilt-report/</PackageReportDir>
7071
<PackageReportDataFile>$(PackageReportDir)prebuilt-usage.xml</PackageReportDataFile>
72+
<ProjectAssetsJsonArchiveFile>$(PackageReportDir)all-project-assets-json-files.zip</ProjectAssetsJsonArchiveFile>
7173
<ProdConManifestFile>$(PackageReportDir)prodcon-build.xml</ProdConManifestFile>
7274
<PoisonedReportFile>$(PackageReportDir)poisoned.txt</PoisonedReportFile>
7375
<ConflictingPackageReportDir>$(BaseOutputPath)conflict-report/</ConflictingPackageReportDir>
@@ -83,11 +85,6 @@
8385

8486
<Import Project="$(TargetInfoProps)" Condition="$(GeneratingStaticPropertiesFile) != 'true' AND Exists('$(TargetInfoProps)')" />
8587

86-
<PropertyGroup>
87-
<!-- Always build portable runtime on OSX to match the CLI repo's filename expectations. https://github.com/dotnet/source-build/issues/438 -->
88-
<PortableBuild Condition="'$(TargetOS)' == 'OSX'">true</PortableBuild>
89-
</PropertyGroup>
90-
9188
<Import Project="$(ProjectDir)dependencies.props" />
9289

9390
<PropertyGroup>

init-tools.msbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@
1111
Condition="'$(BuildToolsPackageVersion)' != ''"
1212
Version="$(BuildToolsPackageVersion)" />
1313
<PackageReference Include="Microsoft.DotNet.BuildTools.Coreclr" Version="1.0.4-prerelease" />
14-
<PackageReference Include="$(ILLinkTasksPackage)" Version="$(ILLinkTasksPackageVersion)" />
1514
</ItemGroup>
1615
</Project>

netci.groovy

Lines changed: 109 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ def addArchival(def job) {
1313
// Grab these logs from all of those locations.
1414
[ "", "source-build/", "tarball-output/"].each { logRoot ->
1515
archivalSettings.addFiles("${logRoot}bin/logs/*")
16-
archivalSettings.addFiles("${logRoot}bin/prebuilt-report/*")
16+
archivalSettings.addFiles("${logRoot}bin/prebuilt-report/**/*")
17+
archivalSettings.addFiles("${logRoot}bin/conflict-report/**/*")
18+
archivalSettings.addFiles("${logRoot}bin/msbuild-debug/**/*")
1719
archivalSettings.addFiles("${logRoot}src/**/*.binlog")
1820
archivalSettings.addFiles("${logRoot}src/**/*.log")
1921
archivalSettings.addFiles("${logRoot}init-tools.log")
@@ -53,16 +55,16 @@ def getDockerImageForOs(os) {
5355
return imageMap.get(os)
5456
}
5557

56-
def addBuildStepsAndSetMachineAffinity(def job, String os, String configuration) {
58+
def addBuildStepsAndSetMachineAffinity(def job, String os, String configuration, boolean portable) {
5759
job.with {
5860
steps {
5961
if (os == "Windows_NT") {
6062
batchFile("git submodule update --init --recursive");
61-
batchFile(".\\build.cmd /p:Configuration=${configuration} ${loggingOptions}")
63+
batchFile(".\\build.cmd /p:Configuration=${configuration} /p:PortableBuild=${portable} /p:FailOnPrebuiltBaselineError=true ${loggingOptions}")
6264
}
6365
else {
6466
shell("git submodule update --init --recursive");
65-
shell("./build.sh /p:Configuration=${configuration} ${loggingOptions}");
67+
shell("./build.sh /p:Configuration=${configuration} /p:PortableBuild=${portable} /p:FailOnPrebuiltBaselineError=true ${loggingOptions}");
6668
smokeTestExcludes = "";
6769
if (os == "Fedora24" || os == "OSX10.12") {
6870
// Dev certs doesn't seem to work in these platforms. https://github.com/dotnet/source-build/issues/560
@@ -76,90 +78,116 @@ def addBuildStepsAndSetMachineAffinity(def job, String os, String configuration)
7678
setMachineAffinity(job, os);
7779
}
7880

79-
def addPullRequestJob(String project, String branch, String os, String configuration, boolean runByDefault)
81+
def addPullRequestJob(String project, String branch, String os, String configuration, boolean portable, boolean runByDefault)
8082
{
81-
def newJobName = Utilities.getFullJobName(project, "${os}_${configuration}", true);
83+
def config = configuration;
84+
if (portable) {
85+
config += "_Portable";
86+
}
87+
def newJobName = Utilities.getFullJobName(project, "${os}_${config}", true);
8288
def contextString = "${os} ${configuration}";
89+
if (portable) {
90+
contextString += " Portable";
91+
}
8392
def triggerPhrase = "(?i).*test\\W+${contextString}.*";
8493

8594
def newJob = job(newJobName);
8695

87-
addBuildStepsAndSetMachineAffinity(newJob, os, configuration);
96+
addBuildStepsAndSetMachineAffinity(newJob, os, configuration, portable);
8897
addArchival(newJob);
8998
Utilities.standardJobSetup(newJob, project, true, "*/${branch}");
9099
Utilities.setJobTimeout(newJob, 180);
91100
Utilities.addGithubPRTriggerForBranch(newJob, branch, contextString, triggerPhrase, !runByDefault);
92101
}
93102

94-
def addPushJob(String project, String branch, String os, String configuration)
103+
def addPushJob(String project, String branch, String os, String configuration, boolean portable)
95104
{
96105
def shortJobName = "${os}_${configuration}";
106+
if (portable) {
107+
shortJobName += "_Portable";
108+
}
97109

98110
def newJobName = Utilities.getFullJobName(project, shortJobName, false);
99111
def newJob = job(newJobName);
100112

101-
addBuildStepsAndSetMachineAffinity(newJob, os, configuration);
113+
addBuildStepsAndSetMachineAffinity(newJob, os, configuration, portable);
102114
addArchival(newJob);
103115
Utilities.standardJobSetup(newJob, project, false, "*/${branch}");
104116
Utilities.setJobTimeout(newJob, 180);
105117
Utilities.addGithubPushTrigger(newJob);
106118
}
107119

108120
["Ubuntu16.04", "Fedora24", "Debian8.4", "RHEL7.2", "CentOS7.1", "OSX10.12"].each { os ->
109-
addPullRequestJob(project, branch, os, "Release", true);
110-
addPullRequestJob(project, branch, os, "Debug", false);
121+
// Release non-portable run by default
122+
addPullRequestJob(project, branch, os, "Release", false, true);
123+
// Debug non-portable can be triggered
124+
addPullRequestJob(project, branch, os, "Debug", false, false);
125+
// Release portable can be triggered
126+
addPullRequestJob(project, branch, os, "Release", true, false);
127+
// Debug portable can be triggered
128+
addPullRequestJob(project, branch, os, "Debug", true, false);
111129
};
112130

113131
// Per push, run all the jobs
114132
["Ubuntu16.04", "Fedora24", "Debian8.4", "RHEL7.2", "Windows_NT", "CentOS7.1", "OSX10.12"].each { os ->
115133
["Release", "Debug"].each { configuration ->
116-
addPushJob(project, branch, os, configuration);
134+
[true, false].each { portable ->
135+
addPushJob(project, branch, os, configuration, portable);
136+
};
117137
};
118138
};
119139

120140
// Tarball builds that are not enforced to be offline
121141
[true, false].each { isPR ->
122142
["RHEL7.2", "CentOS7.1"].each { os ->
123143
["Release", "Debug"].each { configuration ->
144+
[true, false].each { portable ->
124145

125-
def shortJobName = "${os}_Tarball_${configuration}";
126-
def contextString = "${os} Tarball ${configuration}";
127-
def triggerPhrase = "(?i).*test\\W+${contextString}.*";
146+
def shortJobName = "${os}_Tarball_${configuration}";
147+
def contextString = "${os} Tarball ${configuration}";
128148

129-
def newJob = job(Utilities.getFullJobName(project, shortJobName, isPR)){
130-
steps{
131-
shell("cd ./source-build;git submodule update --init --recursive");
132-
shell("cd ./source-build;./build.sh /p:ArchiveDownloadedPackages=true /p:Configuration=${configuration} ${loggingOptions}");
133-
shell("cd ./source-build;./build-source-tarball.sh ../tarball-output --skip-build");
149+
if (portable) {
150+
shortJobName += "_Portable"
151+
contextString += " Portable"
152+
}
134153

135-
shell("cd ./tarball-output;./build.sh /p:Configuration=${configuration} ${loggingOptions}")
136-
shell("cd ./tarball-output;./smoke-test.sh --minimal --configuration ${configuration}")
154+
def triggerPhrase = "(?i).*test\\W+${contextString}.*";
155+
156+
def newJob = job(Utilities.getFullJobName(project, shortJobName, isPR)){
157+
steps{
158+
shell("cd ./source-build;git submodule update --init --recursive");
159+
shell("cd ./source-build;./build.sh /p:ArchiveDownloadedPackages=true /p:Configuration=${configuration} /p:PortableBuild=${portable} ${loggingOptions}");
160+
shell("cd ./source-build;./build-source-tarball.sh ../tarball-output --skip-build");
161+
162+
shell("cd ./tarball-output;./build.sh /p:Configuration=${configuration} /p:PortableBuild=${portable} /p:FailOnPrebuiltBaselineError=true ${loggingOptions}")
163+
shell("cd ./tarball-output;./smoke-test.sh --minimal --configuration ${configuration}")
164+
}
137165
}
138-
}
139166

140-
setMachineAffinity(newJob, os);
167+
setMachineAffinity(newJob, os);
141168

142-
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}");
169+
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}");
143170

144-
// Increase timeout. The tarball builds can take longer than the 2 hour default.
145-
Utilities.setJobTimeout(newJob, 240);
171+
// Increase timeout. The tarball builds can take longer than the 2 hour default.
172+
Utilities.setJobTimeout(newJob, 240);
146173

147-
// Clone into the source-build directory
148-
Utilities.addScmInSubDirectory(newJob, project, isPR, 'source-build');
174+
// Clone into the source-build directory
175+
Utilities.addScmInSubDirectory(newJob, project, isPR, 'source-build');
149176

150-
addArchival(newJob);
151-
if(isPR){
152-
if(configuration == "Release"){
153-
Utilities.addGithubPRTriggerForBranch(newJob, branch, contextString);
177+
addArchival(newJob);
178+
if(isPR){
179+
if(configuration == "Release"){
180+
Utilities.addGithubPRTriggerForBranch(newJob, branch, contextString);
181+
}
182+
else{
183+
Utilities.addGithubPRTriggerForBranch(newJob, branch, contextString, triggerPhrase);
184+
}
154185
}
155186
else{
156-
Utilities.addGithubPRTriggerForBranch(newJob, branch, contextString, triggerPhrase);
187+
Utilities.addGithubPushTrigger(newJob);
157188
}
158-
}
159-
else{
160-
Utilities.addGithubPushTrigger(newJob);
161-
}
162189

190+
}
163191
}
164192
}
165193
}
@@ -168,52 +196,60 @@ def addPushJob(String project, String branch, String os, String configuration)
168196
[true, false].each { isPR ->
169197
["RHEL7.2", "CentOS7.1"].each { os->
170198
["Release", "Debug"].each { configuration ->
199+
[true, false].each { portable ->
200+
201+
def shortJobName = "${os}_Unshared_${configuration}";
202+
def contextString = "${os} Unshared ${configuration}";
171203

172-
def shortJobName = "${os}_Unshared_${configuration}";
173-
def contextString = "${os} Unshared ${configuration}";
174-
def triggerPhrase = "(?i).*test\\W+${contextString}.*";
175-
def imageName = getDockerImageForOs(os);
176-
177-
def newJob = job(Utilities.getFullJobName(project, shortJobName, isPR)){
178-
steps{
179-
shell("cd ./source-build;git submodule update --init --recursive");
180-
// First build the product itself
181-
shell("docker run -u=\"\$(id -u):\$(id -g)\" -t --sig-proxy=true -e HOME=/opt/code/home -v \$(pwd)/source-build:/opt/code --rm -w /opt/code ${imageName} /opt/code/build.sh /p:ArchiveDownloadedPackages=true /p:Configuration=${configuration} /p:ContinueOnPrebuiltBaselineError=true ${loggingOptions}");
182-
// Have to make this directory before volume-sharing it unlike non-docker build - existing directory is really only a warning in build-source-tarball.sh
183-
shell("mkdir tarball-output");
184-
// now build the tarball
185-
shell("docker run -u=\"\$(id -u):\$(id -g)\" -t --sig-proxy=true -e HOME=/opt/code/home --network none -v \$(pwd)/source-build:/opt/code -v \$(pwd)/tarball-output:/opt/tarball --rm -w /opt/code ${imageName} /opt/code/build-source-tarball.sh /opt/tarball --skip-build");
186-
// now build from the tarball offline and without access to the regular non-tarball build
187-
shell("docker run -u=\"\$(id -u):\$(id -g)\" -t --sig-proxy=true -e HOME=/opt/tarball/home --network none -v \$(pwd)/tarball-output:/opt/tarball --rm -w /opt/tarball ${imageName} /opt/tarball/build.sh /p:Configuration=${configuration} ${loggingOptions}");
188-
// finally, run a smoke-test on the result
189-
shell("docker run -u=\"\$(id -u):\$(id -g)\" -t --sig-proxy=true -e HOME=/opt/tarball/home -v \$(pwd)/tarball-output:/opt/tarball --rm -w /opt/tarball ${imageName} /opt/tarball/smoke-test.sh --minimal --configuration ${configuration}");
204+
if (portable) {
205+
shortJobName += "_Portable"
206+
contextString += " Portable"
190207
}
191-
}
192208

193-
// Only Ubuntu Jenkins machines have Docker
194-
setMachineAffinity(newJob, "Ubuntu16.04");
209+
def triggerPhrase = "(?i).*test\\W+${contextString}.*";
210+
def imageName = getDockerImageForOs(os);
211+
212+
def newJob = job(Utilities.getFullJobName(project, shortJobName, isPR)){
213+
steps{
214+
shell("cd ./source-build;git submodule update --init --recursive");
215+
// First build the product itself
216+
shell("docker run -u=\"\$(id -u):\$(id -g)\" -t --sig-proxy=true -e HOME=/opt/code/home -v \$(pwd)/source-build:/opt/code --rm -w /opt/code ${imageName} /opt/code/build.sh /p:ArchiveDownloadedPackages=true /p:Configuration=${configuration} /p:PortableBuild=${portable} /p:ContinueOnPrebuiltBaselineError=true ${loggingOptions}");
217+
// Have to make this directory before volume-sharing it unlike non-docker build - existing directory is really only a warning in build-source-tarball.sh
218+
shell("mkdir tarball-output");
219+
// now build the tarball
220+
shell("docker run -u=\"\$(id -u):\$(id -g)\" -t --sig-proxy=true -e HOME=/opt/code/home --network none -v \$(pwd)/source-build:/opt/code -v \$(pwd)/tarball-output:/opt/tarball --rm -w /opt/code ${imageName} /opt/code/build-source-tarball.sh /opt/tarball --skip-build");
221+
// now build from the tarball offline and without access to the regular non-tarball build
222+
shell("docker run -u=\"\$(id -u):\$(id -g)\" -t --sig-proxy=true -e HOME=/opt/tarball/home --network none -v \$(pwd)/tarball-output:/opt/tarball --rm -w /opt/tarball ${imageName} /opt/tarball/build.sh /p:Configuration=${configuration} /p:PortableBuild=${portable} /p:FailOnPrebuiltBaselineError=true ${loggingOptions}");
223+
// finally, run a smoke-test on the result
224+
shell("docker run -u=\"\$(id -u):\$(id -g)\" -t --sig-proxy=true -e HOME=/opt/tarball/home -v \$(pwd)/tarball-output:/opt/tarball --rm -w /opt/tarball ${imageName} /opt/tarball/smoke-test.sh --minimal --configuration ${configuration}");
225+
}
226+
}
195227

196-
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}");
228+
// Only Ubuntu Jenkins machines have Docker
229+
setMachineAffinity(newJob, "Ubuntu16.04");
197230

198-
// Increase timeout. The offline build in Docker takes more than 2 hours.
199-
Utilities.setJobTimeout(newJob, 240);
231+
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}");
200232

201-
// Clone into the source-build directory
202-
Utilities.addScmInSubDirectory(newJob, project, isPR, 'source-build');
233+
// Increase timeout. The offline build in Docker takes more than 2 hours.
234+
Utilities.setJobTimeout(newJob, 240);
203235

204-
addArchival(newJob);
205-
if(isPR){
206-
if(configuration == "Release"){
207-
Utilities.addGithubPRTriggerForBranch(newJob, branch, contextString);
236+
// Clone into the source-build directory
237+
Utilities.addScmInSubDirectory(newJob, project, isPR, 'source-build');
238+
239+
addArchival(newJob);
240+
if(isPR){
241+
if(configuration == "Release"){
242+
Utilities.addGithubPRTriggerForBranch(newJob, branch, contextString);
243+
}
244+
else{
245+
Utilities.addGithubPRTriggerForBranch(newJob, branch, contextString, triggerPhrase);
246+
}
208247
}
209248
else{
210-
Utilities.addGithubPRTriggerForBranch(newJob, branch, contextString, triggerPhrase);
249+
Utilities.addGithubPushTrigger(newJob);
211250
}
212-
}
213-
else{
214-
Utilities.addGithubPushTrigger(newJob);
215-
}
216251

252+
}
217253
}
218254
}
219255
}

0 commit comments

Comments
 (0)