1717
1818jobs :
1919 build-windows :
20- runs-on : windows-latest
20+ strategy :
21+ fail-fast : false
22+ matrix :
23+ include :
24+ - runner : windows-latest
25+ triplet : x64-windows
26+ cmake_arch : x64
27+ build_dir : WRelease
28+ - runner : windows-11-arm
29+ triplet : arm64-windows
30+ cmake_arch : ARM64
31+ build_dir : WRelease-arm64
32+
33+ runs-on : ${{ matrix.runner }}
2134
2235 steps :
2336 - name : Checkout repository
@@ -50,30 +63,32 @@ jobs:
5063 ${{ github.workspace }}/vcpkg/installed
5164 ${{ github.workspace }}/vcpkg/buildtrees
5265 ${{ github.workspace }}/vcpkg/downloads
53- key : vcpkg-win-${{ runner.os }}-${{ hashFiles('src/vcpkg.json') }}
66+ key : vcpkg-win-${{ matrix. runner }}-${{ matrix.triplet }}-${{ hashFiles('src/vcpkg.json') }}
5467 restore-keys : |
55- vcpkg-win-${{ runner.os }}-
68+ vcpkg-win-${{ matrix. runner }}-${{ matrix.triplet }}-
5669
5770 - name : Install vcpkg dependencies (manifest)
5871 run : |
59- .\vcpkg\vcpkg.exe install --x-manifest-root="${{ github.workspace }}\src" --triplet=x64-windows
72+ .\vcpkg\vcpkg.exe install --x-manifest-root="${{ github.workspace }}\src" --triplet=${{ matrix.triplet }}
6073 working-directory : ${{ github.workspace }}
6174
6275 - name : Configure CMake (Release)
6376 run : |
6477 # github.workspace expands with backslashes on Windows; normalize to forward slashes for CMake
6578 $ws = "${{ github.workspace }}" -replace '\\', '/'
6679 $vcpkgRoot = "$ws/vcpkg"
67- $triplet = "x64-windows"
80+ $triplet = "${{ matrix.triplet }}"
81+ $buildDir = "${{ matrix.build_dir }}"
6882 # vcpkg toolchain (manifest mode) installs to build/vcpkg_installed/<triplet>; OpenCL.dll is there
69- $kronos = "$ws/build/WRelease /vcpkg_installed/$triplet"
83+ $kronos = "$ws/build/$buildDir /vcpkg_installed/$triplet"
7084 $src = "$ws/src"
71- $build = "$ws/build/WRelease "
85+ $build = "$ws/build/$buildDir "
7286 New-Item -ItemType Directory -Force -Path $build
87+ # Pass triplet as literal so vcpkg subprocess does not re-interpret $triplet
7388 cmake -B $build -S $src `
74- -G "Visual Studio 17 2022" -A x64 `
89+ -G "Visual Studio 17 2022" -A ${{ matrix.cmake_arch }} `
7590 -DCMAKE_TOOLCHAIN_FILE="$vcpkgRoot/scripts/buildsystems/vcpkg.cmake" `
76- -DVCPKG_TARGET_TRIPLET=x64-windows `
91+ -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} `
7792 -DKHRONOS="$kronos" `
7893 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
7994 -DMSVC_PARALLEL_JOBS=4
@@ -82,21 +97,21 @@ jobs:
8297 - name : Build (Release)
8398 run : |
8499 $ws = "${{ github.workspace }}" -replace '\\', '/'
85- $build = "$ws/build/WRelease "
100+ $build = "$ws/build/${{ matrix.build_dir }} "
86101 cmake --build $build --config Release --verbose
87102 shell : pwsh
88103
89104 - name : Install (staging)
90105 run : |
91106 $ws = "${{ github.workspace }}" -replace '\\', '/'
92- $build = "$ws/build/WRelease "
93- $prefix = "$ws/ build/WRelease /xilinx/xrt"
107+ $build = "$ws/build/${{ matrix.build_dir }} "
108+ $prefix = "$build/xilinx/xrt"
94109 cmake --install $build --config Release --prefix $prefix --verbose
95110 shell : pwsh
96111
97112 - name : Upload build artifacts
98113 uses : actions/upload-artifact@v4
99114 with :
100- name : xrt-windows-Release
101- path : ${{ github.workspace }}/build/WRelease /xilinx/xrt
115+ name : xrt-windows-${{ matrix.triplet }}- Release
116+ path : ${{ github.workspace }}/build/${{ matrix.build_dir }} /xilinx/xrt
102117 retention-days : 7
0 commit comments