Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the first github pipeline (ubuntu22.04) #16

Closed
wants to merge 10 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/ubuntu2204.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# .github/workflows/ubuntu2204.yaml
name: Ubuntu 22.04

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-22.04

steps:
# Step 1: Checkout the code
- name: Checkout code
uses: actions/checkout@v3

# Step 2: Install dependencies
- name: Install dependencies
run: |
sudo apt-get update --fix-missing
sudo apt-get install -y cmake make g++
export CLANG_FORMAT_CHECK=1
export CPP_CHECK=1

sudo apt install -y cmake build-essential libboost-dev git libboost-program-options-dev \
wget gcovr doxygen libboost-filesystem-dev libasan6 python3

sudo apt install -y clang-format cppcheck
sudo apt install -y clang gcc-multilib
sudo apt install -y libyaml-cpp-dev

# Step 3: Submodules
- name: Submodules
run: |
./init_and_patch_submodules.sh
source setup_jbpf_env.sh

# Step 4: Configure with CMake
- name: Configure CMake
run: |
mkdir -p build
cd build
cmake ..

# Step 5: Build the project
- name: Build the project
run: |
cd build
make -j$(nproc)

# Step 6: Run tests (if applicable)
- name: Run tests
run: |
source setup_jbpf_env.sh
cd build
sudo -E ctest --output-on-failure
Loading