Skip to content

Commit fb27d36

Browse files
committed
ci: fix mwebd sha256 backslash, use find for arm64 dll paths, add MWEBD_FETCH to x86_64 job
1 parent b1a7fdc commit fb27d36

2 files changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/build.yaml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ jobs:
252252
run: flutter doctor -v
253253

254254
- name: Configure app
255+
env:
256+
MWEBD_FETCH: '1'
255257
run: |
256258
cd scripts
257259
echo "yes" | ./build_app.sh \
@@ -1491,26 +1493,31 @@ jobs:
14911493
cd crypto_plugins/flutter_libepiccash/rust
14921494
cargo +1.89.0 build --target aarch64-pc-windows-msvc --release --lib
14931495
mkdir -p ../scripts/windows/build
1494-
cp target/aarch64-pc-windows-msvc/release/epic_cash_wallet.dll \
1495-
../scripts/windows/build/libepic_cash_wallet.dll
1496+
# Cargo may output to target/release/ instead of target/<triple>/release/
1497+
# when --target matches the native host. Search both locations.
1498+
DLL="$(find target -name 'epic_cash_wallet.dll' -path '*/release/*' | head -1)"
1499+
[ -n "$DLL" ] || { echo "epic_cash_wallet.dll not found"; exit 1; }
1500+
cp "$DLL" ../scripts/windows/build/libepic_cash_wallet.dll
14961501
14971502
- name: Build flutter_libmwc for Windows ARM64
14981503
run: |
14991504
set -euo pipefail
15001505
cd crypto_plugins/flutter_libmwc/rust
15011506
cargo +1.85.1 build --target aarch64-pc-windows-msvc --release --lib
15021507
mkdir -p ../scripts/windows/build
1503-
cp target/aarch64-pc-windows-msvc/release/mwc_wallet.dll \
1504-
../scripts/windows/build/libmwc_wallet.dll
1508+
DLL="$(find target -name 'mwc_wallet.dll' -path '*/release/*' | head -1)"
1509+
[ -n "$DLL" ] || { echo "mwc_wallet.dll not found"; exit 1; }
1510+
cp "$DLL" ../scripts/windows/build/libmwc_wallet.dll
15051511
15061512
- name: Build frostdart for Windows ARM64
15071513
run: |
15081514
set -euo pipefail
15091515
cd crypto_plugins/frostdart/src/serai/hrf
15101516
cargo +1.89.0 build --target aarch64-pc-windows-msvc --release --lib
15111517
mkdir -p ../../../scripts/windows/build
1512-
cp target/aarch64-pc-windows-msvc/release/hrf_api.dll \
1513-
../../../scripts/windows/build/frostdart.dll
1518+
DLL="$(find target -name 'hrf_api.dll' -path '*/release/*' | head -1)"
1519+
[ -n "$DLL" ] || { echo "hrf_api.dll not found"; exit 1; }
1520+
cp "$DLL" ../../../scripts/windows/build/frostdart.dll
15141521
15151522
- name: Create git_versions.dart stubs
15161523
run: |
@@ -1729,8 +1736,9 @@ jobs:
17291736
cd crypto_plugins/frostdart/src/serai/hrf
17301737
cargo +1.89.0 build --target aarch64-pc-windows-msvc --release --lib
17311738
mkdir -p ../../../scripts/windows/build
1732-
cp target/aarch64-pc-windows-msvc/release/hrf_api.dll \
1733-
../../../scripts/windows/build/frostdart.dll
1739+
DLL="$(find target -name 'hrf_api.dll' -path '*/release/*' | head -1)"
1740+
[ -n "$DLL" ] || { echo "hrf_api.dll not found"; exit 1; }
1741+
cp "$DLL" ../../../scripts/windows/build/frostdart.dll
17341742
17351743
- name: Decode secrets
17361744
env:

tool/build_standalone_mwebd_windows.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ Future<void> _fetchPrebuilt(Directory projectToolDir) async {
5050
final expected = (await File(
5151
shaPath,
5252
).readAsString()).trim().split(RegExp(r"\s+")).first;
53+
// sha256sum adds a leading '\' to the hash when the filename contains
54+
// backslashes. Strip it before comparing.
5355
final actual = (await Process.run("sha256sum", [
5456
exePath,
55-
], runInShell: true)).stdout.toString().trim().split(RegExp(r"\s+")).first;
57+
], runInShell: true)).stdout.toString().trim().split(RegExp(r"\s+")).first.replaceFirst(r'\', '');
5658
if (expected.toLowerCase() != actual.toLowerCase()) {
5759
stderr.writeln(
5860
"mwebd.exe sha256 mismatch: expected $expected, got $actual",

0 commit comments

Comments
 (0)