Skip to content

Merge branch 'bug/#24803-package_fetchAPI_backend_plugin_for_debian' … #87

Merge branch 'bug/#24803-package_fetchAPI_backend_plugin_for_debian' …

Merge branch 'bug/#24803-package_fetchAPI_backend_plugin_for_debian' … #87

name: Build
on: [ push, workflow_dispatch, pull_request ]
jobs:
build:
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 cmocka_extensions
run: |
git clone https://github.com/Elektrobit/cmocka_extensions.git /tmp/cmocka_extensions
cmake -B /tmp/cmocka_extensions/build /tmp/cmocka_extensions -DUNIT_TESTS=off -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
make -C /tmp/cmocka_extensions/build all
sudo make -C /tmp/cmocka_extensions/build install
- name: checkout and build cmocka_mocks
run: |
git clone https://github.com/Elektrobit/cmocka_mocks.git /tmp/cmocka_mocks
cmake -B /tmp/cmocka_mocks/build /tmp/cmocka_mocks -DUNIT_TESTS=off -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
make -C /tmp/cmocka_mocks/build all
sudo make -C /tmp/cmocka_mocks/build install
- name: checkout and build safu
run: |
git clone https://github.com/Elektrobit/safu.git /tmp/safu
cmake -B /tmp/safu/build /tmp/safu -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
make -C /tmp/safu/build all
sudo make -C /tmp/safu/build install
- name: checkout and build samconf
run: |
git clone https://github.com/Elektrobit/samconf.git /tmp/samconf
cmake -B /tmp/samconf/build /tmp/samconf -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
make -C /tmp/samconf/build all
sudo make -C /tmp/samconf/build install
- 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@v3
with:
name: ${{ matrix.build_type}}-build
path: build/${{ matrix.build_type}}/dist
- name: save cmake artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.build_type}}-cmake
path: build/${{ matrix.build_type}}/cmake