diff --git a/.github/workflows/reusable_build_dev.yaml b/.github/workflows/reusable_build_dev.yaml index c5c7e9592d0..d28cdeda3f5 100644 --- a/.github/workflows/reusable_build_dev.yaml +++ b/.github/workflows/reusable_build_dev.yaml @@ -63,39 +63,52 @@ jobs: if: inputs.minimal != true && matrix.os == 'ubuntu-22.04' run: sudo DEBIAN_FRONTEND=noninteractive apt install libssl-dev libyaml-dev libc-ares-dev libprotobuf-dev protobuf-compiler libgrpc++-dev protobuf-compiler-grpc rpm libcurl4-openssl-dev linux-headers-$(uname -r) clang llvm -y - #- name: Prepare project - # run: | - # mkdir build - # cd build - # cmake -DBUILD_FALCO_UNIT_TESTS=On -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DBUILD_BPF=${{ inputs.minimal == true && 'OFF' || 'ON' }} -DBUILD_DRIVER=${{ inputs.minimal == true && 'OFF' || 'ON' }} -DMINIMAL_BUILD=${{ inputs.minimal == true && 'ON' || 'OFF' }} -DUSE_BUNDLED_DEPS=${{ matrix.os == 'ubunut-22.04' && 'OFF' || 'ON' }} .. - # cd .. + - name: Prepare project (linux) + if: matrix.os == 'ubuntu-22.04' + run: | + mkdir build + pushd build + cmake \ + -DBUILD_FALCO_UNIT_TESTS=On \ + -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \ + -DBUILD_BPF=${{ inputs.minimal == true && 'OFF' || 'ON' }} \ + -DBUILD_DRIVER=${{ inputs.minimal == true && 'OFF' || 'ON' }} \ + -DMINIMAL_BUILD=${{ inputs.minimal == true && 'ON' || 'OFF' }} \ + .. + popd - - name: Prepare project + - name: Prepare project (windows/macos) + if: matrix.os != 'ubuntu-22.04' run: | mkdir build cd build - cmake -DMINIMAL_BUILD=ON -DUSE_BUNDLED_DEPS=ON .. + cmake -DBUILD_FALCO_UNIT_TESTS=On -DMINIMAL_BUILD=ON -DUSE_BUNDLED_DEPS=ON .. cd .. - - name: Build - if: matrix.os != 'windows-latest' + - name: Build (linux) + if: matrix.os == 'ubuntu-22.04' run: | pushd build KERNELDIR=/lib/modules/$(uname -r)/build make -j4 all popd - - name: Build - if: matrix.os == 'windows-latest' + - name: Build (windows/macos) + if: matrix.os != 'ubuntu-22.04' run: | - cmake -B build . + cmake --build build --target falco - name: Run unit tests if: matrix.os != 'windows-latest' run: | pushd build - sudo ./unit_tests/falco_unit_tests + sudo ./unit_tests/falco_unit_tests popd + - name: Run unit tests (windows) + if: matrix.os == 'windows-latest' + run: | + build/unit_tests/falco_unit_tests.exe + - name: Run command id: run_cmd if: inputs.cmd != '' && matrix.os != 'windows-latest'