diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb2240be..0d9d447d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -199,26 +199,11 @@ jobs: if: ${{ runner.os == 'macOS' }} run: | brew install glfw - -# - name: Remove existing GCC and G++ -# if: ${{ runner.os == 'Linux' }} -# run: | -# sudo apt-get update -# sudo apt-get remove --purge -y gcc g++ -# sudo apt-get autoremove -y - name: Setup Linux if: ${{ runner.os == 'Linux' }} run: | sudo apt install -y libglfw3-dev libglfw3 - -# - name: Setup Linux -# if: ${{ runner.os == 'Linux' }} -# run: | -# sudo apt-get update -# sudo apt install -y gcc-11 g++-11 libglfw3-dev libglfw3 -# sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11.4.0 11 -# sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11.4.0 11 - name: Setup Windows if: ${{ runner.os == 'Windows' }} @@ -227,10 +212,15 @@ jobs: choco install ninja choco install visualstudio2019buildtools --package-parameters "--includeRecommended --includeOptional" choco install visualstudio2019-workload-vctools - $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" - & $vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | ForEach-Object { - & "$_\VC\Auxiliary\Build\vcvars64.bat" } + choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64" + - name: Configure MSVC environment + if: ${{ runner.os == 'Windows' }} + shell: cmd + run: | + "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat" + set + - name: Cleanup Conan system packages (they are not properly cached) run: | conan remove -f '*/system/*' || true @@ -250,15 +240,15 @@ jobs: conan profile detect --force echo 'settings.compiler.cppstd=17' >> ~/.conan/profiles/default - - name: Create custom conan profile for Windows + - name: Create Conan profile for Windows if: ${{ runner.os == 'Windows' }} run: | - mkdir -p ~/.conan/profiles - conan profile detect --force - sed -i 's/compiler.cppstd=[0-9]*/compiler.cppstd=17/' ~/.conan2/profiles/default - sed -i 's/compiler.version=[0-9]*/compiler.version=193/' ~/.conan2/profiles/default - sed -i 's/compiler.runtime=[a-zA-Z]*/compiler.runtime=dynamic/' ~/.conan2/profiles/default - + conan profile new default --detect + conan profile update settings.compiler=Visual Studio default + conan profile update settings.compiler.version=16 default + conan profile update settings.compiler.toolset=v142 default + conan profile update settings.compiler.runtime=MD default + - name: Installing conan dependencies run: | conan install . --build=missing -s build_type=${{matrix.build_type}} -s compiler.cppstd=17 @@ -266,13 +256,6 @@ jobs: - name: Configure CMake run: | cmake -S . -B ./build -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DCMAKE_TOOLCHAIN_FILE="build/${{matrix.build_type}}/generators/conan_toolchain.cmake" -DENABLE_MAIN=TRUE -DENABLE_TESTING=TRUE -DENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }} -DENABLE_DOXYGEN=OFF -DLOG_LEVEL:STRING=${{matrix.log-level}} -DWARNINGS_AS_ERRORS:BOOL=${{ !contains(matrix.os, 'windows' )}} -DENABLE_CPPCHECK=OFF -DENABLE_CLANG_TIDY=OFF -DENABLE_INCLUDE_WHAT_YOU_USE=OFF - - - name: Check GCC version - if: ${{ runner.os != 'Windows' }} - run: | - gcc --version - g++ --version - gcov --version - name: Build run: | @@ -283,14 +266,6 @@ jobs: run: | ctest -C ${{matrix.build_type}} --output-on-failure --timeout 180 -# - name: Coverage -# if: ${{ runner.os != 'Windows' && matrix.build_type == 'Debug' }} -# run: | -# pip install gcovr==7.2 -# mkdir -p build/coverage -# find ./build -name "*.gcno" -o -name "*.gcda" > /dev/null -# gcovr --config doc/coverage/gcovr.cfg --gcov-executable '${{ matrix.gcov_executable }}' --merge-mode-functions=merge-use-line-0 - - name: Coverage if: ${{ runner.os != 'Windows' && matrix.build_type == 'Debug' }} run: |