From 6c939361844145ccd9ec9ad259b32f6c773038ae Mon Sep 17 00:00:00 2001 From: Thomas Devoogdt Date: Sun, 25 Aug 2024 20:25:19 +0200 Subject: [PATCH] workflows: add sanity check for toolchains w/ CXX support Fluent-bit is written in C, so don't require CXX, also not from the libs. Signed-off-by: Thomas Devoogdt --- .github/workflows/pr-compile-check.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/pr-compile-check.yaml b/.github/workflows/pr-compile-check.yaml index 42381a8a1d1..e0ca3592148 100644 --- a/.github/workflows/pr-compile-check.yaml +++ b/.github/workflows/pr-compile-check.yaml @@ -78,3 +78,26 @@ jobs: run: | ldd ./bin/fluent-bit working-directory: build + + # Sanity check for compilation w/ CXX support + pr-compile-without-cxx: + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + fail-fast: false + steps: + - name: Setup environment + run: | + sudo apt-get update + sudo apt-get install -y bison cmake flex gcc libssl-dev libyaml-dev + + - name: Checkout Fluent Bit code + uses: actions/checkout@v4 + + - name: Compile w/ CXX support + run: | + export CXX=/bin/false + export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) )) + cmake ../ + make -j $nparallel + working-directory: build