-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 919 Bytes
/
Copy pathcpp.yml
File metadata and controls
41 lines (33 loc) · 919 Bytes
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
name: C++ CI
on:
push:
branches:
- main # Change this to the default branch of your repository
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: '3.10' # Specify the CMake version you need
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libpcap-dev # Install libpcap for your tests
- name: Configure CMake
run: |
mkdir build
cd build
cmake ..
- name: Build
run: |
cd build
cmake --build .
- name: Run Tests
run: |
cd build
ctest --output-on-failure # Run tests using CTest, this will automatically run your test executables