Skip to content

Commit

Permalink
build: Separate CI global.json files from local global.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Apr 20, 2024
1 parent a0bfda8 commit 9cbc4e4
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 35 deletions.
3 changes: 1 addition & 2 deletions build/ci/.azure-devops-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ jobs:
parameters:
nugetPackages: $(NUGET_PACKAGES)

- template: templates/dotnet-install.yml
- template: templates/dotnet-mobile-install-windows.yml

- template: templates/gitversion.yml
- template: templates/dotnet-mobile-install-windows.yml
- template: templates/jdk-setup.yml

- task: MSBuild@1
Expand Down
6 changes: 0 additions & 6 deletions build/ci/.azure-devops-package-netcoremobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ jobs:

- template: templates/gitversion.yml

- script: |
cp global.json global-net7.json
cp global-net8.json global.json
displayName: Replace global.json with .NET 8
condition: and(succeeded(), eq(variables.UnoDisableNetPreviousMobile, 'true'))
- template: templates/dotnet-mobile-install-windows.yml

# This task is required to run in separately to avoid hitting targets file
Expand Down
5 changes: 0 additions & 5 deletions build/ci/.azure-devops-package-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ jobs:

- template: templates/gitversion.yml

- script: |
cp global.json global-net7.json
cp global-net8.json global.json
displayName: Replace global.json with .NET 8
- template: templates/dotnet-install.yml

# This task is required to run in separately to avoid hitting targets file
Expand Down
5 changes: 0 additions & 5 deletions build/ci/.azure-devops-package-skia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ jobs:

- template: templates/gitversion.yml

- script: |
cp global.json global-net7.json
cp global-net8.json global.json
displayName: Replace global.json with .NET 8
- template: templates/dotnet-install.yml

## Restore skia-macos native assets
Expand Down
5 changes: 0 additions & 5 deletions build/ci/.azure-devops-package-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ jobs:

- template: templates/gitversion.yml

- script: |
cp global.json global-net7.json
cp global-net8.json global.json
displayName: Replace global.json with .NET 8
- template: templates/dotnet-install.yml

# This task is required to run in separately to avoid hitting targets file
Expand Down
13 changes: 2 additions & 11 deletions build/ci/.azure-devops-project-template-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ jobs:

- template: templates/gitversion.yml

- script: |
cp global.json global-net7.json
cp global-net8.json global.json
displayName: Replace global.json with .NET 8
- template: templates/dotnet-mobile-install-windows.yml

- script: copy $(System.ArtifactsDirectory)\NugetPackages\vslatest\*.nupkg $(Build.SourcesDirectory)\src\PackageCache
Expand Down Expand Up @@ -61,9 +56,7 @@ jobs:
- template: templates/gitversion.yml

- bash: |
cp global.json global-net7.json
cp global-net8.json global.json
sed -i.bu 's/8.0.100/8.0.200/' global.json
sed -i.bu 's/8.0.100/8.0.200/' build/ci/net8/global.json
displayName: Replace global.json with .NET 8.0.200
- template: templates/ios-build-select-version.yml
Expand Down Expand Up @@ -101,9 +94,7 @@ jobs:
artifactName: NugetPackages

- script: |
cp global.json global-net7.json
cp global-net8.json global.json
sed -i 's/8.0.100/8.0.200/g' global.json
sed -i 's/8.0.100/8.0.200/g' build/ci/net8/global.json
displayName: Replace global.json with .NET 8.0.200
- template: templates/dotnet-mobile-install-linux.yml
Expand Down
14 changes: 14 additions & 0 deletions build/ci/net7/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"sdk": {
"version": "7.0.406",
"allowPrerelease": false,
"rollForward": "latestFeature"
},
"tools": {
"dotnet": "7.0.406"
},
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.44",
"Microsoft.Build.NoTargets": "3.7.56"
}
}
14 changes: 14 additions & 0 deletions build/ci/net8/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"sdk": {
"version": "8.0.100",
"allowPrerelease": true,
"rollForward": "latestPatch"
},
"tools": {
"dotnet": "8.0.100"
},
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.44",
"Microsoft.Build.NoTargets": "3.7.56"
}
}
14 changes: 13 additions & 1 deletion build/ci/templates/dotnet-install.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
steps:

- task: UseDotNet@2
displayName: 'Use .NET SDK'
displayName: 'Use .NET 7 SDK'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
useGlobalJson: true
includePreviewVersions: true
workingDirectory: build/ci/net7
condition: and(succeeded(), eq(variables.UnoDisableNetCurrent, 'true'))

- task: UseDotNet@2
displayName: 'Use .NET 8 SDK'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
useGlobalJson: true
includePreviewVersions: true
workingDirectory: build/ci/net8
condition: and(succeeded(), ne(variables.UnoDisableNetCurrent, 'true'))

0 comments on commit 9cbc4e4

Please sign in to comment.