Merge pull request #416 from Twon/buildinfo_in_cachekey

Update missed workflows to use new Conan cache key
This commit is contained in:
Mateusz Pusz
2023-01-06 14:31:30 +01:00
committed by GitHub
3 changed files with 32 additions and 18 deletions

View File

@@ -187,11 +187,13 @@ jobs:
cache-name: cache-conan-data cache-name: cache-conan-data
with: with:
path: ~/.conan/data path: ~/.conan/data
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/metadata.json') }} key: build-${{ matrix.config.os }}-${{ matrix.build_type }}-${{ matrix.config.compiler.type }}-${{ matrix.config.compiler.version }}-${{ matrix.config.lib }}
restore-keys: | restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}- build-${{ matrix.config.os }}-${{ matrix.build_type }}-${{ matrix.config.compiler.type }}-${{ matrix.config.compiler.version }}-${{ matrix.config.lib }}
${{ runner.os }}-build- build-${{ matrix.config.os }}-${{ matrix.build_type }}-${{ matrix.config.compiler.type }}-${{ matrix.config.compiler.version }}-
${{ runner.os }}- build-${{ matrix.config.os }}-${{ matrix.build_type }}-${{ matrix.config.compiler.type }}-
build-${{ matrix.config.os }}-${{ matrix.build_type }}-
build-${{ matrix.config.os }}-
- name: Install gcc-11 - name: Install gcc-11
if: matrix.config.compiler.type == 'GCC' && matrix.config.compiler.version == '11' if: matrix.config.compiler.type == 'GCC' && matrix.config.compiler.version == '11'
shell: bash shell: bash

View File

@@ -25,11 +25,15 @@ on:
jobs: jobs:
analyze: analyze:
name: Analyze name: Analyze
runs-on: ubuntu-22.04 runs-on: ${{ env.OS }}
env: env:
CC: gcc-10 CC: gcc-10
CXX: g++-10 CXX: g++-10
OS: ubuntu-22.04
BUILD_TYPE: Debug
COMPILER_TYPE: GCC
COMPILER_VERSION: 10
STDLIB: libstdc++11
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -68,11 +72,13 @@ jobs:
cache-name: cache-conan-data cache-name: cache-conan-data
with: with:
path: ~/.conan/data path: ~/.conan/data
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/metadata.json') }} key: build-${{ env.OS }}-${{ env.BUILD_TYPE }}-${{ env.COMPILER_TYPE }}-${{ env.COMPILER_VERSION }}-${{ env.STDLIB }}
restore-keys: | restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}- build-${{ env.OS }}-${{ env.BUILD_TYPE }}-${{ env.COMPILER_TYPE }}-${{ env.COMPILER_VERSION }}-${{ env.STDLIB }}
${{ runner.os }}-build- build-${{ env.OS }}-${{ env.BUILD_TYPE }}-${{ env.COMPILER_TYPE }}-${{ env.COMPILER_VERSION }}-
${{ runner.os }}- build-${{ env.OS }}-${{ env.BUILD_TYPE }}-${{ env.COMPILER_TYPE }}-
build-${{ env.OS }}-${{ env.BUILD_TYPE }}-
build-${{ env.OS }}-
- name: Set up Python - name: Set up Python
if: matrix.language == 'cpp' if: matrix.language == 'cpp'
uses: actions/setup-python@v4 uses: actions/setup-python@v4
@@ -85,7 +91,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 -c user.build:all=True -c user.build:skip_docs=True -b outdated -u conan install .. -s compiler.cppstd=20 -s compiler.libcxx=${{ env.STDLIB }} -c 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

@@ -41,11 +41,15 @@ env:
CXX: g++-10 CXX: g++-10
CMAKE_GENERATOR: Ninja CMAKE_GENERATOR: Ninja
CONAN_CMAKE_GENERATOR: Ninja CONAN_CMAKE_GENERATOR: Ninja
OS: ubuntu-22.04
BUILD_TYPE: Debug
COMPILER_TYPE: GCC
COMPILER_VERSION: 10
STDLIB: libstdc++11
jobs: jobs:
docs: docs:
name: Generate documentation name: Generate documentation
runs-on: ubuntu-22.04 runs-on: ${{ env.OS }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Cache Conan data - name: Cache Conan data
@@ -54,11 +58,13 @@ jobs:
cache-name: cache-conan-data cache-name: cache-conan-data
with: with:
path: ~/.conan/data path: ~/.conan/data
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/metadata.json') }} key: build-${{ env.OS }}-${{ env.BUILD_TYPE }}-${{ env.COMPILER_TYPE }}-${{ env.COMPILER_VERSION }}-${{ env.STDLIB }}
restore-keys: | restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}- build-${{ env.OS }}-${{ env.BUILD_TYPE }}-${{ env.COMPILER_TYPE }}-${{ env.COMPILER_VERSION }}-${{ env.STDLIB }}
${{ runner.os }}-build- build-${{ env.OS }}-${{ env.BUILD_TYPE }}-${{ env.COMPILER_TYPE }}-${{ env.COMPILER_VERSION }}-
${{ runner.os }}- build-${{ env.OS }}-${{ env.BUILD_TYPE }}-${{ env.COMPILER_TYPE }}-
build-${{ env.OS }}-${{ env.BUILD_TYPE }}-
build-${{ env.OS }}-
- name: Install Ninja - name: Install Ninja
run: | run: |
sudo apt install -y ninja-build sudo apt install -y ninja-build
@@ -78,7 +84,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 user.build:all=True -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" -b outdated -u conan install . -s compiler.cppstd=20 -s compiler.libcxx=${{ env.STDLIB }} -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