Skip to content

CI: Update Azure Pipeline project build CI #13405

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

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
91ee304
Initial commit
0x5bfa Sep 12, 2023
96bdacc
Update
0x5bfa Sep 12, 2023
1500997
Update
0x5bfa Sep 13, 2023
aecdae3
Merge branch 'main' into 5bfa/Add-TransferGraph
0x5bfa Sep 14, 2023
f757935
Update
0x5bfa Sep 15, 2023
42435da
Merge branch 'main' into 5bfa/Add-TransferGraph
0x5bfa Sep 15, 2023
fcd3824
Update
0x5bfa Sep 15, 2023
8da86e0
Merge branch '5bfa/Add-TransferGraph' of https://github.com/0x5bfa/Fi…
0x5bfa Sep 15, 2023
67c03fa
Update
0x5bfa Sep 15, 2023
d20e14a
Speed calc
gave92 Sep 16, 2023
feaeea7
Update
0x5bfa Sep 16, 2023
181552f
Update
0x5bfa Sep 16, 2023
5405899
Update
0x5bfa Sep 16, 2023
80b2e5f
Update src/Files.App/Utils/StatusCenter/StatusCenterItem.cs
0x5bfa Sep 16, 2023
6f9fe76
Remove unncessary comments
0x5bfa Sep 16, 2023
9c92da4
Merge branch '5bfa/Add-TransferGraph' of https://github.com/0x5bfa/Fi…
0x5bfa Sep 16, 2023
7e6a86a
Merge commit 'refs/pull/13359/head' of https://github.com/files-commu…
gave92 Sep 17, 2023
9e65a23
Get progress percentage as double
gave92 Sep 17, 2023
5a3f7a4
Remove extra class
gave92 Sep 17, 2023
f43af45
Fixed build issues
0x5bfa Sep 17, 2023
e8322d2
fix
0x5bfa Sep 17, 2023
b90dd1f
Update
0x5bfa Sep 18, 2023
80dad8a
Revert "Update"
0x5bfa Sep 18, 2023
19c4d7c
Update
0x5bfa Sep 18, 2023
df148fd
Merge commit 'refs/pull/13359/head' of https://github.com/files-commu…
gave92 Sep 18, 2023
12840c5
No precalc size
gave92 Sep 18, 2023
9b1f9d5
Calc size in parallel
gave92 Sep 18, 2023
a672bfe
Fix size calc for files
gave92 Sep 18, 2023
657fa5c
Merge pull request #8 from gave92/rev_speed_2
0x5bfa Sep 19, 2023
a680e8e
Revert "Calc speed for folders"
0x5bfa Sep 19, 2023
44b7cd5
Merge pull request #9 from 0x5bfa/revert-8-rev_speed_2
0x5bfa Sep 19, 2023
3c6d1fd
Merge branch 'files-community:main' into main
0x5bfa Sep 19, 2023
64c9a3b
Merge branch 'files-community:main' into main
0x5bfa Sep 21, 2023
066e1a0
Initial commit
0x5bfa Sep 21, 2023
c434374
Update build configurations
0x5bfa Sep 21, 2023
edb54a3
Fix 1
0x5bfa Sep 21, 2023
d9d18d1
Add displayNames
0x5bfa Sep 21, 2023
498c4d4
Fixed
0x5bfa Sep 21, 2023
00b923c
Update
0x5bfa Sep 22, 2023
30557b6
Update
0x5bfa Sep 22, 2023
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
167 changes: 48 additions & 119 deletions builds/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,122 +1,51 @@
# Copyright (c) 2023 Files Community
# Licensed under the MIT license. See the LICENSE.

trigger:
- main

pool:
vmImage: 'windows-latest'

variables:
solution: '**/*.sln'
buildPlatform: 'x64'
buildConfiguration: 'Release'
appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\'

steps:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
[xml]$xmlDoc = Get-Content '$(Build.SourcesDirectory)\src\Files.App (Package)\Package.appxmanifest'
$xmlDoc.Package.Identity.Name="49306atecsolution.FilesUWP"
$xmlDoc.Package.Identity.Publisher="CN=53EC4384-7F5B-4CF6-8C23-513FFE9D1AB7"
$xmlDoc.Package.Properties.DisplayName="Files"
$xmlDoc.Package.Applications.Application.VisualElements.DisplayName="Files"
$xmlDoc.Save('$(Build.SourcesDirectory)\src\Files.App (Package)\Package.appxmanifest')
failOnStderr: true

- task: PowerShell@2
displayName: 'Use Release Logo'
inputs:
targetType: 'inline'
script: |
gci $(Build.SourcesDirectory)\src -Include *.csproj, *.appxmanifest, *.wapproj -recurse | ForEach -Process {
(Get-Content $_ -Raw | ForEach -Process {$_ -replace "Assets\\AppTilesDev", "Assets\AppTiles"}) | Set-Content $_ -NoNewline
}
failOnStderr: true

