From 2a033956ac2c66295f43b461e0d29d3a82732946 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Fri, 13 May 2022 14:15:00 +0200 Subject: [PATCH] new(ci): initial build minimal action ported to gh action. Signed-off-by: Federico Di Pierro --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000000..49641026ee5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI Build +on: + pull_request: + branches: [master] + +jobs: + build-minimal: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Update base image + run: | + - apt update -y + + - name: Install build dependencies + run: | + - DEBIAN_FRONTEND=noninteractive apt install libjq-dev libyaml-cpp-dev libelf-dev cmake build-essential git -y + + - name: Prepare project + run: | + mkdir build-minimal + pushd build-minimal + cmake -DMINIMAL_BUILD=On -DBUILD_BPF=Off -DBUILD_DRIVER=Off -DCMAKE_BUILD_TYPE=Release .. + popd + + - name: Build + run: | + pushd build-minimal + make -j4 all + popd + + - name: Run unit tests + run: | + pushd build-minimal + make tests + popd \ No newline at end of file