diff --git a/.github/workflows/all.yml b/.github/workflows/all.yml index 19f00998..391da05a 100644 --- a/.github/workflows/all.yml +++ b/.github/workflows/all.yml @@ -228,6 +228,8 @@ jobs: # TODO: Switch back to macos-latest once https://github.com/actions/python-versions/pull/114 is fixed os: - 'ubuntu-latest' + # TODO: Fix failing CMake build on windows: + # `cl : command line error D8016: '/O2' and '/RTC1' command-line options are incompatible [D:\a\voyager\voyager\cpp\test\test.vcxproj]` - windows-latest - macos-12 name: Test C++ on ${{ matrix.os }} @@ -237,9 +239,35 @@ jobs: submodules: recursive - name: Install Linux dependencies if: runner.os == 'Linux' - run: sudo apt-get update && sudo apt-get install -y pkg-config - - name: Build voyager locally - run: make test + run: sudo apt-get update && sudo apt-get install -y pkg-config + - name: Install CMake + run: sudo apt-get install -y cmake + + - name: Configure CMake + run: cmake -S . -B build + + - name: Build with CMake + run: cmake --build build + + - name: Run Tests (if any) + run: ctest --test-dir build + # - name: Run CMake (Linux & MacOS) + # if: runner.os != 'Windows' + # uses: threeal/cmake-action@v2.0.0 + # with: + # source-dir: cpp + # build-dir: cpp + # - name: Run CMake (Windows) + # if: runner.os == 'Windows' + # uses: threeal/cmake-action@v2.0.0 + # with: + # source-dir: cpp + # build-dir: cpp + # cxx-flags: /Od # Disable optimization (since it breaks CMake on Windows) + # - name: Build C++ + # run: make test + # - name: Run tests + # run: ./test/test build-python-wheels: needs: [run-python-tests, run-python-tests-with-address-sanitizer] diff --git a/cpp/test/test_main.cpp b/cpp/test/test_main.cpp index f9cc4e6c..69cfd39b 100644 --- a/cpp/test/test_main.cpp +++ b/cpp/test/test_main.cpp @@ -41,7 +41,7 @@ TEST_CASE("Test combinations of different instantiations and sizes") { testCombination(index, spaceType, numDimensions, storageType); } else if (storageType == StorageDataType::E4M3) { auto index = TypedIndex(spaceType, numDimensions); - testCombination(index, spaceType, 20, storageType); + testCombination(index, spaceType, numDimensions, storageType); } } }