Skip to content

Commit d1b404a

Browse files
committed
workflows: Use g++ or clang++ for C++ source buildings and linkings
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent f385c65 commit d1b404a

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

.github/workflows/unit-tests.yaml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ jobs:
4343
- "-DFLB_SANITIZE_MEMORY=On"
4444
- "-DFLB_SANITIZE_THREAD=On"
4545
compiler:
46-
- gcc
47-
- clang
46+
- gcc:
47+
cc: gcc
48+
cxx: g++
49+
- clang:
50+
cc: clang
51+
cxx: clang++
4852
exclude:
4953
- flb_option: "-DFLB_COVERAGE=On"
5054
compiler: clang
@@ -64,7 +68,7 @@ jobs:
6468
repository: calyptia/fluent-bit-ci
6569
path: ci
6670

67-
- name: ${{ matrix.compiler }} - ${{ matrix.flb_option }}
71+
- name: ${{ matrix.compiler.cc }} & ${{ matrix.compiler.cxx }} - ${{ matrix.flb_option }}
6872
run: |
6973
echo "CC = $CC, CXX = $CXX, FLB_OPT = $FLB_OPT"
7074
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 90
@@ -73,8 +77,8 @@ jobs:
7377
sudo usermod -a -G systemd-journal $(id -un)
7478
sudo -E su -p $(id -un) -c "PATH=$PATH ci/scripts/run-unit-tests.sh"
7579
env:
76-
CC: ${{ matrix.compiler }}
77-
CXX: ${{ matrix.compiler }}
80+
CC: ${{ matrix.compiler.cc }}
81+
CXX: ${{ matrix.compiler.cxx }}
7882
FLB_OPT: ${{ matrix.flb_option }}
7983

8084
run-macos-unit-tests:
@@ -128,7 +132,9 @@ jobs:
128132
omit_option: "-DFLB_WITHOUT_flb-it-utils=1 -DFLB_WITHOUT_flb-it-pack=1"
129133
global_option: "-DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"
130134
unit_test_option: "-DFLB_TESTS_INTERNAL=On"
131-
compiler: gcc
135+
compiler:
136+
cc: gcc
137+
cxx: g++
132138
steps:
133139
- name: Checkout Fluent Bit code
134140
uses: actions/checkout@v4
@@ -163,8 +169,8 @@ jobs:
163169
ctest -j $nparallel --build-run-dir . --output-on-failure
164170
working-directory: build
165171
env:
166-
CC: ${{ matrix.config.compiler }}
167-
CXX: ${{ matrix.config.compiler }}
172+
CC: ${{ matrix.config.compiler.cc }}
173+
CXX: ${{ matrix.config.compiler.cxx }}
168174

169175
run-qemu-ubuntu-unit-tests:
170176
# We chain this after Linux one as there are CPU time costs for QEMU emulation
@@ -208,7 +214,7 @@ jobs:
208214
export FLB_UNIT_TEST_OPTION="-DFLB_TESTS_INTERNAL=On"
209215
export FLB_OPT="${FLB_OPTION} ${GLOBAL_OPTION} ${FLB_UNIT_TEST_OPTION} ${FLB_OMIT_OPTION}"
210216
export CC=gcc
211-
export CXX=gcc
217+
export CXX=g++
212218
213219
echo "CC = $CC, CXX = $CXX, FLB_OPT = $FLB_OPT"
214220

0 commit comments

Comments
 (0)