Skip to content

[CTS] Don't segfault when failing to load a kernel #1910

[CTS] Don't segfault when failing to load a kernel

[CTS] Don't segfault when failing to load a kernel #1910

Workflow file for this run

name: Coverage
on: [push, pull_request]
permissions:
contents: read
jobs:
ubuntu-build:
name: Build - Ubuntu
strategy:
matrix:
os: ['ubuntu-22.04']
build_type: [Debug]
compiler: [{c: gcc, cxx: g++}]
libbacktrace: ['-DVAL_USE_LIBBACKTRACE_BACKTRACE=ON']
pool_tracking: ['-DUMF_ENABLE_POOL_TRACKING=ON']
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install apt packages
run: |
sudo apt-get update
sudo apt-get install -y doxygen ${{matrix.compiler.c}}
- name: Install pip packages
run: pip install -r third_party/requirements.txt
- name: Install libbacktrace
if: matrix.libbacktrace == '-DVAL_USE_LIBBACKTRACE_BACKTRACE=ON'
run: |
git clone https://github.com/ianlancetaylor/libbacktrace.git
cd libbacktrace
./configure
make
sudo make install
cd ..
- name: Download DPC++
run: |
sudo apt install libncurses5
wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/sycl-nightly%2F20230626/dpcpp-compiler.tar.gz
tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz
- name: Configure CMake
run: >
cmake
-B${{github.workspace}}/build
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
-DUR_ENABLE_TRACING=ON
-DUR_DEVELOPER_MODE=ON
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
-DUR_BUILD_TESTS=ON
-DUR_FORMAT_CPP_STYLE=ON
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
-DCMAKE_CXX_FLAGS="--coverage -fkeep-inline-functions -fkeep-static-functions"
-DCMAKE_EXE_LINKER_FLAGS="--coverage"
-DCMAKE_SHARED_LINKER_FLAGS="--coverage"
${{matrix.libbacktrace}}
${{matrix.pool_tracking}}
- name: Build
run: cmake --build ${{github.workspace}}/build -j $(nproc)
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.build_type}} --output-on-failure -L "umf|loader|validation|tracing|unit|urtrace"
- name: Quick Coverage Info
working-directory: ${{github.workspace}}/build
run: ctest -T Coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4.0.1
with:
fail_ci_if_error: true