Skip to content

Move devcontainer to ubuntu:22 #1

Move devcontainer to ubuntu:22

Move devcontainer to ubuntu:22 #1

Workflow file for this run

name: CI
on:
push:
pull_request:
release:
types: [published]
jobs:
ci:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
name:
[ubuntu-gcc-10, ubuntu-clang-12, macos-appleclang-12, windows-msvc-19, windows-clang]
include:
- name: ubuntu-gcc-10
os: ubuntu-20.04
compiler: g++-10
configurePreset: ci-ninja-debug
- name: ubuntu-clang-12
os: ubuntu-20.04
compiler: clang++-12
configurePreset: ci-ninja-debug
- name: macos-appleclang-12
os: macos-10.15
configurePreset: ci-ninja-debug
- name: windows-msvc-19
os: windows-2019
configurePreset: ci-msvc-19
buildPreset: ci-msvc-debug
testPreset: ci-unit-tests-debug
- name: windows-clang
os: windows-2019
configurePreset: ci-ninja-windows-debug
steps:
- uses: actions/checkout@v1
- name: install-python-3
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: install-python-deps
run: |
python3 -m pip install --upgrade pip
pip3 install pytest pytest-depends conan cpplint
- name: set-compiler-env
run: |
if [ "${{ matrix.compiler }}" != "" ]; then
echo "CXX=${{ matrix.compiler }}" >> $GITHUB_ENV
fi
cmake --version
shell: bash
- name: dependecies (macos)
if: runner.os == 'macOS'
# macOS is using libreSSL which clashes with openssl which means that the package is extracted but
# not installed properly in the system. Because of this cmake needs to be pointed to the correct place
run: |
brew update
brew extract --version=1.2021.13 plantuml homebrew/cask
brew install [email protected] [email protected] ninja clang-format llvm
brew install --cask doxygen
ln -s "/usr/local/opt/llvm/bin/clang-tidy" "/usr/local/bin/clang-tidy"
echo "OPENSSL_ROOT_DIR=/usr/local/opt/[email protected]/" >> $GITHUB_ENV
- name: dependencies (windows)
if: runner.os == 'Windows'
run: |
choco install -y --limit-output openssl plantuml ninja opencppcoverage
choco install -y --limit-output doxygen.install --version="1.9.2"
- name: dependencies (debian-like)
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'debian')
run: |
sudo apt -y update
sudo apt -y install doxygen plantuml gcovr ninja-build cppcheck clang-tidy iwyu ccache
- name: correct-tmp-dir (win)
if: runner.os == 'Windows'
run: |
echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
echo "TMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
shell: pwsh
- name: cmake-configure
run: |
cmake --preset=${{ matrix.configurePreset }}
- name: build
run: |
if [ "${{ matrix.buildPreset }}" == "" ]; then
cmake --build ./build
else
cmake --build --preset=${{ matrix.buildPreset }}
fi
shell: bash
- name: ctest
run: |
if [ "${{ matrix.testPreset }}" == "" ]; then
ctest --test-dir build
else
ctest --preset=${{ matrix.testPreset }}
fi
shell: bash
- name: pytest
run: python3 -m pytest -x -v