- task: DownloadSecureFile@1
name: mapsDevKey
displayName: 'Download Bing Maps Dev Key'
inputs:
secureFile: 'BingMapsKey.txt'

- task: CopyFiles@2
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: '$(mapsDevKey.secureFilePath)'
TargetFolder: '$(Build.SourcesDirectory)\src\Files.App\Resources'
overWrite: true

- task: UseDotNet@2
inputs:
packageType: sdk
version: 7.0.x
includePreviewVersions: true

- task: CmdLine@2
inputs:
script: |
for /f %%a in ('dir /b /a:d %localappdata%\Microsoft\VisualStudio\17*') do echo UsePreviews=True>%localappdata%\Microsoft\VisualStudio\%%a\sdk.txt

- task: MSBuild@1
inputs:
platform: 'x64'
solution: '**/*.sln'
configuration: '$(buildConfiguration)'
msbuildArguments: '/t:restore /p:Configuration=Debug;Platform="$(buildPlatform)";PublishReadyToRun=true'
maximumCpuCount: true

- task: MSBuild@1
inputs:
platform: 'x64'
solution: '**/*.wapproj'
configuration: '$(buildConfiguration)'
msbuildArguments: '/t:build;_GenerateAppxPackage /p:Configuration=Debug;Platform="$(buildPlatform)";AppxBundle=Always;AppxBundlePlatforms="$(buildPlatform)";AppxPackageDir="$(appxPackageDir)";AppxPackageSigningEnabled=true;UapAppxPackageBuildMode=SideloadOnly;PackageCertificateKeyFile="$(Build.SourcesDirectory)\builds\Files_SelfSigned.pfx";PackageCertificatePassword="";PackageCertificateThumbprint=""'
maximumCpuCount: true

- task: DotNetCoreCLI@2
inputs:
command: 'build'
arguments: './tests/Files.InteractionTests/Files.InteractionTests.csproj --configuration $(buildConfiguration)'

- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
# Find correct folder and run app install script.
cd $(appxPackageDir)

$AppBundle = Get-ChildItem -Filter Files*Test -Name
echo $AppBundle
cd $AppBundle
./Install.ps1 -Force
Get-AppxPackage
errorActionPreference: 'continue'
failOnStderr: true
workingDirectory: '$(System.DefaultWorkingDirectory)'


- task: Windows Application Driver@0
inputs:
OperationType: 'Start'
AgentResolution: '1080p'

- task: VSTest@2
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\*Files.InteractionTests.dll
!**\*TestAdapter.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'

- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '**\bin\$(BuildConfiguration)\**'
TargetFolder: '$(build.artifactstagingdirectory)'

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)

stages:
- stage: Build

pool:
vmImage: 'windows-latest'

jobs:
- job: Platform

timeoutInMinutes: 120
strategy:
maxParallel: 10
matrix:
Debug_x64:
buildPlatform: 'x64'
buildConfiguration: 'Debug'
Debug_Arm64:
buildPlatform: 'arm64'
buildConfiguration: 'Debug'
Release_x64:
buildPlatform: 'x64'
buildConfiguration: 'Release'
Release_x86:
buildPlatform: 'x86'
buildConfiguration: 'Release'
Release_Arm64:
buildPlatform: 'arm64'
buildConfiguration: 'Release'

variables:
solutionPath: 'Files.sln'
packagingProjectPath: './tests/Files.App (Package)/Files.Package.wapproj'
interactionTestsProjectPath: './tests/Files.InteractionTests/Files.InteractionTests.csproj'
appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages'

steps:
- template: templates/Files-BuildProjects-Steps.yml

- stage: Test
dependsOn: Build
jobs:

- template: templates\Files-RunInteractionTest-Steps.yml
33 changes: 33 additions & 0 deletions builds/templates/Files-BuildProjects-Steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (c) 2023 Files Community
# Licensed under the MIT license. See the LICENSE.

steps:
- template: Files-UpdatePackage-Steps.yml

- template: Files-InstallDotNetSDK-Steps.yml

- template: Files-SetupBingMapSecrets-Steps.yml

- template: Files-UseVS2022Preview-Steps.yml

- template: Files-PrepareTheSolution.yml

- task: MSBuild@1
displayName: 'Build the package project'
inputs:
platform: '$(buildPlatform)'
solution: '**/*.wapproj'
configuration: '$(buildConfiguration)'
msbuildArguments: '
/t:build;_GenerateAppxPackage
/p:Configuration="$(buildConfiguration)"
/p:Platform="$(buildPlatform)"
/p:AppxBundle=Always
/p:AppxBundlePlatforms="$(buildPlatform)"
/p:AppxPackageDir="$(appxPackageDir)"
/p:AppxPackageSigningEnabled=true
/p:UapAppxPackageBuildMode=SideloadOnly
/p:PackageCertificateKeyFile="$(Build.SourcesDirectory)\builds\Files_SelfSigned.pfx"
/p:PackageCertificatePassword=""
/p:PackageCertificateThumbprint=""'
maximumCpuCount: true
10 changes: 10 additions & 0 deletions builds/templates/Files-InstallDotNetSDK-Steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2023 Files Community
# Licensed under the MIT license. See the LICENSE.

