5858 name : axidev-corrige-darwin-${{ matrix.arch }}
5959 path : axidev-corrige-darwin-${{ matrix.arch }}
6060
61-
6261 build-linux :
6362 name : Build Linux
6463 runs-on : ${{ matrix.runs-on }}
@@ -143,7 +142,6 @@ jobs:
143142 name : axidev-corrige-linux-${{ matrix.arch }}
144143 path : axidev-corrige-linux-${{ matrix.arch }}
145144
146-
147145 build-windows :
148146 name : Build Windows
149147 runs-on : windows-latest
@@ -152,6 +150,8 @@ jobs:
152150 include :
153151 - arch : amd64
154152 goarch : amd64
153+ - arch : arm64
154+ goarch : arm64
155155 steps :
156156 - name : Checkout code
157157 uses : actions/checkout@v4
@@ -171,13 +171,29 @@ jobs:
171171 echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
172172 fi
173173
174- - name : Build binary with MinGW
174+ - name : Set up LLVM-MinGW
175+ shell : bash
176+ run : |
177+ VERSION="20240619"
178+ URL="https://github.com/mstorsjo/llvm-mingw/releases/download/${VERSION}/llvm-mingw-${VERSION}-ucrt-x86_64.zip"
179+ curl -L -o llvm-mingw.zip "$URL"
180+ 7z x llvm-mingw.zip -y > /dev/null
181+ echo "${{ github.workspace }}/llvm-mingw-${VERSION}-ucrt-x86_64/bin" >> $GITHUB_PATH
182+
183+ if [ "${{ matrix.arch }}" = "arm64" ]; then
184+ echo "CC=aarch64-w64-mingw32-clang" >> $GITHUB_ENV
185+ echo "CXX=aarch64-w64-mingw32-clang++" >> $GITHUB_ENV
186+ else
187+ echo "CC=x86_64-w64-mingw32-clang" >> $GITHUB_ENV
188+ echo "CXX=x86_64-w64-mingw32-clang++" >> $GITHUB_ENV
189+ fi
190+
191+ - name : Build binary with LLVM-MinGW
175192 shell : bash
176193 env :
177194 CGO_ENABLED : 1
178195 GOOS : windows
179196 GOARCH : ${{ matrix.goarch }}
180- CC : gcc
181197 run : |
182198 go build -o axidev-corrige-windows-${{ matrix.arch }}.exe .
183199
@@ -223,6 +239,12 @@ jobs:
223239 name : axidev-corrige-windows-amd64
224240 path : ./artifacts
225241
242+ - name : Download windows-arm64 artifact
243+ uses : actions/download-artifact@v4
244+ with :
245+ name : axidev-corrige-windows-arm64
246+ path : ./artifacts
247+
226248 - name : Upload darwin-amd64 to release
227249 uses : actions/upload-release-asset@v1
228250 env :
@@ -272,3 +294,13 @@ jobs:
272294 asset_path : ./artifacts/axidev-corrige-windows-amd64.exe
273295 asset_name : axidev-corrige-windows-amd64.exe
274296 asset_content_type : application/octet-stream
297+
298+ - name : Upload windows-arm64 to release
299+ uses : actions/upload-release-asset@v1
300+ env :
301+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
302+ with :
303+ upload_url : ${{ github.event.release.upload_url }}
304+ asset_path : ./artifacts/axidev-corrige-windows-arm64.exe
305+ asset_name : axidev-corrige-windows-arm64.exe
306+ asset_content_type : application/octet-stream
0 commit comments