Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
5889aeb2
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5889aeb2
编写于
2月 12, 2016
作者:
J
Jared Parsons
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #8618 from jaredpar/jenkins
Harden determinism job
上级
6a537469
ed23239a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
34 addition
and
10 deletion
+34
-10
build/scripts/test-determinism.ps1
build/scripts/test-determinism.ps1
+32
-8
cibuild.cmd
cibuild.cmd
+1
-0
netci.groovy
netci.groovy
+1
-2
未找到文件。
build/scripts/test-determinism.ps1
浏览文件 @
5889aeb2
...
...
@@ -11,16 +11,19 @@ try
$rootDir
=
resolve-path
(
split-path
-parent
(
split-path
-parent
$PSScriptRoot
))
$sln
=
join-path
$rootDir
"Roslyn.sln"
$debugDir
=
join-path
$rootDir
"Binaries\Debug"
$errorDir
=
join-path
$rootDir
"Binaries\Determinism"
$errorList
=
@()
# Create directories that may or may not exist to make the script execution below
# clean in either case.
mkdir
$debugDir
-errorAction
SilentlyContinue
|
out-null
mkdir
(
join-path
$rootDir
"Binaries\Obj"
)
-errorAction
SilentlyContinue
|
out-null
mkdir
$errorDir
-errorAction
SilentlyContinue
|
out-null
pushd
$rootDir
# List of binary names that should be skipped because they have a known issue that
# makes them non-deterministic.
# makes them non-deterministic.
$skipList
=
@()
$allGood
=
$true
...
...
@@ -32,10 +35,10 @@ try
write-host
"Cleaning the Binaries"
rm
-re
-fo
"Binaries\Debug"
rm
-re
-fo
"Binaries\Obj"
&
msbuild
/nologo
/v:m
/t:clean
$sln
&
msbuild
/nologo
/v:m
/
nodeReuse:false
/
t:clean
$sln
write-host
"Building the Solution"
&
msbuild
/nologo
/v:m
/m
/p:DebugDeterminism
=
true
/p:BootstrapBuildPath
=
$buildDir
/p:Features
=
debug-determinism
/p:UseRoslynAnalyzers
=
false
$sln
&
msbuild
/nologo
/v:m
/
nodeReuse:false
/
m
/p:DebugDeterminism
=
true
/p:BootstrapBuildPath
=
$buildDir
/p:Features
=
debug-determinism
/p:UseRoslynAnalyzers
=
false
$sln
pushd
$debugDir
...
...
@@ -44,13 +47,14 @@ try
$dllFullName
=
$dll
.
FullName
$dllName
=
split-path
-leaf
$dllFullName
$dllHash
=
(
get-filehash
$dll
-algorithm
MD5
)
.
Hash
$dllKeyName
=
$dllFullName
+
".key"
$keyFullName
=
$dllFullName
+
".key"
$keyName
=
split-path
-leaf
$keyFullName
# Do not process binaries that have been explicitly skipped or do not have a key
# file. The lack of a key file means it's a binary that wasn't specifically
# built for that directory (dependency). Only need to check the binaries we are
# building.
if
(
$skipList
.
Contains
(
$dllName
)
-or
-not
(
test-path
$
dllKey
Name
))
{
if
(
$skipList
.
Contains
(
$dllName
)
-or
-not
(
test-path
$
keyFull
Name
))
{
continue
;
}
...
...
@@ -69,10 +73,17 @@ try
write-host
"
`t
Verified
$dllName
"
}
else
{
write-host
"
`t
ERROR!
$dllName
changed (
$dllFullName
)"
[
IO.File
]::
WriteAllBytes
(
$dllFullName
+
".baseline"
,
$data
.
Content
)
[
IO.File
]::
WriteAllBytes
(
$dllFullName
+
".baseline.key"
,
$data
.
Key
)
write-host
"
`t
ERROR!
$dllName
"
$allGood
=
$false
$errorList
+=
$dllName
# Save out the original and baseline so Jenkins will archive them for investigation
pushd
$errorDir
[
IO.File
]::
WriteAllBytes
((
join-path
$errorDir
(
$dllName
+
".original"
)),
$data
.
Content
)
[
IO.File
]::
WriteAllBytes
((
join-path
$errorDir
(
$keyName
+
".original"
)),
$data
.
Key
)
cp
$dllFullName
(
$dllName
+
".baseline"
)
cp
$keyFullName
(
$keyName
+
".baseline"
)
popd
}
}
}
...
...
@@ -92,6 +103,17 @@ try
popd
if
(
-not
$allGood
)
{
write-host
"Determinism failed for the following binaries:"
foreach
(
$name
in
$errorList
)
{
write-host
"
`t
$name
"
}
write-host
"Archiving failure information"
$zipFile
=
join-path
$rootDir
"Binaries\determinism.zip"
Add-Type
-Assembly
"System.IO.Compression.FileSystem"
;
[
System.IO.Compression.ZipFile
]::
CreateFromDirectory
(
$errorDir
,
$zipFile
,
"Fastest"
,
$true
);
write-host
"Please send
$zipFile
to compiler team for analysis"
exit
1
}
...
...
@@ -104,6 +126,8 @@ catch
}
finally
{
write-host
"Stopping VBCSCompiler"
gps
VBCSCompiler
-ErrorAction
SilentlyContinue
|
kill
write-host
"Stopped VBCSCompiler"
}
cibuild.cmd
浏览文件 @
5889aeb2
...
...
@@ -56,6 +56,7 @@ call :TerminateBuildProcesses
if
defined
TestDeterminism
(
powershell
-noprofile -executionPolicy
RemoteSigned
-file
"
%RoslynRoot%
\build\scripts\test-determinism.ps1"
"
%bindir%
\Bootstrap"
||
goto
:BuildFailed
call
:TerminateBuildProcesses
exit
/b
0
)
...
...
netci.groovy
浏览文件 @
5889aeb2
...
...
@@ -153,7 +153,7 @@ static void addStandardJob(def myJob, String jobName, String branchName, String
addLogRotator
(
myJob
)
addWrappers
(
myJob
)
def
includePattern
=
"Binaries/**/*.pdb,Binaries/**/*.xml,Binaries/**/*.
baseline*,Binaries/**/*.original*,,Binaries/**/*.key,Binaries/**/*.log,Binaries/**/*.dm
p"
def
includePattern
=
"Binaries/**/*.pdb,Binaries/**/*.xml,Binaries/**/*.
log,Binaries/**/*.dmp,Binaries/**/*.zi
p"
def
excludePattern
=
"Binaries/Obj/**,Binaries/Bootstrap/**"
addArtifactArchiving
(
myJob
,
includePattern
,
excludePattern
)
...
...
@@ -251,4 +251,3 @@ set TMP=%TEMP%
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录