-
Notifications
You must be signed in to change notification settings - Fork 3
70 lines (67 loc) · 2.21 KB
/
fedora.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#
# SPDX-FileCopyrightText: 2020-2024 EasyCoding Team and contributors
#
# SPDX-License-Identifier: MIT
#
name: Fedora CI
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
jobs:
build:
name: Build and install project
runs-on: ubuntu-latest
container: fedora:latest
strategy:
fail-fast: false
matrix:
compiler: ['clang', 'gcc']
include:
- compiler: 'clang'
cc: 'clang'
cxx: 'clang++'
- compiler: 'gcc'
cc: 'gcc'
cxx: 'g++'
steps:
- name: Installing core packages
run: |
sudo dnf -y install git-core
- name: Fetching sources
uses: actions/checkout@v4
- name: Installing compiler ${{ matrix.compiler }}
run: |
sudo dnf -y install '/usr/bin/${{ matrix.cc }}' '/usr/bin/${{ matrix.cxx }}'
- name: Installing build system
run: |
sudo dnf -y install cmake ninja-build
- name: Installing development packages
run: |
sudo dnf -y install boost-devel glibc-headers kernel-headers systemd-devel
- name: Installing helper tools
run: |
sudo dnf -y install doxygen pandoc
- name: Building project with CMake
run: |
cmake -S . -B build \
-GNinja \
-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