ci: CI scripts updated to use Conan configuration properties

This commit is contained in:
Mateusz Pusz
2022-08-02 17:17:51 +02:00
parent aab2a20505
commit 8a35dcc73f
3 changed files with 53 additions and 53 deletions

View File

@@ -236,7 +236,7 @@ jobs:
- name: Create Conan package - name: Create Conan package
shell: bash shell: bash
run: | 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 - name: Upload mp-units Conan package
if: github.ref == 'refs/heads/master' || env.CHANNEL == 'stable' if: github.ref == 'refs/heads/master' || env.CHANNEL == 'stable'
shell: bash shell: bash

View File

@@ -14,13 +14,13 @@ name: "CodeQL"
on: on:
push: push:
branches: [ master ] branches: [master]
paths-ignore: paths-ignore:
- 'docs/**' - "docs/**"
pull_request: pull_request:
branches: [ master ] branches: [master]
paths-ignore: paths-ignore:
- 'docs/**' - "docs/**"
jobs: jobs:
analyze: analyze:
@@ -33,7 +33,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
language: [ 'cpp', 'python' ] language: ["cpp", "python"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more... # Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
@@ -44,7 +44,7 @@ jobs:
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v1 uses: github/codeql-action/init@v2
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
if: matrix.language != 'cpp' if: matrix.language != 'cpp'
uses: github/codeql-action/autobuild@v1 uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell. # Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl # 📚 https://git.io/JvXDl
@@ -77,7 +77,7 @@ jobs:
if: matrix.language == 'cpp' if: matrix.language == 'cpp'
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: '3.8' python-version: "3.8"
- name: Conan build - name: Conan build
if: matrix.language == 'cpp' if: matrix.language == 'cpp'
run: | run: |
@@ -85,7 +85,7 @@ jobs:
conan config init conan config init
conan remote add upload https://mpusz.jfrog.io/artifactory/api/conan/conan-oss conan remote add upload https://mpusz.jfrog.io/artifactory/api/conan/conan-oss
mkdir _lgtm_build_dir && cd _lgtm_build_dir 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 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 .. conan build ..
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1 uses: github/codeql-action/analyze@v1

View File

@@ -78,7 +78,7 @@ jobs:
conan remote add -i 0 upload https://mpusz.jfrog.io/artifactory/api/conan/conan-oss conan remote add -i 0 upload https://mpusz.jfrog.io/artifactory/api/conan/conan-oss
- name: Install Conan dependencies - name: Install Conan dependencies
run: | 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 - name: Configure CMake
run: | run: |
cmake --preset default cmake --preset default