Unified the default values of various variables between the documenta… #232
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# SPDX-FileCopyrightText: 2020-2024 EasyCoding Team and contributors | |
# | |
# SPDX-License-Identifier: MIT | |
# | |
name: Ubuntu CI | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
branches: | |
- 'master' | |
jobs: | |
build: | |
name: Build and install project | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: ['clang', 'gcc'] | |
include: | |
- compiler: 'clang' | |
cc: 'clang' | |
cxx: 'clang++' | |
- compiler: 'gcc' | |
cc: 'gcc' | |
cxx: 'g++' | |
steps: | |
- name: Fetching sources | |
uses: actions/checkout@v4 | |
- name: Updating apt package metadata | |
run: | | |
sudo apt-get update | |
- name: Installing compiler ${{ matrix.compiler }} | |
run: | | |
sudo apt-get -y install ${{ matrix.compiler }} | |
- name: Installing build system | |
run: | | |
sudo apt-get -y install cmake make | |
- name: Installing development packages | |
run: | | |
sudo apt-get -y install linux-libc-dev libboost-program-options-dev libsystemd-dev | |
- name: Installing helper tools | |
run: | | |
sudo apt-get -y install doxygen pandoc | |
- name: Building project with CMake | |
run: | | |
cmake -S . -B build \ | |
-DCMAKE_C_COMPILER=${{ matrix.cc }} \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ | |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
-DCMAKE_INSTALL_PREFIX:PATH=/usr \ | |
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ | |
-DBUILD_DOC:BOOL=ON \ | |
-DBUILD_MANPAGE:BOOL=ON \ | |
-DSYSTEMD_INTEGRATION:BOOL=ON | |
cmake --build build | |
env: | |
CFLAGS: -O2 -fexceptions -pipe -Wall -Wextra -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fPIC -fstack-protector-strong -fasynchronous-unwind-tables -fcf-protection | |
CXXFLAGS: -O2 -fexceptions -pipe -Wall -Wextra -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fPIC -fstack-protector-strong -fasynchronous-unwind-tables -fcf-protection | |
LDFLAGS: -Wl,-z,relro -Wl,--as-needed -Wl,-z,now | |
- name: Installing project with CMake | |
run: | | |
sudo cmake --install build |