Skip to content

Commit

Permalink
Merge pull request #337 from autonomys/fix-windows-packaging
Browse files Browse the repository at this point in the history
Fix Windows packaging and test CI
  • Loading branch information
nazar-pc authored Nov 27, 2024
2 parents 013e56a + 9cc4bf0 commit 33e2c48
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 8 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,22 @@ jobs:
Add-Content $env:GITHUB_ENV ("LIB=" + $env:LIB + ";" + "C:\gtk-build\gtk\x64\release\lib")
Add-Content $env:GITHUB_PATH "C:\gtk-build\gtk\x64\release\bin"
# We have hardcoded list of libraries in space-acres.wxs, make sure it didn't change unexpectedly
Get-ChildItem C:\gtk-build\gtk\x64\release\lib\gdk-pixbuf-2.0\2.10.0\loaders\*.dll | ForEach-Object { $_.Name } > actual-pixbuf-loaders.log
if (Compare-Object -ReferenceObject (Get-Content -Path res\windows\wix\expected-pixbuf-loaders.log) -DifferenceObject (Get-Content -Path actual-pixbuf-loaders.log)) {
Write-Output "Expected pixbuf -loaders:"
Get-Content res\windows\wix\expected-pixbuf-loaders.log
Write-Output "`r`nActual pixbuf loaders:"
Get-Content actual-pixbuf-loaders.log
Throw "Actual pixbuf loaders do not match expected"
}
# We have hardcoded list of libraries in space-acres.wxs, make sure it didn't change unexpectedly
Get-ChildItem C:\gtk-build\gtk\x64\release\bin\*.dll | ForEach-Object { $_.Name } > actual-dlls.log
if (Compare-Object -ReferenceObject (Get-Content -Path res\windows\wix\expected-dlls.log) -DifferenceObject (Get-Content -Path actual-dlls.log)) {
Write-Output "Expected DLLs:"
Get-Content res\windows\wix\expected-dlls.log
Write-Output "Actual DLLs:"
Write-Output "`r`nActual DLLs:"
Get-Content actual-dlls.log
Throw "Actual DLLs do not match expected"
}
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,22 @@ jobs:
Add-Content $env:GITHUB_ENV ("LIB=" + $env:LIB + ";" + "C:\gtk-build\gtk\x64\release\lib")
Add-Content $env:GITHUB_PATH "C:\gtk-build\gtk\x64\release\bin"
# We have hardcoded list of libraries in space-acres.wxs, make sure it didn't change unexpectedly
Get-ChildItem C:\gtk-build\gtk\x64\release\lib\gdk-pixbuf-2.0\2.10.0\loaders\*.dll | ForEach-Object { $_.Name } > actual-pixbuf-loaders.log
if (Compare-Object -ReferenceObject (Get-Content -Path res\windows\wix\expected-pixbuf-loaders.log) -DifferenceObject (Get-Content -Path actual-pixbuf-loaders.log)) {
Write-Output "Expected pixbuf -loaders:"
Get-Content res\windows\wix\expected-pixbuf-loaders.log
Write-Output "`r`nActual pixbuf loaders:"
Get-Content actual-pixbuf-loaders.log
Throw "Actual pixbuf loaders do not match expected"
}
# We have hardcoded list of libraries in space-acres.wxs, make sure it didn't change unexpectedly
Get-ChildItem C:\gtk-build\gtk\x64\release\bin\*.dll | ForEach-Object { $_.Name } > actual-dlls.log
if (Compare-Object -ReferenceObject (Get-Content -Path res\windows\wix\expected-dlls.log) -DifferenceObject (Get-Content -Path actual-dlls.log)) {
Write-Output "Expected DLLs:"
Get-Content res\windows\wix\expected-dlls.log
Write-Output "Actual DLLs:"
Write-Output "`r`nActual DLLs:"
Get-Content actual-dlls.log
Throw "Actual DLLs do not match expected"
}
Expand Down Expand Up @@ -269,5 +279,5 @@ jobs:
with:
tool: cargo-nextest

- name: cargo nextest run --locked --no-tests pass
run: cargo -Zgitoxide -Zgit nextest run --locked --no-tests pass
- name: cargo nextest run --locked --no-tests=pass
run: cargo -Zgitoxide -Zgit nextest run --locked --no-tests=pass
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "space-acres"
description = "Space Acres is an opinionated GUI application for farming on Autonomys Network"
license = "0BSD"
version = "0.2.5"
version = "0.2.6"
authors = ["Nazar Mokrynskyi <[email protected]>"]
repository = "https://github.com/autonomys/space-acres"
edition = "2021"
Expand Down
1 change: 1 addition & 0 deletions res/windows/wix/expected-pixbuf-loaders.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pixbufloader_svg.dll
4 changes: 2 additions & 2 deletions res/windows/wix/space-acres.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@
<Directory Id='gdk_pixbuf_2.0' Name='gdk-pixbuf-2.0'>
<Directory Id='gdk_pixbuf_2.10.0' Name='2.10.0'>
<Directory Id='loaders' Name='loaders'>
<Component Id='gdk_pixbuf_loaders' Guid='613bbf0a-780c-4d31-aaab-a81d556c289c'>
<File Id='libpixbufloader_svg.dll' Name='libpixbufloader-svg.dll' DiskId='1' Source='$(var.CargoTargetDir)\wix\gtk4\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader-svg.dll' />
<Component Id='gdk_pixbuf_loaders' Guid='9784a105-19c9-407c-ab12-28ff80683c51'>
<File Id='libpixbufloader_svg.dll' Name='libpixbufloader_svg.dll' DiskId='1' Source='$(var.CargoTargetDir)\wix\gtk4\lib\gdk-pixbuf-2.0\2.10.0\loaders\libpixbufloader_svg.dll' />
</Component>
</Directory>

Expand Down

0 comments on commit 33e2c48

Please sign in to comment.