Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run WACK in CI #5365

Merged
merged 8 commits into from
Jun 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .ado/TestWACK.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
param([string]$Platform, [string]$Configuration, [string]$OutputPath)

$exceptions = @(
'API __C_specific_handler in kernel32.dll is not supported for this application type. Microsoft.ReactNative.dll calls this API.'
);

if (!(Test-Path $OutputPath)) {
mkdir -Path $OutputPath
}

if ($Configuration -eq 'Release') {
$appxPath = Resolve-Path $PSScriptRoot\..\packages\playground\windows\AppPackages\playground\playground_1.0.0.0_${Platform}_Test\playground_1.0.0.0_$Platform.appx
gci $appxPath

& "C:\Program Files (x86)\Windows Kits\10\App Certification Kit\appcert.exe" test -appxpackagepath $appxPath -reportoutputpath $OutputPath\result.xml

$xml = [xml] (gc $OutputPath\result.xml)

$supportedApiTest = ($xml.REPORT.REQUIREMENTS.REQUIREMENT | Where-Object -Property TITLE -EQ "Supported API test").TEST;
$errors = $supportedApiTest.MESSAGES.MESSAGE.TEXT | Where-Object { $_ -notin $exceptions }

if ($errors.Length -ne 0) {
throw $errors
}
}

12 changes: 11 additions & 1 deletion .ado/windows-vs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,17 @@ jobs:
/p:PreferredToolArchitecture=$(MSBuildPreferredToolArchitecture)
/p:PlatformToolset=$(MSBuildPlatformToolset)
/p:BaseIntDir=$(BaseIntDir)
/p:AppxPackageSigningEnabled=false

- powershell: .ado/TestWACK.ps1 $(BuildPlatform) $(BuildConfiguration) $(Build.StagingDirectory)\WACK
displayName: Test WACK

- task: PublishBuildArtifacts@1
displayName: Upload WACK report
condition: succeededOrFailed()
inputs:
pathtoPublish: '$(Build.StagingDirectory)/WACK'
artifactName: 'WACK report $(BuildPlatform) $(BuildConfiguration)'


- task: NuGetCommand@2
displayName: NuGet restore - Playground Win32
Expand Down
4 changes: 2 additions & 2 deletions packages/playground/windows/playground/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
IgnorableNamespaces="uap mp">

<Identity
Name="a752ebd1-71f2-4731-af80-c81e1782cc2b"
Publisher="CN=playground"
Name="RNPlayground"
Publisher="CN=Microsoft"
Version="1.0.0.0" />

<mp:PhoneIdentity PhoneProductId="a752ebd1-71f2-4731-af80-c81e1782cc2b" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
Expand Down
13 changes: 11 additions & 2 deletions packages/playground/windows/playground/Playground.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<WindowsTargetPlatformVersion Condition=" '$(WindowsTargetPlatformVersion)' == '' ">10.0.18362.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.16299.0</WindowsTargetPlatformMinVersion>
<AppxPackageSigningEnabled>False</AppxPackageSigningEnabled>
<PackageCertificateThumbprint>867D41FE5091AED426000143497EA4DFC29A8097</PackageCertificateThumbprint>
<PackageCertificateKeyFile>Playground_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Expand Down Expand Up @@ -174,6 +173,15 @@
<PropertyGroup>
<BundleEntryFile>Samples/rntester.tsx</BundleEntryFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<AppxBundle>Never</AppxBundle>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
</PropertyGroup>
<ImportGroup Label="ReactNativeWindowsTargets">
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppApp.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppApp.targets')" />
</ImportGroup>
Expand All @@ -194,5 +202,6 @@
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.200615.7\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('..\packages\$(WinUIPackageName).$(WinUIPackageVersion)\build\native\$(WinUIPackageName).targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\$(WinUIPackageName).$(WinUIPackageVersion)\build\native\$(WinUIPackageName).targets'))" /> </Target>
<Error Condition="!Exists('..\packages\$(WinUIPackageName).$(WinUIPackageVersion)\build\native\$(WinUIPackageName).targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\$(WinUIPackageName).$(WinUIPackageVersion)\build\native\$(WinUIPackageName).targets'))" />
</Target>
</Project>
Binary file modified packages/playground/windows/playground/Playground_TemporaryKey.pfx
Binary file not shown.