Skip to content

Commit

Permalink
Moving OneBranch logic to GitHub (#4828)
Browse files Browse the repository at this point in the history
* Moving OneBranch logic to GitHub
Consolidating YAML

* Fix build config

* Adding .net 6 update

---------

Co-authored-by: trwalke <[email protected]>
  • Loading branch information
trwalke and trwalke authored Aug 5, 2024
1 parent 707e368 commit 52de2aa
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 24 deletions.
49 changes: 49 additions & 0 deletions build/template-OneBranch-CI-libsandsamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,55 @@ parameters:
MsalSourceDir: 'microsoft-authentication-library-for-dotnet\' #Default MSAL Location

steps:

# Unit tests require .NET 3.x
- task: UseDotNet@2
displayName: 'Use .Net Core SDK 3.x'
inputs:
version: 3.x

# Use the latest .NET SDK
- task: UseDotNet@2
displayName: 'Use .Net Core sdk 6.x'
inputs:
version: 6.x

- task: DotNetCoreCLI@2
displayName: 'dotnet workload restore for Desktop project'
inputs:
command: 'custom'
custom: 'workload'
arguments: 'restore microsoft-authentication-library-for-dotnet\src\client\Microsoft.Identity.Client.Desktop\Microsoft.Identity.Client.Desktop.csproj'

- task: DotNetCoreCLI@2
displayName: 'dotnet workload restore for Identity.Client'
inputs:
command: 'custom'
custom: 'workload'
arguments: 'restore microsoft-authentication-library-for-dotnet\src\client\Microsoft.Identity.Client\Microsoft.Identity.Client.csproj'

- task: PowerShell@2
displayName: Install MAUI
inputs:
targetType: 'inline'
script: |
dotnet workload install maui --source https://api.nuget.org/v3/index.json
dotnet workload install android --source https://api.nuget.org/v3/index.json
- task: PowerShell@2
displayName: Install Chocolatey
inputs:
targetType: 'inline'
script: |
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
- task: PowerShell@2
displayName: Install Java 11
inputs:
targetType: 'inline'
script: |
choco install openjdk --version=11.0.2.01 -y
- task: CmdLine@2
displayName: 'Clear local NuGet cache'
inputs:
Expand Down
30 changes: 6 additions & 24 deletions build/template-OneBranch-Tests-libsandsamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,15 @@ parameters:
MsalSourceDir: '' #Default MSAL Location

steps:
- task: CmdLine@2
displayName: 'Clear local NuGet cache'
inputs:
script: 'nuget locals all -clear'

- task: VSBuild@1
displayName: 'NuGet restore ${{ parameters.Solution }}'
inputs:
solution: ${{ parameters.Solution }}
msbuildArgs: '/t:restore'
platform: ${{ parameters.BuildPlatform }}
configuration: ${{ parameters.BuildConfiguration }}

- task: JavaToolInstaller@0
displayName: 'Use Java 11'
- task: UseDotNet@2
displayName: 'Use the latest .NET 6'
inputs:
versionSpec: 11
jdkArchitectureOption: x64
jdkSourceOption: PreInstalled
version: 6.x

- task: VSBuild@1
displayName: 'Build solution ${{ parameters.Solution }}'
inputs:
solution: ${{ parameters.Solution }}
msbuildArgs: '/p:RunCodeAnalysis=false /p:MsalClientSemVer=${{ parameters.MsalClientSemVer }} /p:SourceLinkCreate=true /p:ContinousIntegrationBuild=true'
platform: ${{ parameters.BuildPlatform }}
configuration: ${{ parameters.BuildConfiguration }}
- template: template-restore-build-libsandsamples.yaml
parameters:
Solution: 'LibsAndSamples.sln'

# Run All Desktop Tests
- template: template-run-all-tests.yaml
Expand Down

0 comments on commit 52de2aa

Please sign in to comment.