diff --git a/.github/workflows/ci-conan.yml b/.github/workflows/ci-conan.yml index 0b11c977..2da635ce 100644 --- a/.github/workflows/ci-conan.yml +++ b/.github/workflows/ci-conan.yml @@ -236,7 +236,7 @@ jobs: - name: Create Conan package shell: bash run: | - conan create . mpusz/testing -e mp-units:CONAN_RUN_TESTS=True -o mp-units:build_docs=False -o mp-units:downcast_mode=${{ matrix.downcast_mode }} -b mp-units -b outdated -u + conan create . mpusz/testing -o mp-units:downcast_mode=${{ matrix.downcast_mode }} -c user.build:all=True -c user.build:skip_docs=True -b mp-units -b outdated -u - name: Upload mp-units Conan package if: github.ref == 'refs/heads/master' || env.CHANNEL == 'stable' shell: bash diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 931eadf4..092c1deb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,13 +14,13 @@ name: "CodeQL" on: push: - branches: [ master ] + branches: [master] paths-ignore: - - 'docs/**' + - "docs/**" pull_request: - branches: [ master ] + branches: [master] paths-ignore: - - 'docs/**' + - "docs/**" jobs: analyze: @@ -33,59 +33,59 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'cpp', 'python' ] + language: ["cpp", "python"] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # Learn more... # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v2 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - if: matrix.language != 'cpp' - uses: github/codeql-action/autobuild@v1 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + if: matrix.language != 'cpp' + uses: github/codeql-action/autobuild@v2 - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - - name: Cache Conan data - if: matrix.language == 'cpp' - uses: actions/cache@v2 - env: - cache-name: cache-conan-data - with: - path: ~/.conan/data - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/metadata.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - name: Set up Python - if: matrix.language == 'cpp' - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - name: Conan build - if: matrix.language == 'cpp' - run: | - pip install -U conan - conan config init - conan remote add upload https://mpusz.jfrog.io/artifactory/api/conan/conan-oss - mkdir _lgtm_build_dir && cd _lgtm_build_dir - conan install .. -s compiler.cppstd=20 -s compiler.libcxx=libstdc++11 -o mp-units:build_docs=False -e mp-units:CONAN_RUN_TESTS=True -b outdated -u - conan build .. - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + - name: Cache Conan data + if: matrix.language == 'cpp' + uses: actions/cache@v2 + env: + cache-name: cache-conan-data + with: + path: ~/.conan/data + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/metadata.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Set up Python + if: matrix.language == 'cpp' + uses: actions/setup-python@v2 + with: + python-version: "3.8" + - name: Conan build + if: matrix.language == 'cpp' + run: | + pip install -U conan + conan config init + conan remote add upload https://mpusz.jfrog.io/artifactory/api/conan/conan-oss + mkdir _lgtm_build_dir && cd _lgtm_build_dir + conan install .. -s compiler.cppstd=20 -s compiler.libcxx=libstdc++11 -c mp-units:user.build:all=True -c user.build:skip_docs=True -b outdated -u + conan build .. + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index f72ecf86..0655eae8 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -78,7 +78,7 @@ jobs: conan remote add -i 0 upload https://mpusz.jfrog.io/artifactory/api/conan/conan-oss - name: Install Conan dependencies run: | - conan install . -s compiler.cppstd=20 -s compiler.libcxx=libstdc++11 -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" -e mp-units:CONAN_RUN_TESTS=True -b outdated -u + conan install . -s compiler.cppstd=20 -s compiler.libcxx=libstdc++11 -c user.build:all=True -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" -b outdated -u - name: Configure CMake run: | cmake --preset default