Skip to content

Commit 392ff88

Browse files
authored
Merge pull request #17 from unoplatform/dev/jela/trim
Enable trimming for supported platforms
2 parents d303a01 + 11a2d27 commit 392ff88

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

.github/actions/manual-ios-signing/action.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,3 @@ runs:
6262
6363
mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
6464
cp "$provPath" "$HOME/Library/MobileDevice/Provisioning Profiles/$uuid.mobileprovision"
65-
66-
- name: Output summary
67-
shell: bash
68-
run: |
69-
echo "Manual iOS signing configured. UUID=$PROVISIONING_UUID" >> "$GITHUB_STEP_SUMMARY"

.github/workflows/daily-template-size-tracking.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ jobs:
288288
$platform = "${{ matrix.platform }}"
289289
$framework = "${{ matrix.framework }}"
290290
$rid = "${{ matrix.rid }}"
291+
$dotnetVersion = "${{ matrix.dotnet }}"
292+
293+
# Disable XAML/Resource Trimming for net10 due to https://github.com/unoplatform/uno/issues/21731
294+
$enableXamlTrimming = $dotnetVersion -ne "10.0"
291295
292296
# Start timing
293297
$startTime = Get-Date
@@ -305,6 +309,7 @@ jobs:
305309
}
306310
307311
Write-Host "Found project: $($projectFile.FullName)"
312+
Write-Host "XAML/Resource Trimming enabled: $enableXamlTrimming"
308313
309314
switch ($platform) {
310315
"android" {
@@ -314,7 +319,8 @@ jobs:
314319
-c Release `
315320
-p:AndroidPackageFormat=aab `
316321
-p:AndroidKeyStore=false `
317-
-o publish
322+
-o publish `
323+
/bl:build.binlog
318324
}
319325
"ios" {
320326
Write-Host "Building iOS IPA (signed device build)..."
@@ -326,14 +332,18 @@ jobs:
326332
-p:CodesignKey="$env:CODESIGN_KEY" `
327333
-p:CodesignProvision="$env:PROVISIONING_UUID" `
328334
-p:ApplicationId=uno.platform.performance `
329-
-o publish
335+
-o publish `
336+
/bl:build.binlog
330337
}
331338
"wasm" {
332339
Write-Host "Building WebAssembly..."
333340
dotnet publish $projectFile.FullName `
334341
-f $framework `
335342
-c Release `
336-
-o publish
343+
-p:UnoXamlResourcesTrimming=$enableXamlTrimming `
344+
-p:UnoEnableXamlTrimming=$enableXamlTrimming `
345+
-o publish `
346+
/bl:build.binlog
337347
}
338348
{ $_ -in "desktop-windows", "desktop-linux", "desktop-macos", "desktop-windows-aot", "desktop-linux-aot", "desktop-macos-aot" } {
339349
$osName = $platform -replace "desktop-", "" -replace "-aot", ""
@@ -347,15 +357,21 @@ jobs:
347357
-r $rid `
348358
--self-contained true `
349359
-p:PublishAot=true `
350-
-o publish
360+
-p:PublishTrimmed=true `
361+
-o publish `
362+
/bl:build.binlog
351363
} else {
352364
Write-Host "Building $osName Desktop (self-contained)..."
353365
dotnet publish $projectFile.FullName `
354366
-f $framework `
355367
-c Release `
356368
-r $rid `
357369
--self-contained true `
358-
-o publish
370+
-p:PublishTrimmed=true `
371+
-p:UnoXamlResourcesTrimming=$enableXamlTrimming `
372+
-p:UnoEnableXamlTrimming=$enableXamlTrimming `
373+
-o publish `
374+
/bl:build.binlog
359375
}
360376
}
361377
}
@@ -366,6 +382,14 @@ jobs:
366382
Write-Host "Build completed in $buildTime seconds"
367383
echo "BUILD_TIME=$buildTime" >> $env:GITHUB_ENV
368384
385+
- name: Upload Build Binlog
386+
if: always()
387+
uses: actions/upload-artifact@v4
388+
with:
389+
name: binlog-${{ matrix.dotnet }}-${{ matrix.template }}-${{ matrix.platform }}
390+
path: build.binlog
391+
retention-days: 14
392+
369393
- name: Measure Package Size
370394
shell: pwsh
371395
run: |

0 commit comments

Comments
 (0)