From db3bd0a32ef16d5bf9f047887242a9f94310425b Mon Sep 17 00:00:00 2001 From: Cedric Nugteren Date: Thu, 18 May 2023 16:58:31 +0200 Subject: Add Windows builds to Github Actions and fix Windows compilation issue (#470) * Add Windows builds to Github Actions CI * Fix failing Windows builds --- .github/workflows/build_and_test.yml | 30 +++++++++++++++++++++++++++++- test/correctness/testblas.hpp | 9 --------- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 59487fd8..2d74ed24 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -7,7 +7,7 @@ on: jobs: - build_and_test: + build_and_test_linux_and_macos: strategy: matrix: config: [ @@ -57,3 +57,31 @@ jobs: - name: Run the unittests run: ctest --test-dir build if: ${{ matrix.config.os == 'macos-latest' }} + + build_windows: + + strategy: + matrix: + config: [ + {os: windows-2019, arch: x64}, + ] + + runs-on: ${{ matrix.config.os }} + + steps: + - uses: actions/checkout@v3 + + - name: Set up MSVC + uses: ilammy/msvc-dev-cmd@v1 + + - name: Install OpenBLAS + run: vcpkg.exe --triplet=${{ matrix.config.arch }}-windows install openblas + + - name: Install OpenCL + run: vcpkg.exe --triplet=${{ matrix.config.arch }}-windows install opencl + + - name: Run CMake + run: cmake -S . -B build -DTESTS=ON -DCLIENTS=ON -DSAMPLES=ON -DOPENCL_ROOT=C:/vcpkg/packages/opencl_x64-windows -DCBLAS_ROOT=C:/vcpkg/packages/openblas_x64-windows + + - name: Compile the code + run: cmake --build build diff --git a/test/correctness/testblas.hpp b/test/correctness/testblas.hpp index bfefadc5..b2dc6e7a 100644 --- a/test/correctness/testblas.hpp +++ b/test/correctness/testblas.hpp @@ -157,15 +157,6 @@ template const std::vector TestBlas::kTr template const std::vector TestBlas::kSides = {Side::kLeft, Side::kRight}; template const std::vector TestBlas::kDiagonals = {Diagonal::kUnit, Diagonal::kNonUnit}; -// The transpose configurations to test with: template parameter dependent, see .cpp file for implementation -template <> const std::vector TestBlas::kTransposes; -template <> const std::vector TestBlas::kTransposes; -template <> const std::vector TestBlas::kTransposes; -template <> const std::vector TestBlas::kTransposes; -template <> const std::vector TestBlas::kTransposes; -template <> const std::vector TestBlas::kTransposes; -template <> const std::vector TestBlas::kTransposes; - // ================================================================================================= // Bogus reference function, in case a comparison library is not available -- cgit v1.2.3