Skip to content
This repository was archived by the owner on Aug 5, 2026. It is now read-only.

Commit 01b3252

Browse files
author
Rajesh
committed
ci: retarget HarfBuzz and verify archives safely
1 parent 71f78ae commit 01b3252

1 file changed

Lines changed: 25 additions & 21 deletions

File tree

.github/workflows/build-static-libs.yml

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,25 @@ jobs:
5050
shell: pwsh
5151
run: python tools/git-sync-deps
5252

53+
- name: Build libHarfBuzzSharp
54+
shell: pwsh
55+
run: |
56+
$outDir = "${{ github.workspace }}\harfbuzz-out"
57+
$sdkVersion = $env:WindowsSDKVersion.TrimEnd([char]'\')
58+
New-Item -ItemType Directory -Force $outDir | Out-Null
59+
60+
& msbuild.exe "skiasharp\native\windows\libHarfBuzzSharp\libHarfBuzzSharp.vcxproj" `
61+
/m /t:Rebuild `
62+
/p:Configuration=Release `
63+
/p:Platform=x64 `
64+
/p:ConfigurationType=StaticLibrary `
65+
/p:PlatformToolset=v143 `
66+
"/p:WindowsTargetPlatformVersion=$sdkVersion" `
67+
"/p:OutDir=$outDir\"
68+
if ($LASTEXITCODE -ne 0) {
69+
throw "libHarfBuzzSharp build failed with exit code $LASTEXITCODE"
70+
}
71+
5372
- name: Build libSkiaSharp
5473
working-directory: skiasharp/externals/skia
5574
shell: pwsh
@@ -87,23 +106,6 @@ jobs:
87106
gn gen out/static
88107
autoninja -C out/static SkiaSharp
89108
90-
- name: Build libHarfBuzzSharp
91-
shell: pwsh
92-
run: |
93-
$outDir = "${{ github.workspace }}\harfbuzz-out"
94-
New-Item -ItemType Directory -Force $outDir | Out-Null
95-
96-
& msbuild.exe "skiasharp\native\windows\libHarfBuzzSharp\libHarfBuzzSharp.vcxproj" `
97-
/m /t:Rebuild `
98-
/p:Configuration=Release `
99-
/p:Platform=x64 `
100-
/p:ConfigurationType=StaticLibrary `
101-
/p:PlatformToolset=v143 `
102-
"/p:OutDir=$outDir\"
103-
if ($LASTEXITCODE -ne 0) {
104-
throw "libHarfBuzzSharp build failed with exit code $LASTEXITCODE"
105-
}
106-
107109
- name: Verify static libraries
108110
shell: pwsh
109111
run: |
@@ -115,10 +117,11 @@ jobs:
115117
if ((Get-Item $library).Length -eq 0) {
116118
throw "$library is empty"
117119
}
118-
& lib.exe /LIST $library | Select-Object -First 5
119-
if ($LASTEXITCODE -ne 0) {
120+
$members = & lib.exe /LIST $library
121+
if ($LASTEXITCODE -ne 0 -or $members.Count -eq 0) {
120122
throw "$library is not a valid COFF library"
121123
}
124+
$members | Select-Object -First 5
122125
}
123126
124127
- name: Upload libSkiaSharp.lib
@@ -263,10 +266,11 @@ jobs:
263266
if ((Get-Item "av_libglesv2.lib").Length -eq 0) {
264267
throw "av_libglesv2.lib is empty"
265268
}
266-
& lib.exe /LIST "av_libglesv2.lib" | Select-Object -First 5
267-
if ($LASTEXITCODE -ne 0) {
269+
$members = & lib.exe /LIST "av_libglesv2.lib"
270+
if ($LASTEXITCODE -ne 0 -or $members.Count -eq 0) {
268271
throw "av_libglesv2.lib is not a valid COFF library"
269272
}
273+
$members | Select-Object -First 5
270274
271275
- name: Upload av_libglesv2.lib
272276
uses: actions/upload-artifact@v7

0 commit comments

Comments
 (0)