@@ -1417,8 +1417,8 @@ jobs:
14171417 echo "version=${VERSION}" >> $GITHUB_OUTPUT
14181418 echo "build_number=${BUILD_NUMBER}" >> $GITHUB_OUTPUT
14191419
1420- # Flutter only publishes x64 Windows SDK binaries; use it via x64 emulation
1421- # and cross-compile to ARM64 with --target-platform windows-arm64 .
1420+ # Flutter only publishes x64 Windows SDK binaries; architecture: x64 forces
1421+ # the action to fetch the x64 SDK which runs via emulation on the ARM64 host .
14221422 - uses : subosito/flutter-action@v2
14231423 with :
14241424 flutter-version : ' 3.38.1'
@@ -1441,6 +1441,13 @@ jobs:
14411441 run : flutter doctor -v
14421442
14431443 - name : Configure app
1444+ env :
1445+ # configure_stack_wallet.sh calls build_standalone_mwebd_windows.dart
1446+ # without --fetch by default, which tries to build mwebd.exe from source
1447+ # via WSL + CGO. On ARM64 the WSL host is ARM64 but the x64 MinGW
1448+ # assembler can't compile Go's gcc_arm64.S. Fetch the pre-built x64
1449+ # binary instead — it runs fine as a subprocess under x64 emulation.
1450+ MWEBD_FETCH : ' 1'
14441451 run : |
14451452 cd scripts
14461453 echo "yes" | ./build_app.sh \
@@ -1524,16 +1531,23 @@ jobs:
15241531 run : echo "$CHANGE_NOW" | base64 --decode > lib/external_api_keys.dart
15251532
15261533 # coinlib's windows/CMakeLists.txt builds secp256k1 via cmake ExternalProject
1527- # during flutter build windows, targeting windows-arm64.
1528- # dart run coinlib:build_windows is skipped because it hardcodes -A x64.
1534+ # during flutter build windows. dart run coinlib:build_windows is skipped
1535+ # because it hardcodes -A x64.
15291536
15301537 - name : Build
1531- run : flutter build windows --target-platform windows-arm64 -- release
1538+ run : flutter build windows --release
15321539
15331540 - name : Package
15341541 shell : pwsh
15351542 run : |
1536- Compress-Archive -Path "build/windows/arm64/runner/Release/*" `
1543+ # Flutter outputs to arm64/ when it detects native ARM64, x64/ otherwise
1544+ # (x64 SDK via emulation on ARM64 runner may report either arch).
1545+ $releaseDir = if (Test-Path "build/windows/arm64/runner/Release") {
1546+ "build/windows/arm64/runner/Release"
1547+ } else {
1548+ "build/windows/x64/runner/Release"
1549+ }
1550+ Compress-Archive -Path "$releaseDir/*" `
15371551 -DestinationPath "stack_wallet-windows-arm64-${{ steps.ver.outputs.version }}.zip"
15381552
15391553 - uses : actions/upload-artifact@v7
@@ -1569,8 +1583,8 @@ jobs:
15691583 echo "version=${VERSION}" >> $GITHUB_OUTPUT
15701584 echo "build_number=${BUILD_NUMBER}" >> $GITHUB_OUTPUT
15711585
1572- # Flutter only publishes x64 Windows SDK binaries; use it via x64 emulation
1573- # and cross-compile to ARM64 with --target-platform windows-arm64 .
1586+ # Flutter only publishes x64 Windows SDK binaries; architecture: x64 forces
1587+ # the action to fetch the x64 SDK which runs via emulation on the ARM64 host .
15741588 - uses : subosito/flutter-action@v2
15751589 with :
15761590 flutter-version : ' 3.38.1'
@@ -1614,16 +1628,21 @@ jobs:
16141628 run : echo "$CHANGE_NOW" | base64 --decode > lib/external_api_keys.dart
16151629
16161630 # coinlib's windows/CMakeLists.txt builds secp256k1 via cmake ExternalProject
1617- # during flutter build windows, targeting windows-arm64.
1618- # dart run coinlib:build_windows is skipped because it hardcodes -A x64.
1631+ # during flutter build windows. dart run coinlib:build_windows is skipped
1632+ # because it hardcodes -A x64.
16191633
16201634 - name : Build
1621- run : flutter build windows --target-platform windows-arm64 -- release
1635+ run : flutter build windows --release
16221636
16231637 - name : Package
16241638 shell : pwsh
16251639 run : |
1626- Compress-Archive -Path "build/windows/arm64/runner/Release/*" `
1640+ $releaseDir = if (Test-Path "build/windows/arm64/runner/Release") {
1641+ "build/windows/arm64/runner/Release"
1642+ } else {
1643+ "build/windows/x64/runner/Release"
1644+ }
1645+ Compress-Archive -Path "$releaseDir/*" `
16271646 -DestinationPath "campfire-windows-arm64-${{ steps.ver.outputs.version }}.zip"
16281647
16291648 - uses : actions/upload-artifact@v7
@@ -1659,8 +1678,8 @@ jobs:
16591678 echo "version=${VERSION}" >> $GITHUB_OUTPUT
16601679 echo "build_number=${BUILD_NUMBER}" >> $GITHUB_OUTPUT
16611680
1662- # Flutter only publishes x64 Windows SDK binaries; use it via x64 emulation
1663- # and cross-compile to ARM64 with --target-platform windows-arm64 .
1681+ # Flutter only publishes x64 Windows SDK binaries; architecture: x64 forces
1682+ # the action to fetch the x64 SDK which runs via emulation on the ARM64 host .
16641683 - uses : subosito/flutter-action@v2
16651684 with :
16661685 flutter-version : ' 3.38.1'
@@ -1719,16 +1738,21 @@ jobs:
17191738 run : echo "$CHANGE_NOW" | base64 --decode > lib/external_api_keys.dart
17201739
17211740 # coinlib's windows/CMakeLists.txt builds secp256k1 via cmake ExternalProject
1722- # during flutter build windows, targeting windows-arm64.
1723- # dart run coinlib:build_windows is skipped because it hardcodes -A x64.
1741+ # during flutter build windows. dart run coinlib:build_windows is skipped
1742+ # because it hardcodes -A x64.
17241743
17251744 - name : Build
1726- run : flutter build windows --target-platform windows-arm64 -- release
1745+ run : flutter build windows --release
17271746
17281747 - name : Package
17291748 shell : pwsh
17301749 run : |
1731- Compress-Archive -Path "build/windows/arm64/runner/Release/*" `
1750+ $releaseDir = if (Test-Path "build/windows/arm64/runner/Release") {
1751+ "build/windows/arm64/runner/Release"
1752+ } else {
1753+ "build/windows/x64/runner/Release"
1754+ }
1755+ Compress-Archive -Path "$releaseDir/*" `
17321756 -DestinationPath "stack_duo-windows-arm64-${{ steps.ver.outputs.version }}.zip"
17331757
17341758 - uses : actions/upload-artifact@v7
0 commit comments