Skip to content

Commit 216f672

Browse files
authored
Introducing PR verification x86 CI build (#1309)
* testing installation of tools * passing all arguments * fixing syntax * fixing syntax * making sure tensorflow tests don't run in x86 pr validation ci leg * fixing test by adding new regular expression in normalizer * temporarily skipping benchmark test not working on x86 and fixed packaging issue with tensorflow * skipping on debug
1 parent 67360d9 commit 216f672

File tree

9 files changed

+32
-7
lines changed

9 files changed

+32
-7
lines changed

.vsts-dotnet-ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ phases:
1818

1919
- template: /build/ci/phase-template.yml
2020
parameters:
21-
name: Windows_NT
21+
name: Windows_x64
22+
buildScript: build.cmd
23+
queue:
24+
name: Hosted VS2017
25+
26+
- template: /build/ci/phase-template.yml
27+
parameters:
28+
name: Windows_x86
29+
architecture: x86
2230
buildScript: build.cmd
2331
queue:
2432
name: Hosted VS2017

build/ci/phase-template.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
parameters:
22
name: ''
3+
architecture: x64
34
buildScript: ''
45
queue: {}
56

@@ -8,6 +9,7 @@ phases:
89
variables:
910
_buildScript: ${{ parameters.buildScript }}
1011
_phaseName: ${{ parameters.name }}
12+
_arch: ${{ parameters.architecture }}
1113
queue:
1214
parallel: 99
1315
matrix:
@@ -17,7 +19,7 @@ phases:
1719
_configuration: Release
1820
${{ insert }}: ${{ parameters.queue }}
1921
steps:
20-
- script: $(_buildScript) -$(_configuration)
22+
- script: $(_buildScript) -$(_configuration) -buildArch=$(_arch)
2123
displayName: Build
2224
- ${{ if eq(parameters.name, 'MacOS') }}:
2325
- script: brew install libomp

init-tools.cmd

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ set BUILD_TOOLS_PATH=%PACKAGES_DIR%\Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERS
1212
set INIT_TOOLS_RESTORE_PROJECT=%~dp0init-tools.msbuild
1313
set BUILD_TOOLS_SEMAPHORE_DIR=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%
1414
set BUILD_TOOLS_SEMAPHORE=%BUILD_TOOLS_SEMAPHORE_DIR%\init-tools.completed
15+
set ARCH=x64
1516

1617
:: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated
1718
if [%1]==[force] (
@@ -47,9 +48,17 @@ echo Running %0 > "%INIT_TOOLS_LOG%"
4748
set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt"
4849
if exist "%DOTNET_CMD%" goto :afterdotnetrestore
4950

51+
:Arg_Loop
52+
if [%1] == [] goto :ArchSet
53+
if /i [%1] == [x86] ( set ARCH=x86&&goto ArchSet)
54+
shift
55+
goto :Arg_Loop
56+
57+
:ArchSet
58+
5059
echo Installing dotnet cli...
5160
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
52-
set DOTNET_ZIP_NAME=dotnet-sdk-%DOTNET_VERSION%-win-x64.zip
61+
set DOTNET_ZIP_NAME=dotnet-sdk-%DOTNET_VERSION%-win-%ARCH%.zip
5362
set DOTNET_REMOTE_PATH=https://dotnetcli.azureedge.net/dotnet/Sdk/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
5463
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
5564
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%"

pkg/Microsoft.ML.TensorFlow.Redist/Microsoft.ML.TensorFlow.Redist.nupkgproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
<ItemGroup>
1717
<Content Include="..\common\CommonPackage.props" Pack="true" PackagePath="build\netstandard2.0\$(MSBuildProjectName).props" />
1818
<Content Include="$(PackageAssetsPath)$(PackageIdFolderName)\LICENSE.txt" Pack="true" PackagePath=".\" />
19-
<Content Include="$(PackageAssetsPath)$(PackageIdFolderName)\THIRD_PARTY_NOTICES.txt" Pack="true" PackagePath=".\" />
19+
<Content Condition="Exists('$(PackageAssetsPath)$(PackageIdFolderName)\THIRD_PARTY_NOTICES.txt')" Include="$(PackageAssetsPath)$(PackageIdFolderName)\THIRD_PARTY_NOTICES.txt" Pack="true" PackagePath=".\" />
2020
</ItemGroup>
2121
</Project>

run.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
1111
set DOTNET_MULTILEVEL_LOOKUP=0
1212

1313
:: Restore the Tools directory
14-
call "%~dp0init-tools.cmd"
14+
call "%~dp0init-tools.cmd" %*
1515
if NOT [%ERRORLEVEL%]==[0] exit /b 1
1616

1717
set _toolRuntime=%~dp0Tools

test/Microsoft.ML.Benchmarks.Tests/BenchmarksTest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ public class BenchmarksTest
3939

4040
private ITestOutputHelper Output { get; }
4141

42+
#if DEBUG
4243
[Fact(Skip = SkipTheDebug)]
44+
#else
45+
[ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))]
46+
#endif
4347
public void BenchmarksProjectIsNotBroken()
4448
{
4549
var summary = BenchmarkRunner.Run<BenchmarkTouchingNativeDependency>(new TestConfig().With(new OutputLogger(Output)));

test/Microsoft.ML.TestFramework/BaseTestBaseline.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ protected void DoNotEverUseInvertPass()
236236
private static readonly Regex _matchTime = new Regex(@"[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?", RegexOptions.Compiled);
237237
private static readonly Regex _matchShortTime = new Regex(@"\([0-9]{2}:[0-9]{2}(\.[0-9]+)?\)", RegexOptions.Compiled);
238238
private static readonly Regex _matchMemory = new Regex(@"memory usage\(MB\): [0-9]+", RegexOptions.Compiled);
239+
private static readonly Regex _matchReservedMemory = new Regex(@": [0-9]+ bytes", RegexOptions.Compiled);
239240
private static readonly Regex _matchElapsed = new Regex(@"Time elapsed\(s\): [0-9.]+", RegexOptions.Compiled);
240241
private static readonly Regex _matchTimes = new Regex(@"Instances caching time\(s\): [0-9\.]+", RegexOptions.Compiled);
241242
private static readonly Regex _matchUpdatesPerSec = new Regex(@", ([0-9\.]+|Infinity)M WeightUpdates/sec", RegexOptions.Compiled);
@@ -284,6 +285,7 @@ protected void Normalize(string path)
284285
line = _matchShortTime.Replace(line, "(%Time%)");
285286
line = _matchElapsed.Replace(line, "Time elapsed(s): %Number%");
286287
line = _matchMemory.Replace(line, "memory usage(MB): %Number%");
288+
line = _matchReservedMemory.Replace(line, ": %Number% bytes");
287289
line = _matchTimes.Replace(line, "Instances caching time(s): %Number%");
288290
line = _matchUpdatesPerSec.Replace(line, ", %Number%M WeightUpdates/sec");
289291
line = _matchParameterT.Replace(line, "=PARAM:/t:%Number%");

test/Microsoft.ML.Tests/ScenariosWithDirectInstantiation/TensorflowTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ public void TensorFlowTransformCifarSavedModel()
906906
}
907907
}
908908

909-
[Fact]
909+
[ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))]
910910
public void TensorFlowTransformCifarInvalidShape()
911911
{
912912
var model_location = "cifar_model/frozen_model.pb";

test/Microsoft.ML.Tests/TensorFlowEstimatorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public void TestTensorFlowStatic()
183183
}
184184
}
185185

186-
[Fact]
186+
[ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))]
187187
public void TestTensorFlowStaticWithSchema()
188188
{
189189
var modelLocation = "cifar_model/frozen_model.pb";

0 commit comments

Comments
 (0)