Skip to content

Fixed Dev Container for Ubuntu Lunar #67

Fixed Dev Container for Ubuntu Lunar

Fixed Dev Container for Ubuntu Lunar #67

Workflow file for this run

name: CMake
on: [push, pull_request]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
# Conan cache environment variables
CONAN_SYSREQUIRES_MODE: enabled
CONAN_USER_HOME: "${{ github.workspace }}/conan-cache"
CONAN_USER_HOME_SHORT: "${{ github.workspace }}/conan-cache/short"
jobs:
docker:
name: Test docker images
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- 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 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'},
{name: 'Clang 15', preset: clang-15, pkgs: 'clang-15 llvm-15'}
]
cxx: [17, 20]
steps:
- uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
env:
cache-name: cache-conan-modules
with:
path: |
${{ env.CONAN_USER_HOME }}
~/.cache/pip
key: ${{ runner.os }}-${{ env.BUILD_TYPE }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('cmake/Conan.cmake') }}
- 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 }}
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@v3
- name: Cache
uses: actions/cache@v3
env:
cache-name: cache-conan-modules
with:
path: |
${{ env.CONAN_USER_HOME }}
~/.cache/pip
key: ${{ runner.os }}-${{ env.BUILD_TYPE }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('cmake/Conan.cmake') }}
- 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
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
- 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@v3
- name: Cache
uses: actions/cache@v3
env:
cache-name: cache-conan-modules
with:
path: |
${{ env.CONAN_USER_HOME }}
~/.cache/pip
key: ${{ runner.os }}-${{ env.BUILD_TYPE }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('cmake/Conan.cmake') }}
- 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
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 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'},
{name: 'Clang 15', preset: clang-15, pkgs: 'clang-15 llvm-15'}
]
steps:
- uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v3
env:
cache-name: cache-conan-modules
with:
path: |
${{ env.CONAN_USER_HOME }}
~/.cache/pip
key: ${{ runner.os }}-${{ env.BUILD_TYPE }}-${{ hashFiles('CMakeLists.txt') }}-${{ hashFiles('cmake/Conan.cmake') }}
- 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 }}
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 }}