Skip to content

Merge branch 'task/#24323-implement-safuTimeSpecInTimeRange' into 'in… #34

Merge branch 'task/#24323-implement-safuTimeSpecInTimeRange' into 'in…

Merge branch 'task/#24323-implement-safuTimeSpecInTimeRange' into 'in… #34

name: Build and Test
on: [ push, workflow_dispatch, pull_request ]
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v4
- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
curl \
git \
libcmocka-dev \
libcurl4-openssl-dev \
libesmtp-dev \
libjson-c-dev \
liblog4c-dev \
libmnl-dev \
libsqlite3-0 \
libsqlite3-dev \
libssl-dev \
ninja-build \
pkg-config \
python-is-python3 \
python3-pip \
python3-venv \
sqlite3
- name: checkout and build dependecies
run: ci/install_deps.py -G
- name: Build ${{ matrix.build_type }}
env:
DESTDIR: ${{ github.workspace }}/build/${{ matrix.build_type }}/dist
run: |
cmake -B ./build/${{ matrix.build_type }}/cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
make -C ./build/${{ matrix.build_type }}/cmake all install
- name: save build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.build_type }}-build
path: build/${{ matrix.build_type}}/dist
- name: run unit tests (${{ matrix.build_type }})
run: ci/run_utest.sh ${{ matrix.build_type }}
- name: save ${{ matrix.build_type }} unit test report
uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.build_type }}-test-report
path: build/${{ matrix.build_type }}/result/unit_test/