@@ -45,41 +45,67 @@ jobs:
4545 path : dist/*
4646
4747 build-windows :
48- runs-on : ubuntu-24.04
48+ runs-on : ${{ matrix.runner }}
49+ strategy :
50+ matrix :
51+ include :
52+ - target : x86_64-pc-windows-gnu
53+ arch : x86_64
54+ runner : ubuntu-24.04
55+ - target : i686-pc-windows-gnu
56+ arch : x86
57+ runner : ubuntu-24.04
58+ - target : aarch64-pc-windows-msvc
59+ arch : arm64
60+ runner : windows-11-arm
4961 steps :
5062 - uses : actions/checkout@v4
5163 - uses : dtolnay/rust-toolchain@stable
5264 with :
53- targets : x86_64-pc-windows-gnu
65+ targets : ${{ matrix.target }}
5466
55- - name : Install mingw-w64
67+ - name : Install mingw-w64 (x86_64/x86)
68+ if : matrix.arch == 'x86_64' || matrix.arch == 'x86'
5669 run : |
5770 sudo apt-get update
5871 sudo apt-get install -y mingw-w64
5972
60- - name : Build binaries (cross-compile)
73+ - name : Build binaries (Linux cross-compile)
74+ if : matrix.arch != 'arm64'
6175 run : |
62- cargo build --bins --workspace --release --target x86_64-pc-windows-gnu
76+ cargo build --bins --workspace --release --target ${{ matrix.target }}
6377 mkdir -p dist
64- cp target/x86_64-pc-windows-gnu/release/plumeimpactor.exe dist/Impactor-windows-x86_64-portable.exe
65- cp target/x86_64-pc-windows-gnu/release/plumesign.exe dist/plumesign-windows-x86_64.exe
78+ cp target/${{ matrix.target }}/release/plumeimpactor.exe dist/Impactor-windows-${{ matrix.arch }}-portable.exe
79+ cp target/${{ matrix.target }}/release/plumesign.exe dist/plumesign-windows-${{ matrix.arch }}.exe
80+
81+ - name : Build binaries (Windows ARM64 native)
82+ if : matrix.arch == 'arm64'
83+ shell : pwsh
84+ run : |
85+ cargo build --bins --workspace --release --target ${{ matrix.target }}
86+ New-Item -ItemType Directory -Force -Path dist
87+ Copy-Item "target/${{ matrix.target }}/release/plumeimpactor.exe" "dist/Impactor-windows-${{ matrix.arch }}-portable.exe"
88+ Copy-Item "target/${{ matrix.target }}/release/plumesign.exe" "dist/plumesign-windows-${{ matrix.arch }}.exe"
6689
6790 - name : Upload Bundles
6891 uses : actions/upload-artifact@v4
6992 with :
70- name : ${{ env.BINARY_NAME }}-windows
93+ name : ${{ env.BINARY_NAME }}-windows-${{ matrix.arch }}
7194 path : dist/*.exe
7295
7396 build-windows-installer :
7497 runs-on : windows-latest
7598 needs : [build-windows]
99+ strategy :
100+ matrix :
101+ arch : [x86_64, x86, arm64]
76102 steps :
77103 - uses : actions/checkout@v4
78104
79105 - name : Download Windows Artifacts
80106 uses : actions/download-artifact@v4
81107 with :
82- name : ${{ env.BINARY_NAME }}-windows
108+ name : ${{ env.BINARY_NAME }}-windows-${{ matrix.arch }}
83109 path : dist
84110
85111 - name : Install NSIS
@@ -89,15 +115,15 @@ jobs:
89115 run : |
90116 mkdir dist\nsis
91117 copy package\windows\* dist\nsis\
92- copy dist\Impactor-windows-x86_64 -portable.exe dist\nsis\plumeimpactor.exe
118+ copy dist\Impactor-windows-${{ matrix.arch }} -portable.exe dist\nsis\plumeimpactor.exe
93119 makensis dist\nsis\installer.nsi
94- move dist\nsis\installer.exe dist\Impactor-windows-x86_64 -setup.exe
120+ move dist\nsis\installer.exe dist\Impactor-windows-${{ matrix.arch }} -setup.exe
95121
96122 - name : Upload Installer
97123 uses : actions/upload-artifact@v4
98124 with :
99- name : ${{ env.BINARY_NAME }}-windows-installer
100- path : dist/Impactor-windows-x86_64 -setup.exe
125+ name : ${{ env.BINARY_NAME }}-windows-installer-${{ matrix.arch }}
126+ path : dist/Impactor-windows-${{ matrix.arch }} -setup.exe
101127
102128 build-macos-slices :
103129 runs-on : ubuntu-24.04
0 commit comments