Skip to content

Fix vcpkg use

Fix vcpkg use #1098

Workflow file for this run

name: C/C++ CI
on: [push]
jobs:
build-on-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- name: Create Build Dir
run: cmake -E make_directory ${{github.workspace}}/build
- name: Use Conan
run: |
pip install conan && conan profile detect
echo "[requires]" > ${{github.workspace}}/conanfile.txt
echo boost/1.84.0 >> ${{github.workspace}}/conanfile.txt
echo leveldb/1.23 >> ${{github.workspace}}/conanfile.txt
echo "[generators]" >> ${{github.workspace}}/conanfile.txt
echo CMakeDeps >> ${{github.workspace}}/conanfile.txt
echo CMakeToolchain >> ${{github.workspace}}/conanfile.txt
- name: Configure
working-directory: ${{github.workspace}}/build
env:
CC: cl
run: cmake ${{github.workspace}} -DOPENMIND_USE_CONAN=OFF -DOPENMIND_BUILD_SAMPLES=OFF -DOPENMIND_BUILD_TESTS=ON -G "Ninja Multi-Config" -D CMAKE_C_COMPILER="cl.exe" -D CMAKE_CXX_COMPILER="cl.exe" -Dleveldb_TAG:STRING="1.23" -DOPENMIND_MATH_USE_LEVELDB_CACHE=OFF -DOPENMIND_STORAGE_LEVELDB=OFF
- name: Install prerequisites with conan
working-directory: ${{github.workspace}}/build
run: cmake --build ${{github.workspace}}/build --target Install__Conan --config Release
- name: Reconfigure to detect newly installed prerequisites
working-directory: ${{github.workspace}}/build
run: cmake . -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/conan_toolchain.cmake
- name: Install prerequisites
working-directory: ${{github.workspace}}/build
run: cmake --build ${{github.workspace}}/build --target prerequisites --config Release
- name: Reconfigure to detect newly installed prerequisites
working-directory: ${{github.workspace}}/build
run: cmake .
- name: Build Debug
working-directory: ${{github.workspace}}/build
run: cmake --build ${{github.workspace}}/build --config Debug
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: make check Debug
working-directory: ${{github.workspace}}/build
run: ctest --timeout 240 -C Debug -j ${{steps.cpu-cores.outputs.count}} -E "image_codec_test|ts|Polyfit_test" --output-on-failure
# --rerun-failed --output-on-failure
- name: Build Release
working-directory: ${{github.workspace}}/build
run: cmake --build ${{github.workspace}}/build --config Release
- name: make check Release
working-directory: ${{github.workspace}}/build
run: ctest --timeout 240 -C Release -j ${{steps.cpu-cores.outputs.count}} -E "image_codec_test|ts|Polyfit_test" --output-on-failure
# --rerun-failed --output-on-failure