name: CI Build on: pull_request: branches: [master] push: branches: [master] workflow_dispatch: jobs: build-minimal: runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - name: Update base image run: sudo apt update -y - name: Install build dependencies run: sudo 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 build-ubuntu-focal: runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - name: Update base image run: sudo apt update -y - name: Install build dependencies run: sudo DEBIAN_FRONTEND=noninteractive apt install libssl-dev libyaml-dev libc-ares-dev libprotobuf-dev protobuf-compiler libjq-dev libyaml-cpp-dev libgrpc++-dev protobuf-compiler-grpc rpm libelf-dev cmake build-essential libcurl4-openssl-dev linux-headers-$(uname -r) clang llvm git -y - name: Prepare project run: | mkdir build pushd build cmake -DBUILD_BPF=On .. popd - name: Build run: | pushd build KERNELDIR=/lib/modules/$(uname -r)/build make -j4 all popd - name: Run unit tests run: | pushd build make tests popd build-ubuntu-focal-debug: runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - name: Update base image run: sudo apt update -y - name: Install build dependencies run: sudo DEBIAN_FRONTEND=noninteractive apt install libssl-dev libyaml-dev libc-ares-dev libprotobuf-dev protobuf-compiler libjq-dev libyaml-cpp-dev libgrpc++-dev protobuf-compiler-grpc rpm libelf-dev cmake build-essential libcurl4-openssl-dev linux-headers-$(uname -r) clang llvm git -y - name: Prepare project run: | mkdir build pushd build cmake -DCMAKE_BUILD_TYPE=debug -DBUILD_BPF=On .. popd - name: Build run: | pushd build KERNELDIR=/lib/modules/$(uname -r)/build make -j4 all popd - name: Run unit tests run: | pushd build make tests popd build-ubuntu-bionic: runs-on: ubuntu-18.04 steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - name: Update base image run: sudo apt update -y - name: Install build dependencies run: sudo DEBIAN_FRONTEND=noninteractive apt install cmake build-essential clang llvm git linux-headers-$(uname -r) pkg-config autoconf libtool libelf-dev -y - name: Prepare project run: | mkdir build pushd build cmake -DBUILD_BPF=On -DUSE_BUNDLED_DEPS=On .. popd - name: Build run: | pushd build KERNELDIR=/lib/modules/$(uname -r)/build make -j4 all popd - name: Run unit tests run: | pushd build make tests popd build-centos7-debug: runs-on: ubuntu-latest container: image: falcosecurity/falco-builder:latest env: BUILD_TYPE: "debug" steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 path: falco - name: Link falco repo to /source/falco run: | mkdir -p /source ln -s "$GITHUB_WORKSPACE/falco" /source/falco - name: Prepare project run: /usr/bin/entrypoint cmake - name: Build run: /usr/bin/entrypoint all - name: Run unit tests run: /usr/bin/entrypoint tests - name: Build packages run: /usr/bin/entrypoint package