diff --git a/.github/actions/setup_conan/action.yml b/.github/actions/setup_conan/action.yml index 12d8557..81fa9ec 100644 --- a/.github/actions/setup_conan/action.yml +++ b/.github/actions/setup_conan/action.yml @@ -89,11 +89,6 @@ runs: run: | conan remove '*/system' -c - - name: Install conan packages - shell: bash - run: | - conan install . ${{ steps.output.outputs.args }} -b missing - - name: Clean 30 days unused conan caches shell: bash run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08d0d97..b10c62e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,13 +133,12 @@ jobs: compiler_version: ${{ steps.parsed.outputs.compiler_version }} build_type: ${{ matrix.build_type }} - - name: Configure cmake + - name: Configure, build and test + shell: bash run: | - cmake --preset ${{ steps.parsed.outputs.compiler_name }} ${{ steps.parsed.outputs.compiler_name == 'msvc' && '-A x64 -T v143' || '' }} -D ENABLE_DEVELOPER_MODE:BOOL=${{ matrix.developer_mode }} -D OPT_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }} - - - name: Build and test - run: | - conan build . ${{ steps.conan.outputs.args }} + conan build . ${{ steps.conan.outputs.args }} -b missing \ + -c "tools.cmake.cmaketoolchain:extra_variables*={'ENABLE_DEVELOPER_MODE': {'value': '${{ matrix.developer_mode }}', 'cache': True, 'type': 'BOOL', 'docstring': 'Set up defaults for a developer of the project, and let developer change options'}}" \ + -c "tools.cmake.cmaketoolchain:extra_variables*={'OPT_ENABLE_COVERAGE' : {'value': '${{ matrix.build_type == 'Debug' }}', 'cache': True, 'type': 'BOOL', 'docstring': 'Analyze and report on coverage'}}" - name: Unix - Coverage if: runner.os != 'Windows' && matrix.build_type == 'Debug' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d28591c..66a65fd 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -69,7 +69,6 @@ jobs: uses: ./.github/actions/setup_cache with: key: ${{ steps.parsed.outputs.os_name }}-${{ steps.parsed.outputs.os_version }}-${{ steps.parsed.outputs.compiler_name }}-${{ steps.parsed.outputs.compiler_version }}-${{ matrix.build_type }}-${{ matrix.developer_mode }} - restore_key: ${{ steps.parsed.outputs.os_name }}-${{ steps.parsed.outputs.os_version }}-${{ steps.parsed.outputs.compiler_name }}-${{ steps.parsed.outputs.compiler_version }}-${{ matrix.build_type }} - name: Setup Cpp uses: aminya/setup-cpp@v0.37.0 @@ -102,15 +101,20 @@ jobs: # Learnt from https://github.com/igraph/igraph/issues/1181 args: -c tools.build:cflags+=-static-libasan -c tools.build:cxxflags+=-static-libasan - - name: Configure cmake - run: | - cmake --preset ${{ steps.parsed.outputs.compiler_name }} ${{ steps.parsed.outputs.compiler_name == 'msvc' && '-A x64 -T v143' || '' }} -D ENABLE_DEVELOPER_MODE:BOOL=${{ matrix.developer_mode }} -D OPT_ENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }} -D OPT_ENABLE_CLANG_TIDY:BOOL=OFF -D OPT_ENABLE_CPPCHECK:BOOL=OFF -D OPT_ENABLE_INCLUDE_WHAT_YOU_USE:BOOL=OFF - - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: cpp + - name: Configure, build and test + shell: bash + run: | + conan build . ${{ steps.conan.outputs.args }} -b missing \ + -c "tools.cmake.cmaketoolchain:extra_variables*={'ENABLE_DEVELOPER_MODE' : {'value': '${{ matrix.developer_mode }}', 'cache': True, 'type': 'BOOL', 'docstring': 'Set up defaults for a developer of the project, and let developer change options'}}" \ + -c "tools.cmake.cmaketoolchain:extra_variables*={'OPT_ENABLE_CLANG_TIDY' : {'value': 'OFF', 'cache': True, 'type': 'BOOL', 'docstring': 'Enable clang-tidy analysis during compilation'}}" \ + -c "tools.cmake.cmaketoolchain:extra_variables*={'OPT_ENABLE_CPPCHECK' : {'value': 'OFF', 'cache': True, 'type': 'BOOL', 'docstring': 'Enable cppcheck analysis during compilation'}}" \ + -c "tools.cmake.cmaketoolchain:extra_variables*={'OPT_ENABLE_INCLUDE_WHAT_YOU_USE': {'value': 'OFF', 'cache': True, 'type': 'BOOL', 'docstring': 'Enable include-what-you-use analysis during compilation'}}" + - name: Build and test run: | conan build . ${{ steps.conan.outputs.args }}