4242 - " -DFLB_COVERAGE=On"
4343 - " -DFLB_SANITIZE_MEMORY=On"
4444 - " -DFLB_SANITIZE_THREAD=On"
45+ - " -DFLB_SIMD=On"
46+ - " -DFLB_SIMD=Off"
4547 compiler :
4648 - gcc
4749 - clang
5456 - name : Setup environment
5557 run : |
5658 sudo apt-get update
57- sudo apt-get install -y gcc-7 g++-7 clang-6.0 libsystemd-dev gcovr libyaml-dev
59+ sudo apt-get install -y gcc-7 g++-7 clang-6.0 libsystemd-dev gcovr libyaml-dev libbpf-dev linux-tools-common
5860 sudo ln -s /usr/bin/llvm-symbolizer-6.0 /usr/bin/llvm-symbolizer || true
5961
6062 - uses : actions/checkout@v4
@@ -110,6 +112,113 @@ jobs:
110112 CXX : g++
111113 FLB_OPT : ${{ matrix.flb_option }}
112114
115+ run-aarch64-unit-tests :
116+ # Ensure for OSS Fluent Bit repo we enable usage of Actuated runners for ARM builds, for forks it should keep existing ubuntu-latest usage.
117+ runs-on : ${{(github.repository == 'fluent/fluent-bit') && 'actuated-arm64-8cpu-16gb' || 'ubuntu-latest' }}
118+ permissions :
119+ contents : read
120+ # We chain this after Linux one as there are costs for actuated workers
121+ needs :
122+ - run-ubuntu-unit-tests
123+ timeout-minutes : 10
124+ strategy :
125+ fail-fast : false
126+ matrix :
127+ config :
128+ - name : " Aarch64 actuated testing"
129+ flb_option : " -DFLB_WITHOUT_flb-it-network=1 -DFLB_WITHOUT_flb-it-fstore=1"
130+ omit_option : " "
131+ global_option : " -DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"
132+ unit_test_option : " -DFLB_TESTS_INTERNAL=On"
133+ compiler : gcc
134+ steps :
135+ - name : Checkout Fluent Bit code
136+ uses : actions/checkout@v4
137+
138+ - name : Set up Actuated mirror
139+ if : github.repository == 'fluent/fluent-bit'
140+ uses : self-actuated/hub-mirror@master
141+
142+ - name : Setup environment
143+ run : |
144+ sudo apt-get update
145+ sudo apt-get install -y gcc-9 g++-9 clang-12 cmake flex bison libsystemd-dev gcovr libyaml-dev libbpf-dev linux-tools-common
146+ sudo ln -s /usr/bin/llvm-symbolizer-12 /usr/bin/llvm-symbolizer || true
147+
148+ - name : Build and test with actuated runners
149+ run : |
150+ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
151+ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90
152+ sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 90
153+
154+ export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) ))
155+ export FLB_OPTION="${{ matrix.config.flb_option }}"
156+ export FLB_OMIT_OPTION="${{ matrix.config.omit_option }}"
157+ export GLOBAL_OPTION="${{ matrix.config.global_option }}"
158+ export FLB_UNIT_TEST_OPTION="${{ matrix.config.unit_test_option }}"
159+ export FLB_OPT="${FLB_OPTION} ${GLOBAL_OPTION} ${FLB_UNIT_TEST_OPTION} ${FLB_OMIT_OPTION}"
160+
161+ echo "CC = ${{ matrix.config.compiler }}, CXX = ${{ matrix.config.compiler }}, FLB_OPT = $FLB_OPT"
162+
163+ cmake ${FLB_OPT} ../
164+ make -j $nparallel
165+ ctest -j $nparallel --build-run-dir . --output-on-failure
166+ working-directory : build
167+ env :
168+ CC : ${{ matrix.config.compiler }}
169+ CXX : ${{ matrix.config.compiler }}
170+
171+ run-qemu-ubuntu-unit-tests :
172+ # We chain this after Linux one as there are CPU time costs for QEMU emulation
173+ needs :
174+ - run-ubuntu-unit-tests
175+ runs-on : ubuntu-20.04
176+ timeout-minutes : 60
177+ strategy :
178+ fail-fast : false
179+ matrix :
180+ arch :
181+ - s390x
182+ steps :
183+ - name : Checkout Fluent Bit code
184+ uses : actions/checkout@v4
185+
186+ - name : Prepare and build with QEMU ${{ matrix.arch }}
187+ uses : uraimo/run-on-arch-action@v2
188+ id : build-and-test-on-qemu
189+ with :
190+ arch : ${{ matrix.arch }}
191+ distro : ubuntu20.04
192+ shell : /bin/bash
193+ dockerRunArgs : |
194+ --volume "/var/lib/dbus/machine-id:/var/lib/dbus/machine-id"
195+ --volume "/etc/machine-id:/etc/machine-id"
196+ install : |
197+ apt-get update
198+ apt-get install -y gcc-7 g++-7 clang-6.0 libyaml-dev cmake flex bison libssl-dev libbpf-dev linux-tools-common#libsystemd-dev
199+ ln -s /usr/bin/llvm-symbolizer-6.0 /usr/bin/llvm-symbolizer || true
200+
201+ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 90
202+ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90
203+ update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 90
204+ run : |
205+ cd build
206+ export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) ))
207+ export FLB_OPTION="-DFLB_WITHOUT_flb-it-network=1 -DFLB_WITHOUT_flb-it-fstore=1"
208+ export FLB_OMIT_OPTION=""
209+ export GLOBAL_OPTION="-DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"
210+ export FLB_UNIT_TEST_OPTION="-DFLB_TESTS_INTERNAL=On"
211+ export FLB_OPT="${FLB_OPTION} ${GLOBAL_OPTION} ${FLB_UNIT_TEST_OPTION} ${FLB_OMIT_OPTION}"
212+ export CC=gcc
213+ export CXX=gcc
214+
215+ echo "CC = $CC, CXX = $CXX, FLB_OPT = $FLB_OPT"
216+
217+ cmake ${FLB_OPT} ../
218+ make -j $nparallel
219+ ctest -j $nparallel --build-run-dir . --output-on-failure
220+
221+
113222 # Required check looks at this so do not remove
114223 run-all-unit-tests :
115224 if : always()
@@ -120,6 +229,8 @@ jobs:
120229 needs :
121230 - run-macos-unit-tests
122231 - run-ubuntu-unit-tests
232+ - run-aarch64-unit-tests
233+ - run-qemu-ubuntu-unit-tests
123234 steps :
124235 - name : Check build matrix status
125236 # Ignore MacOS failures
0 commit comments