Skip to content

Commit cbe3532

Browse files
committed
fix: Optimize .NET install
1 parent 01f98b9 commit cbe3532

File tree

5 files changed

+35
-7
lines changed

5 files changed

+35
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Prefix your items with `(Template)` if the change is about the template and not
1313
- Updated Configuration documentation and uno workaround comment.
1414
- Cleanup (fixes warnings on Windows, fixes vulnerabilities and renamed extensions) & Update packages.
1515
- Updated the Segoe MDL2 Assets font to fix an issue with the Flip View icons on Windows.
16+
- Optimized the .NET workloads install process.
1617

1718
## 3.8.X
1819
- Updated from .NET 8 to .NET 9.

build/steps-build-android.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
steps:
1616
- template: templates/dotnet-install.yml
17+
parameters:
18+
installAndroidWorkload: true
1719

1820
#-if false
1921
- download: current

build/steps-build-ios.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
steps:
2525
- template: templates/dotnet-install.yml
26+
parameters:
27+
installAppleWorkload: true
2628

2729
#-if false
2830
- download: current

build/steps-build-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
steps:
1616
- template: templates/dotnet-install.yml
17-
parameters:
18-
installMobileWorkload: false
1917

2018
#-if false
2119
- download: current

build/templates/dotnet-install.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
parameters:
2-
UnoCheck_Version: '1.27.4'
3-
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/870b2615fc2783e9355374c12015597a92dd242a/manifests/uno.ui.manifest.json'
2+
- name: UnoCheck_Version
3+
type: string
4+
default: '1.27.4'
5+
6+
- name: UnoCheck_Manifest
7+
type: string
8+
default: 'https://raw.githubusercontent.com/unoplatform/uno.check/870b2615fc2783e9355374c12015597a92dd242a/manifests/uno.ui.manifest.json'
9+
10+
# Whether it should install the Android workload.
11+
- name: installAndroidWorkload
12+
type: boolean
13+
default: false
14+
15+
# Whether it should install the iOS workload.
16+
- name: installAppleWorkload
17+
type: boolean
18+
default: false
419

520
steps:
621
- task: UseDotNet@2
@@ -11,8 +26,18 @@ steps:
1126

1227
- powershell: |
1328
& dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json
14-
& uno-check -v --ci --non-interactive --fix --skip xcode --skip gtk3 --skip vswin --skip vsmac --skip androidsdk --skip androidemulator --manifest ${{ parameters.UnoCheck_Manifest }}
15-
displayName: Install .NET Workloads | Uno Check
29+
& uno-check -v --ci --non-interactive --fix --skip ios --skip xcode --skip gtk3 --skip vswin --skip vsmac --skip androidsdk --skip androidemulator --manifest ${{ parameters.UnoCheck_Manifest }}
30+
displayName: Install Android .NET Workloads | Uno Check
31+
errorActionPreference: continue
32+
ignoreLASTEXITCODE: true
33+
retryCountOnTaskFailure: 3
34+
condition: and(succeeded(), eq('${{ parameters.installAndroidWorkload }}', true))
35+
36+
- powershell: |
37+
& dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json
38+
& uno-check -v --ci --non-interactive --fix --skip android --skip xcode --skip gtk3 --skip vswin --skip vsmac --skip androidsdk --skip androidemulator --manifest ${{ parameters.UnoCheck_Manifest }}
39+
displayName: Install iOS .NET Workloads | Uno Check
1640
errorActionPreference: continue
1741
ignoreLASTEXITCODE: true
18-
retryCountOnTaskFailure: 3
42+
retryCountOnTaskFailure: 3
43+
condition: and(succeeded(), eq('${{ parameters.installAppleWorkload }}', true))

0 commit comments

Comments
 (0)