Skip to content

Commit

Permalink
workflows: aarch64: linux: Compile and execute internal test on QEMU …
Browse files Browse the repository at this point in the history
…aarch64 Linux

Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed Aug 30, 2024
1 parent abcf3a4 commit 8de1c16
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,52 @@ jobs:
CXX: g++
FLB_OPT: ${{ matrix.flb_option }}


run-qemu-aarch64-unit-tests:
# We chain this after Linux one as there are CPU time costs for QEMU emulation
needs:
- run-ubuntu-unit-tests
runs-on: ubuntu-20.04
timeout-minutes: 60
strategy:
fail-fast: false
steps:
- name: Checkout Fluent Bit code
uses: actions/checkout@v4

- name: Prepare and build with QEMU aarch64
uses: uraimo/run-on-arch-action@v2
id: aarch64-build-on-qemu-aarch64
with:
arch: aarch64
distro: ubuntu20.04
shell: /bin/bash
dockerRunArgs: |
--volume "/var/lib/dbus/machine-id:/var/lib/dbus/machine-id"
--volume "/etc/machine-id:/etc/machine-id"
install: |
apt-get update
apt-get install -y gcc-7 g++-7 clang-6.0 libyaml-dev cmake flex bison libssl-dev #libsystemd-dev
ln -s /usr/bin/llvm-symbolizer-6.0 /usr/bin/llvm-symbolizer || true
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 90
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 90
run: |
cd build
export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) ))
export FLB_OPTION="-DFLB_WITHOUT_flb-it-network=1 -DFLB_WITHOUT_flb-it-fstore=1"
export GLOBAL_OPTION="-DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off"
export FLB_UNIT_TEST_OPTION="-DFLB_TESTS_INTERNAL=On"
export FLB_OPT="${FLB_OPTION} ${GLOBAL_OPTION} ${FLB_UNIT_TEST_OPTION}"
echo "CC = gcc, CXX = gcc, FLB_OPT = $FLB_OPT"
cmake ${FLB_OPT} ../
make -j $nparallel
ctest -j $nparallel --build-run-dir . --output-on-failure
# Required check looks at this so do not remove
run-all-unit-tests:
if: always()
Expand All @@ -120,6 +166,7 @@ jobs:
needs:
- run-macos-unit-tests
- run-ubuntu-unit-tests
- run-qemu-aarch64-unit-tests
steps:
- name: Check build matrix status
# Ignore MacOS failures
Expand Down

0 comments on commit 8de1c16

Please sign in to comment.