Repository navigation
77 lines (67 loc) · 2.11 KB
/
Copy pathci-linux.yml
File metadata and controls
77 lines (67 loc) · 2.11 KB
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
71
72
73
74
75
76
77
name: CI (Linux)
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_dispatch:
concurrency:
group: ci-linux-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: ${{ matrix.compiler }} / ${{ matrix.build_type }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
build_type: [Debug, Release]
include:
- compiler: gcc
cc: gcc-13
cxx: g++-13
- compiler: clang
cc: clang-18
cxx: clang++-18
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install -y ninja-build ${{ matrix.cc }} ${{ matrix.cxx }}
if [ "${{ matrix.compiler }}" = "clang" ]; then
sudo apt-get install -y libc++-18-dev libc++abi-18-dev
fi
- name: Configure CMake
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
run: |
EXTRA_FLAGS=""
if [ "${{ matrix.compiler }}" = "clang" ]; then
EXTRA_FLAGS="-DCMAKE_CXX_FLAGS=-stdlib=libc++"
fi
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DRMG_BUILD_TESTS=ON \
-DRMG_BUILD_EXAMPLES=ON \
-DRMG_BUILD_BENCHMARKS=OFF \
-DRMG_BUILD_TOOLS=ON \
-DRMG_WARNINGS_AS_ERRORS=ON \
-DRMG_ENABLE_SANITIZERS=${{ matrix.build_type == 'Debug' && 'ON' || 'OFF' }} \
$EXTRA_FLAGS
- name: Build
run: cmake --build build --parallel
- name: Run tests
working-directory: build
run: ctest --output-on-failure --parallel 4
- name: Smoke-test rmg-cli
run: ./build/tools/rmg-cli --self --list-modules
- name: Smoke-test examples
run: |
./build/examples/01_basic_integrity_check
./build/examples/02_memory_scanning
./build/examples/03_hook_detection
./build/examples/04_module_monitoring