Skip to content

A Swiss Army knife for developers.

Improved init.ps1 and tried a different CI + clean out CI

Etienne Baudoux45de3d96aa91
diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml
index 23b1bf420..816a40679 100644
--- a/ci/azure-pipelines.yml
+++ b/ci/azure-pipelines.yml
@@ -18,21 +18,24 @@ variables:
jobs:
- job: Build
- timeoutInMinutes: 120
+ timeoutInMinutes: 240
steps:
+ # Restore nuget package for x86. This should in fact restore packages for every platform.
- task: MSBuild@1
displayName: 'Restore x86 nuget'
inputs:
- solution: '**/*.sln'
+ solution: '$(solution)'
platform: 'x86'
configuration: '$(buildConfiguration)'
msbuildArguments: '/t:restore'
+ # Restoring nugets for every platforms sounds unnecessary but allows to create 'project.assets.json' files for
+ # each platform, which is required in order to build in Release mode.
- task: MSBuild@1
displayName: 'Restore x64 nuget'
inputs:
- solution: '**/*.sln'
+ solution: '$(solution)'
platform: 'x64'
configuration: '$(buildConfiguration)'
msbuildArguments: '/t:restore'
@@ -40,7 +43,7 @@ jobs:
- task: MSBuild@1
displayName: 'Restore arm nuget'
inputs:
- solution: '**/*.sln'
+ solution: '$(solution)'
platform: 'arm'
configuration: '$(buildConfiguration)'
msbuildArguments: '/t:restore'
@@ -48,7 +51,7 @@ jobs:
- task: MSBuild@1
displayName: 'Restore arm64 nuget'
inputs:
- solution: '**/*.sln'
+ solution: '$(solution)'
platform: 'arm64'
configuration: '$(buildConfiguration)'
msbuildArguments: '/t:restore'
@@ -56,90 +59,18 @@ jobs:
- task: MSBuild@1
displayName: 'Build solution'
inputs:
- solution: '**/*.sln'
+ solution: '$(solution)'
configuration: '$(buildConfiguration)'
- msbuildArguments: '/p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageSigningEnabled=false /p:AppxBundle=Always'
-
- # - task: NuGetToolInstaller@1
-
- # - task: NuGetCommand@2
- # inputs:
- # restoreSolution: '**/*.wapproj'
-
- - task: MSBuild@1
- displayName: 'Restore nuget'
- inputs:
- solution: '**/*.sln'
- msbuildVersion: '16.0'
- msbuildArchitecture: 'x86'
- configuration: '$(buildConfiguration)'
- msbuildArguments: '/t:restore'
- logProjectEvents: true
- createLogFile: true
-
- - task: MSBuild@1
- displayName: 'Build'
- inputs:
- solution: '**/*.wapproj'
- msbuildVersion: '16.0'
- msbuildArchitecture: 'x86'
- configuration: '$(buildConfiguration)'
- msbuildArguments: '/p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageSigningEnabled=false /p:AppxBundle=Always'
- logProjectEvents: true
- createLogFile: true
-
-# - task: MSBuild@1
-# displayName: 'Restore nuget for Solution through MSBuild'
-# inputs:
-# solution: '**/*.sln'
-# platform: 'x86'
-# configuration: '$(BuildConfiguration)'
-# msbuildArguments: '/t:restore'
-#
-# - task: MSBuild@1
-# displayName: 'Restore nuget for WAPPROJ through MSBuild'
-# inputs:
-# solution: '**/*.wapproj'
-# platform: 'x86'
-# configuration: '$(BuildConfiguration)'
-# msbuildArguments: '/t:restore'
-
- - task: VSBuild@1
- inputs:
- solution: '**\*.sln'
- platform: 'x86'
- configuration: '$(buildConfiguration)'
- msbuildArgs: '/t:Restore'
- clean: true
- logProjectEvents: false
- maximumCpuCount: false
-
- - task: VSBuild@1
- inputs:
- solution: '**\*.sln'
- platform: 'x86'
- configuration: '$(buildConfiguration)'
- msbuildArgs: '/t:build;_GenerateAppxPackage /p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=Sideload /p:AppxPackageSigningEnabled=false'
- clean: false
- logProjectEvents: false
- maximumCpuCount: false
+ msbuildArguments: '/t:build;_GenerateAppxPackage /p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxPackageSigningEnabled=false /p:AppxBundle=Always'
+ maximumCpuCount: true
+ # Older version used in this test build https://etienne-baudoux.visualstudio.com/Side%20projects/_build/results?buildId=245
# - task: MSBuild@1
- # displayName: 'Build Solution'
+ # displayName: 'Build solution'
# inputs:
# solution: '**/*.sln'
- # platform: 'x86'
- # configuration: '$(buildConfiguration)'
- # maximumCpuCount: true
-
- # - task: MSBuild@1
- # displayName: 'Build MSIX'
- # inputs:
- # solution: '**/*.wapproj'
- # platform: 'x86'
# configuration: '$(buildConfiguration)'
- # msbuildArguments: '/t:build;_GenerateAppxPackage /p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Always /p:UapAppxPackageBuildMode=Sideload /p:AppxPackageSigningEnabled=false'
- # maximumCpuCount: true
+ # msbuildArguments: '/p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageSigningEnabled=false /p:AppxBundle=Always'
- task: VSTest@2
displayName: 'Tests'
diff --git a/tools/Restore-NuGetPackages.ps1 b/tools/Restore-NuGetPackages.ps1
index 1a5e675a4..517384b62 100644
--- a/tools/Restore-NuGetPackages.ps1
+++ b/tools/Restore-NuGetPackages.ps1
@@ -26,7 +26,14 @@ Param(
if ($Path.EndsWith('.sln')) {
Write-Verbose "Restoring NuGet packages for $Path with verbosity $Verbosity"
- Invoke-Expression '& "$MSBuildPath" $Path /t:restore /v:$Verbosity'
+ Invoke-Expression '& "$MSBuildPath" $Path /t:restore /p:Configuration=Release /p:platform=x86 /v:$Verbosity'
+ Invoke-Expression '& "$MSBuildPath" $Path /t:restore /p:Configuration=Release /p:platform=x64 /v:$Verbosity'
+ Invoke-Expression '& "$MSBuildPath" $Path /t:restore /p:Configuration=Release /p:platform=arm /v:$Verbosity'
+ Invoke-Expression '& "$MSBuildPath" $Path /t:restore /p:Configuration=Release /p:platform=arm64 /v:$Verbosity'
+ Invoke-Expression '& "$MSBuildPath" $Path /t:restore /p:Configuration=Debug /p:platform=x86 /v:$Verbosity'
+ Invoke-Expression '& "$MSBuildPath" $Path /t:restore /p:Configuration=Debug /p:platform=x64 /v:$Verbosity'
+ Invoke-Expression '& "$MSBuildPath" $Path /t:restore /p:Configuration=Debug /p:platform=arm /v:$Verbosity'
+ Invoke-Expression '& "$MSBuildPath" $Path /t:restore /p:Configuration=Debug /p:platform=arm64 /v:$Verbosity'
if ($lastexitcode -ne 0) { throw }
$slnDir = Split-Path -Path $Path -Parent