Skip to content

Add build guide for submodule initialization and dependencies #89

Add build guide for submodule initialization and dependencies

Add build guide for submodule initialization and dependencies #89

Workflow file for this run

name: Ubuntu
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
BUILD_TYPE: Release
INSTALL_LOCATION: .local
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v4
- name: get submodule
run: git submodule update --init --recursive
- name: install deps
run: |
make install-deps
sudo apt-get install gcc g++
- name: generate bpf headers
run: make generate-tools
- name: cache dependencies
uses: actions/cache@v4
id: cache
with:
path: ${{ github.workspace }}/${{ env.INSTALL_LOCATION }}
key: ${{ runner.os }}-dependencies
- name: install GoogleTest
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
cd ..
git clone https://github.com/google/googletest.git --branch release-1.10.0
cd googletest
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/$INSTALL_LOCATION
cmake --build build --config Release
cmake --build build --target install --config Release
- name: configure
run: cmake -Bbuild -Deunomia_ENABLE_UNIT_TESTING=0 -Deunomia_USE_GTEST=0
env:
CC: gcc
CXX: g++
# - name: build
# run: cmake --build build --config $BUILD_TYPE -j4
# - name: run tests
# run: |
# cd build
# sudo ctest -C $BUILD_TYPE -VV
# - name: Code coverage using Codecov
# run: bash <(curl -s https://codecov.io/bash)
- name: build project
run: |
mkdir -p build/libbpf/ && cp bpftools/process/.output/libbpf/libbpf.a build/libbpf/libbpf.a
cmake --build build --config Release
# shell: bash
# env:
# CC: gcc-10
# CXX: g++-10