@@ -102,6 +102,10 @@ jobs:
102102 runs-on : windows-latest
103103 permissions :
104104 contents : read
105+ strategy :
106+ fail-fast : false
107+ matrix :
108+ backend : [OPENCL, EIGEN]
105109
106110 steps :
107111 - name : Checkout code
@@ -116,19 +120,28 @@ jobs:
116120 path : |
117121 ${{ env.VCPKG_INSTALLATION_ROOT }}/installed
118122 ${{ env.VCPKG_INSTALLATION_ROOT }}/packages
119- key : ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }}-opencl
123+ key : ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }}-${{ matrix.backend }}
120124 restore-keys : |
121125 ${{ runner.os }}-vcpkg-
122126
123127 - name : Install vcpkg dependencies
124128 run : |
125- vcpkg install zlib:x64-windows libzip:x64-windows opencl:x64-windows
129+ if ("${{ matrix.backend }}" -eq "OPENCL") {
130+ vcpkg install zlib:x64-windows libzip:x64-windows opencl:x64-windows
131+ } else {
132+ vcpkg install zlib:x64-windows libzip:x64-windows eigen3:x64-windows
133+ }
126134
127135 - name : Configure CMake
128136 working-directory : cpp
129137 run : |
138+ $eigenInclude = ""
139+ if ("${{ matrix.backend }}" -eq "EIGEN") {
140+ $eigenInclude = "-DEIGEN3_INCLUDE_DIRS=$env:VCPKG_INSTALLATION_ROOT/packages/eigen3_x64-windows/include/eigen3"
141+ }
130142 cmake . -G "Visual Studio 17 2022" -A x64 `
131- -DUSE_BACKEND=OPENCL `
143+ -DUSE_BACKEND=${{ matrix.backend }} `
144+ $eigenInclude `
132145 -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
133146
134147 - name : Build
@@ -151,7 +164,7 @@ jobs:
151164 if : github.event_name == 'push' && github.ref == 'refs/heads/master'
152165 uses : actions/upload-artifact@v4
153166 with :
154- name : katago-windows-opencl
167+ name : katago-windows-${{ matrix.backend }}
155168 path : |
156169 cpp/Release/*.exe
157170 cpp/Release/*.dll
0 commit comments