Skip to content

Added logging strace settings #26

Added logging strace settings

Added logging strace settings #26

Workflow file for this run

name: Dobby Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
# For CI, build all optional plugins. Newly developed plugins should be added to this list
optional_plugins: "-DPLUGIN_TESTPLUGIN=ON -DPLUGIN_GPU=ON -DPLUGIN_LOCALTIME=ON -DPLUGIN_RTSCHEDULING=ON -DPLUGIN_HTTPPROXY=ON -DPLUGIN_APPSERVICES=ON -DPLUGIN_IONMEMORY=ON -DPLUGIN_DEVICEMAPPER=ON -DPLUGIN_OOMCRASH=ON"
strategy:
fail-fast: false
matrix:
compiler: [ gcc, clang ]
coverage: [ with-coverage, without-coverage ]
exclude:
- compiler: clang
coverage: with-coverage
- compiler: clang
coverage: without-coverage
- compiler: gcc
coverage: without-coverage
# The matrix will try all possible combinations of the below arrays
# If adding a new cmake option, include both the ON and OFF version to ensure the
# matrix runs both versions
build_type: ["Release", "Debug"]
extra_flags: ["-DLEGACY_COMPONENTS=ON", "-DLEGACY_COMPONENTS=OFF", "-DUSE_SYSTEMD=ON", "-DUSE_SYSTEMD=OFF"]
name: Build in ${{ matrix.build_type }} Mode (${{ matrix.extra_flags }})
steps:
- name: checkout
uses: actions/checkout@v3
- name: install-dependencies
run: |
sudo apt-get update -y -q
sudo apt-get install -q -y automake libtool autotools-dev software-properties-common build-essential cmake libsystemd-dev libctemplate-dev libjsoncpp-dev libdbus-1-dev libnl-3-dev libnl-route-3-dev libsystemd-dev libyajl-dev libcap-dev libboost-dev libgtest-dev lcov clang
- name: Set clang toolchain
if: ${{ matrix.compiler == 'clang' }}
run: echo "TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/unit_tests/L1_testing/clang.cmake" >> $GITHUB_ENV
- name: Set gcc/with-coverage toolchain
if: ${{ matrix.compiler == 'gcc' && matrix.coverage == 'with-coverage' }}
run: echo "TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/unit_tests/L1_testing/gcc-with-coverage.cmake" >> $GITHUB_ENV
- name: build dobby
run: |
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE="${{ env.TOOLCHAIN_FILE }}" -DRDK_PLATFORM=DEV_VM -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_DOBBYL1TEST=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.extra_flags }} ${{ env.optional_plugins }} ..
make -j $(nproc)
- name: run unit-tests
run: |
sudo $GITHUB_WORKSPACE/build/unit_tests/L1_testing/DobbyL1Test
- name: Generate coverage
if: ${{ matrix.coverage == 'with-coverage'}}
run: >
lcov -c
-o coverage.info
-d $GITHUB_WORKSPACE
&&
lcov
-r coverage.info
'11/*'
'/usr/include/*'
'*/unit_tests/L1_testing/tests/*'
-o filtered_coverage.info
&&
genhtml
-o coverage
-t "dobby coverage"
filtered_coverage.info
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
coverage
if-no-files-found: warn