-
Notifications
You must be signed in to change notification settings - Fork 5
56 lines (47 loc) · 1.27 KB
/
build_test_linux.yml
File metadata and controls
56 lines (47 loc) · 1.27 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
name: Linux Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
env:
CMAKE_BUILD_TYPE: Release
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up CMake
uses: lukka/get-cmake@v3.29.2
- name: Cache vcpkg packages
uses: actions/cache@v4
with:
path: |
~/.cache/vcpkg
heiFIP/build/vcpkg_installed
key: ${{ runner.os }}-vcpkg-${{ hashFiles('heiFIP/vcpkg.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
pkg-config \
libpcap-dev \
git
- name: Configure and Build
working-directory: heiFIP
run: |
cmake -B build -S . \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
cmake --build build -j$(nproc)
- name: Run Tests
working-directory: heiFIP
run: |
ctest --output-on-failure