@@ -156,7 +156,7 @@ jobs:
156156 FLB_OPT : ${{ matrix.flb_option }}
157157
158158 run-aarch64-unit-tests :
159- runs-on : ${{(github.repository == 'fluent/fluent-bit') && 'ubuntu-22 .04-arm' || 'ubuntu-latest' }}
159+ runs-on : ${{(github.repository == 'fluent/fluent-bit') && 'ubuntu-24 .04-arm' || 'ubuntu-latest' }}
160160 permissions :
161161 contents : read
162162 needs :
@@ -183,8 +183,8 @@ jobs:
183183 - name : Setup environment
184184 run : |
185185 sudo apt-get update
186- sudo apt-get install -y gcc-9 g++-9 clang-12 flex bison libsystemd-dev gcovr libyaml-dev libbpf-dev linux-tools-common curl tar gzip
187- sudo ln -s /usr/bin/llvm-symbolizer-12 /usr/bin/llvm-symbolizer || true
186+ sudo apt-get install -y gcc-14 g++-14 clang-14 flex bison libsystemd-dev gcovr libyaml-dev libbpf-dev linux-tools-common curl tar gzip
187+ sudo ln -s /usr/bin/llvm-symbolizer-14 /usr/bin/llvm-symbolizer || true
188188 sudo mkdir -p "${CMAKE_HOME}"
189189 cmake_url="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz"
190190 cmake_dist="$(mktemp --suffix ".tar.gz")"
@@ -199,9 +199,9 @@ jobs:
199199
200200 - name : Build and test with arm runners
201201 run : |
202- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
203- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
204- sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 90
202+ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 90
203+ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 90
204+ sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 90
205205
206206 export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) ))
207207 export FLB_OPTION="${{ matrix.config.flb_option }}"
@@ -255,13 +255,32 @@ jobs:
255255 install : |
256256 apt-get update
257257 apt-get install -y gcc-12 g++-12 libyaml-dev flex bison libssl-dev libbpf-dev linux-tools-common
258+ arch="$(dpkg --print-architecture)"
259+ case "$arch" in
260+ riscv64)
261+ apt-get install -y gcc-12 g++-12 libyaml-dev flex bison libssl-dev \
262+ libbpf-dev linux-tools-common lld-15
263+ update-alternatives --install /usr/bin/ld.lld ld.lld /usr/bin/ld.lld-15 50
264+ ;;
265+ *)
266+ ;;
267+ esac
258268 apt-get satisfy -y cmake "cmake (<< 4.0)"
259269
260270 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 90
261271 update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 90
262272 run : |
263273 cd build
264274 export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) ))
275+ export CMAKE_LINKER_OPTION=""
276+ arch="$(dpkg --print-architecture)"
277+ case "$arch" in
278+ riscv64)
279+ export CMAKE_LINKER_OPTION='-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=lld"'
280+ ;;
281+ *)
282+ ;;
283+ esac
265284 export FLB_OPTION="-DFLB_WITHOUT_flb-it-network=1 -DFLB_WITHOUT_flb-it-fstore=1"
266285 export FLB_OMIT_OPTION=""
267286 export GLOBAL_OPTION="-DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"
@@ -272,7 +291,7 @@ jobs:
272291
273292 echo "CC = $CC, CXX = $CXX, FLB_OPT = $FLB_OPT"
274293
275- cmake ${FLB_OPT} ../
294+ cmake ${CMAKE_LINKER_OPTION} ${ FLB_OPT} ../
276295 make -j $nparallel
277296 ctest -j $nparallel --build-run-dir . --output-on-failure
278297
0 commit comments