Skip to content

release: Bump version to 1.0.2 with build system and header improvements #27

release: Bump version to 1.0.2 with build system and header improvements

release: Bump version to 1.0.2 with build system and header improvements #27

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags-ignore: ['**']
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
- 'NOTICE'
pull_request:
branches: [main]
paths-ignore:
- '**.md'
- 'docs/**'
- 'LICENSE'
- 'NOTICE'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
- run: yarn install --immutable
- run: yarn lint
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mymindstorm/setup-emsdk@v14
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
- name: Cache CMake dependencies
uses: actions/cache@v4
with:
path: build/_deps
key: ${{ runner.os }}-cmake-deps-${{ hashFiles('CMakeLists.txt', 'tests/CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-cmake-deps-
- name: Cache ccache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ${{ runner.os }}-ccache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-ccache-
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
build-essential \
libeigen3-dev \
lcov \
ccache
- name: Setup ccache
run: |
ccache --set-config=max_size=500M
ccache --zero-stats
- name: Configure CMake with coverage
env:
CC: ccache gcc
CXX: ccache g++
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TESTING=ON \
-DENABLE_COVERAGE=ON
- name: Build
run: cmake --build build --parallel
- name: Show ccache statistics
run: ccache --show-stats
- name: Run C++ tests
run: ctest --test-dir build --output-on-failure --parallel
- name: Generate coverage report
run: |
mkdir -p build/coverage
lcov --directory build --capture --output-file build/coverage/coverage.info --ignore-errors source,gcov,negative
lcov --extract build/coverage/coverage.info "${PWD}/src/*" --output-file build/coverage/coverage_filtered.info --ignore-errors unused,negative
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/coverage/coverage_filtered.info
flags: unittests
name: codecov-libsonare
fail_ci_if_error: false
- run: yarn install --immutable
- run: yarn build
- run: yarn test