updated infrastructure #181
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-24.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-24.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: 'GCC 13', preset: gcc-13, pkgs: 'gcc-13 g++-13 lib32gcc-13-dev gcc-multilib'}, | |
{name: 'GCC 14', preset: gcc-14, pkgs: 'gcc-14 g++-14 lib32gcc-14-dev gcc-multilib'}, | |
{name: 'Clang 15', preset: clang-15, pkgs: 'clang-15 llvm-15'}, | |
{name: 'Clang 16', preset: clang-16, pkgs: 'clang-16 llvm-16'}, | |
{name: 'Clang 17', preset: clang-17, pkgs: 'clang-17 llvm-17'}, | |
{name: 'Clang 18', preset: clang-18, pkgs: 'clang-18 llvm-18'}, | |
{name: 'Clang 19', preset: clang-19, pkgs: 'clang-19 llvm-19'} | |
] | |
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.cxx }}-${{ 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-24.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.cxx }}-${{ 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-24.04] | |
buildtype: [debug] | |
compiler: [{name: 'Clang 17', preset: clang-17, pkgs: 'clang-17 llvm-17 llvm-17-dev libclang-17-dev', iwyu_branch: 'clang_17', path_prefix: "/usr/lib/llvm-17"}] | |
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.cxx }}-${{ 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=${{ matrix.cxx }} | |
- 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 }}, 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-24.04] | |
buildtype: [debug, release] | |
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.cxx }}-${{ 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/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz" && \ | |
echo 95c011cee430e64dd6087c75c800f04b9c49832cc1000127a92a97f9c8d83af4 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 }} -DCXX_STANDARD=${{ matrix.cxx }} | |
- 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-24.04] | |
buildtype: [debug] | |
compiler: [ {name: 'Clang 17', preset: clang-17, pkgs: 'clang-17 llvm-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.cxx }}-${{ 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-24.04] | |
buildtype: [debug] | |
compiler: [ {name: 'Clang 15', preset: clang-15-qt, pkgs: 'clang-15 llvm-15 llvm-15-dev llvm-15-linker-tools llvm-15-tools llvm-15-runtime'} ] | |
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.cxx }}-${{ 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 remove clang* llvm* | |
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" | |
sudo apt update | |
sudo apt install clang ninja-build build-essential 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 }} |