changed caching key names #172
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake | |
on: [push, pull_request] | |
env: | |
# Conan cache environment variables | |
CONAN_SYSREQUIRES_MODE: enabled | |
CONAN_USER_HOME: "~/.conan2" | |
jobs: | |
docker: | |
name: Test docker images | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build docker-ci image | |
shell: bash | |
run: cd docker && ./build-ci-image.sh | |
- name: Build docker-dev image | |
shell: bash | |
run: cd docker && ./build-dev-image.sh | |
- name: Build .devcontainer docker image | |
shell: bash | |
run: cd .devcontainer && DOCKER_BUILDKIT=1 docker build -t devcontainer:latest . | |
linux: | |
name: ${{ matrix.os }}, ${{ matrix.compiler.name }}, C++${{ matrix.cxx }}, ${{ matrix.buildtype }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix entry fails. | |
matrix: | |
os: [ubuntu-22.04] | |
buildtype: [debug] | |
compiler: [ {name: 'GCC 10', preset: gcc-10, pkgs: 'gcc-10 g++-10 lib32gcc-10-dev gcc-multilib'}, | |
{name: 'GCC 11', preset: gcc-11, pkgs: 'gcc-11 g++-11 lib32gcc-11-dev gcc-multilib'}, | |
{name: 'GCC 12', preset: gcc-12, pkgs: 'gcc-12 g++-12 lib32gcc-12-dev gcc-multilib'}, | |
{name: 'Clang 15', preset: clang-15, pkgs: 'clang-15 llvm-15'} | |
] | |
cxx: [17, 20] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-conan-modules | |
with: | |
path: | | |
${{ env.CONAN_USER_HOME }} | |
~/.cache/pip | |
~/.ccache | |
key: ${{ runner.os }}-${{ matrix.compiler.preset }}-${{ matrix.buildtype }}-${{ hashFiles('conanfile.py') }} | |
- name: Install conan | |
shell: bash | |
run: | | |
python3 -m pip install --upgrade pip setuptools conan | |
source ~/.profile | |
- name: Install dependencies | |
run: | | |
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" | |
sudo apt update | |
sudo apt install ninja-build ${{ matrix.compiler.pkgs }} ccache | |
shell: bash | |
- name: Configure via CMake | |
shell: bash | |
run: cmake --preset unixlike-${{ matrix.compiler.preset }}-${{ matrix.buildtype }} -DCXX_STANDARD=${{ matrix.cxx }} | |
- name: Build | |
shell: bash | |
run: cmake --build --preset build-unixlike-${{ matrix.compiler.preset }}-${{ matrix.buildtype }} | |
- name: Test | |
shell: bash | |
run: ctest --preset test-unixlike-${{ matrix.compiler.preset }}-${{ matrix.buildtype }} | |
# because of an bug in github actions: https://github.com/actions/runner-images/issues/8659 | |
# we use clang 12, clang 13, clang 14 only in C++17 mode | |
linux-clang-smaller-15: | |
name: ${{ matrix.os }}, ${{ matrix.compiler.name }}, C++${{ matrix.cxx }}, ${{ matrix.buildtype }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix entry fails. | |
matrix: | |
os: [ubuntu-22.04] | |
buildtype: [debug] | |
compiler: [ {name: 'Clang 12', preset: clang-12, pkgs: 'clang-12 llvm-12'}, | |
{name: 'Clang 13', preset: clang-13, pkgs: 'clang-13 llvm-13'}, | |
{name: 'Clang 14', preset: clang-14, pkgs: 'clang-14 llvm-14'} | |
] | |
cxx: [17] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-conan-modules | |
with: | |
path: | | |
${{ env.CONAN_USER_HOME }} | |
~/.cache/pip | |
~/.ccache | |
key: ${{ runner.os }}-${{ matrix.compiler.preset }}-${{ matrix.buildtype }}-${{ hashFiles('conanfile.py') }} | |
- name: Install conan | |
shell: bash | |
run: | | |
python3 -m pip install --upgrade pip setuptools conan | |
source ~/.profile | |
- name: Install dependencies | |
run: | | |
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" | |
sudo apt update | |
sudo apt install ninja-build ${{ matrix.compiler.pkgs }} ccache | |
shell: bash | |
- name: Configure via CMake | |
shell: bash | |
run: cmake --preset unixlike-${{ matrix.compiler.preset }}-${{ matrix.buildtype }} -DCXX_STANDARD=${{ matrix.cxx }} | |
- name: Build | |
shell: bash | |
run: cmake --build --preset build-unixlike-${{ matrix.compiler.preset }}-${{ matrix.buildtype }} | |
- name: Test | |
shell: bash | |
run: ctest --preset test-unixlike-${{ matrix.compiler.preset }}-${{ matrix.buildtype }} | |
linux-static_analysis: | |
name: Static Analysis, ${{ matrix.os }}, ${{ matrix.compiler.name }}, ${{ matrix.buildtype }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix entry fails. | |
matrix: | |
os: [ubuntu-22.04] | |
buildtype: [debug] | |
compiler: [{name: 'Clang 15', preset: clang-15, pkgs: 'clang-15 llvm-15 llvm-15-dev libclang-15-dev', iwyu_branch: 'clang_15', path_prefix: "/usr/lib/llvm-15"}] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-conan-modules | |
with: | |
path: | | |
${{ env.CONAN_USER_HOME }} | |
~/.cache/pip | |
~/.ccache | |
key: ${{ runner.os }}-${{ matrix.compiler.preset }}-${{ matrix.buildtype }}-${{ hashFiles('conanfile.py') }} | |
- name: Install conan | |
shell: bash | |
run: | | |
python3 -m pip install --upgrade pip setuptools conan | |
source ~/.profile | |
- name: Install dependencies | |
run: | | |
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" | |
sudo apt update | |
sudo apt install ninja-build ${{ matrix.compiler.pkgs }} cppcheck ccache | |
shell: bash | |
- name: Compile and install IWYU | |
run: | | |
mkdir iwyu && cd iwyu | |
git clone https://github.com/include-what-you-use/include-what-you-use.git | |
cd include-what-you-use | |
git checkout ${{ matrix.compiler.iwyu_branch }} | |
cd .. | |
mkdir build && cd build | |
cmake -G "Ninja" -DCMAKE_PREFIX_PATH=${{ matrix.compiler.path_prefix }} ../include-what-you-use | |
ninja | |
sudo ninja install | |
shell: bash | |
- name: Configure via CMake | |
shell: bash | |
run: cmake --preset unixlike-${{ matrix.compiler.preset }}-${{ matrix.buildtype }}-static-analysis -DCXX_STANDARD=17 | |
- name: Build | |
shell: bash | |
run: cmake --build --preset build-unixlike-${{ matrix.compiler.preset }}-${{ matrix.buildtype }}-static-analysis | |
linux-cross-compiling-armv7: | |
name: ARM GCC, ${{ matrix.os }}, ${{ matrix.buildtype }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix entry fails. | |
matrix: | |
os: [ubuntu-22.04] | |
buildtype: [debug, release] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-conan-modules | |
with: | |
path: | | |
${{ env.CONAN_USER_HOME }} | |
~/.cache/pip | |
~/.ccache | |
key: ${{ runner.os }}-${{ matrix.compiler.preset }}-${{ matrix.buildtype }}-${{ hashFiles('conanfile.py') }} | |
- name: Install conan | |
shell: bash | |
run: | | |
python3 -m pip install --upgrade pip setuptools conan | |
source ~/.profile | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install ninja-build wget ccache | |
shell: bash | |
- name: Install GCC ARM | |
run: | | |
wget -O archive.tar.xz "https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz?rev=7bd049b7a3034e64885fa1a71c12f91d&hash=732D909FA8F68C0E1D0D17D08E057619" && \ | |
echo 84be93d0f9e96a15addd490b6e237f588c641c8afdf90e7610a628007fc96867 archive.tar.xz > /tmp/archive.sha256 && sha256sum -c /tmp/archive.sha256 && rm /tmp/archive.sha256 && \ | |
tar xf archive.tar.xz -C /opt | |
shell: bash | |
- name: Configure via CMake | |
shell: bash | |
run: cmake --preset gcc-arm-${{ matrix.buildtype }} | |
- name: Build | |
shell: bash | |
run: cmake --build --preset build-gcc-arm-${{ matrix.buildtype }} | |
linux-fuzzing: | |
name: ${{ matrix.os }}, ${{ matrix.compiler.name }}, libFuzzer, ${{ matrix.buildtype }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix entry fails. | |
matrix: | |
os: [ubuntu-22.04] | |
buildtype: [debug] | |
compiler: [ {name: 'Clang 15', preset: clang-15, pkgs: 'clang-15 llvm-15'} ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-conan-modules | |
with: | |
path: | | |
${{ env.CONAN_USER_HOME }} | |
~/.cache/pip | |
~/.ccache | |
key: ${{ runner.os }}-${{ matrix.compiler.preset }}-${{ matrix.buildtype }}-${{ hashFiles('conanfile.py') }} | |
- name: Install conan | |
shell: bash | |
run: | | |
python3 -m pip install --upgrade pip setuptools conan | |
source ~/.profile | |
- name: Install dependencies | |
run: | | |
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" | |
sudo apt update | |
sudo apt install ninja-build ${{ matrix.compiler.pkgs }} ccache | |
shell: bash | |
- name: Configure via CMake | |
shell: bash | |
run: cmake --preset unixlike-${{ matrix.compiler.preset }}-${{ matrix.buildtype }} | |
- name: Build | |
shell: bash | |
run: cmake --build --preset build-unixlike-${{ matrix.compiler.preset }}-${{ matrix.buildtype }} | |
linux-qt: | |
name: ${{ matrix.os }}, QT ${{ matrix.compiler.name }}, C++${{ matrix.cxx }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false # 'false' means Don't stop matrix workflows even if some matrix entry fails. | |
matrix: | |
os: [ubuntu-22.04] | |
buildtype: [debug] | |
compiler: [ {name: 'Clang 15', preset: clang-15-qt, pkgs: 'clang-15 llvm-15'} ] | |
cxx: [20] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-conan-modules | |
with: | |
path: | | |
${{ env.CONAN_USER_HOME }} | |
~/.cache/pip | |
~/.ccache | |
key: ${{ runner.os }}-${{ matrix.compiler.preset }}-${{ matrix.buildtype }}-${{ hashFiles('conanfile.py') }} | |
- name: Install conan | |
shell: bash | |
run: | | |
python3 -m pip install --upgrade pip setuptools conan | |
source ~/.profile | |
- name: Install dependencies | |
run: | | |
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" | |
sudo apt update | |
sudo apt install ninja-build ccache ${{ matrix.compiler.pkgs }} libx11-xcb-dev libfontenc-dev libice-dev \ | |
libsm-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxext-dev libxfixes-dev libxi-dev \ | |
libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev \ | |
libxss-dev libxt-dev libxtst-dev libxv-dev libxxf86vm-dev libxcb-render0-dev libxcb-render-util0-dev \ | |
libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev \ | |
libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-dri3-dev uuid-dev libxcb-cursor-dev \ | |
libxcb-util-dev libxcb-util0-dev libx11-xcb1 libx11-dev libgl-dev libgl1-mesa-dev libxcb-glx0-dev \ | |
libxcb-dri2-0-dev libxcb-present-dev libxcb-composite0-dev libxcb-ewmh-dev libxcb-res0-dev | |
shell: bash | |
- name: Configure via CMake | |
shell: bash | |
run: cmake --preset ${{ matrix.compiler.preset }} -DCXX_STANDARD=${{ matrix.cxx }} | |
- name: Build | |
shell: bash | |
run: cmake --build --preset build-${{ matrix.compiler.preset }} | |
- name: Test | |
shell: bash | |
run: ctest --preset test-${{ matrix.compiler.preset }} |