steps:
- task: UseDotNet@2
displayName: 'Install .NET'
inputs:
packageType: sdk
version: 7.0.x
includePreviewVersions: true
16 changes: 16 additions & 0 deletions builds/templates/Files-PrepareTheSolution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) 2023 Files Community
# Licensed under the MIT license. See the LICENSE.

steps:
- task: MSBuild@1
displayName: 'Restore the solution'
inputs:
platform: '$(buildPlatform)'
solution: '$(variables.solutionPath)'
configuration: '$(buildConfiguration)'
msbuildArguments: '
/t:restore
/p:Configuration=$(buildConfiguration)
/p:Platform="$(buildPlatform)"
/p:PublishReadyToRun=true'
maximumCpuCount: true
16 changes: 16 additions & 0 deletions builds/templates/Files-PublishBuildArtifacts-Steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) 2023 Files Community
# Licensed under the MIT license. See the LICENSE.

steps:
- task: CopyFiles@2
displayName: 'Copy the artifacts'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '**\bin\$(BuildConfiguration)\**'
TargetFolder: '$(build.artifactstagingdirectory)'

- task: PublishBuildArtifacts@1
displayName: 'Publish the artifacts'
inputs:
ArtifactName: 'PackageArtifactsOfDevCondition'
PathtoPublish: '$(build.artifactstagingdirectory)'
42 changes: 42 additions & 0 deletions builds/templates/Files-RunInteractionTest-Steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright (c) 2023 Files Community
# Licensed under the MIT license. See the LICENSE.

steps:
- task: DotNetCoreCLI@2
inputs:
command: 'build'
arguments: '$(interactionTestsProjectPath) --configuration x64'

- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
# Find correct folder and run app install script.
cd $(appxPackageDir)

$AppBundle = Get-ChildItem -Filter Files*Test -Name
echo $AppBundle
cd $AppBundle
./Install.ps1 -Force
Get-AppxPackage
errorActionPreference: 'continue'
failOnStderr: true
workingDirectory: '$(System.DefaultWorkingDirectory)'

- task: Windows Application Driver@0
inputs:
OperationType: 'Start'
AgentResolution: '1080p'

- task: VSTest@2
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\*Files.InteractionTests.dll
!**\*TestAdapter.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'

- task: Windows Application Driver@0
inputs:
OperationType: 'Stop'
17 changes: 17 additions & 0 deletions builds/templates/Files-SetupBingMapSecrets-Steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2023 Files Community
# Licensed under the MIT license. See the LICENSE.

steps:
- task: DownloadSecureFile@1
displayName: 'Download BingMap dev key'
name: mapsDevKey
inputs:
secureFile: 'BingMapsKey.txt'

- task: CopyFiles@2
displayName: 'Copy BingMap dev key'
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: '$(mapsDevKey.secureFilePath)'
TargetFolder: '$(Build.SourcesDirectory)\src\Files.App\Resources'
overWrite: true
25 changes: 25 additions & 0 deletions builds/templates/Files-UpdatePackage-Steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# TODO: Move to scripts

steps:
- task: PowerShell@2
displayName: 'Set appropriate package info'
inputs:
targetType: 'inline'
script: |
[xml]$xmlDoc = Get-Content '$(Build.SourcesDirectory)\src\Files.App (Package)\Package.appxmanifest'
$xmlDoc.Package.Identity.Name="49306atecsolution.FilesUWP"
$xmlDoc.Package.Identity.Publisher="CN=53EC4384-7F5B-4CF6-8C23-513FFE9D1AB7"
$xmlDoc.Package.Properties.DisplayName="Files"
$xmlDoc.Package.Applications.Application.VisualElements.DisplayName="Files"
$xmlDoc.Save('$(Build.SourcesDirectory)\src\Files.App (Package)\Package.appxmanifest')
failOnStderr: true

- task: PowerShell@2
displayName: 'Set appropriate package logo'
inputs:
targetType: 'inline'
script: |
gci $(Build.SourcesDirectory)\src -Include *.csproj, *.appxmanifest, *.wapproj -recurse | ForEach -Process {
(Get-Content $_ -Raw | ForEach -Process {$_ -replace "Assets\\AppTilesDev", "Assets\AppTiles"}) | Set-Content $_ -NoNewline
}
failOnStderr: true
9 changes: 9 additions & 0 deletions builds/templates/Files-UseVS2022Preview-Steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2023 Files Community
# Licensed under the MIT license. See the LICENSE.

steps:
- task: CmdLine@2
displayName: 'Use preview version of VS2022 SDK'
inputs:
script: |
for /f %%a in ('dir /b /a:d %localappdata%\Microsoft\VisualStudio\17*') do echo UsePreviews=True>%localappdata%\Microsoft\VisualStudio\%%a\sdk.txt
4 changes: 4 additions & 0 deletions scripts/Files-UpdatePackage-Script.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<#


#>