-
Notifications
You must be signed in to change notification settings - Fork 2k
workflows: linux: Compile and execute internal test on non-amd64 platforms Linux #9313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
patrick-stephens
merged 8 commits into
master
from
cosmo0920-add-qemu-aarch64-linux-workflow
Sep 5, 2024
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
912bd2c
workflows: aarch64: linux: Compile and execute internal test on QEMU …
cosmo0920 6d7ae8f
workflows: aarch64: Omit to execute flb-it-utils and flb-it-pack tests
cosmo0920 79cf99b
workflows: aarch64: Tweak for easily to extend for other non-amd64 pl…
cosmo0920 177c89e
workflows: aarch64: Add actuated runner settings for aarch64
cosmo0920 a85a6fe
workflows: Reuse qemu settings for s390x CI task
cosmo0920 0e155c6
workflows: s390x: Remove omit option to execute pack and utils intern…
cosmo0920 7030302
workflows: Remove needless conditions
cosmo0920 ab9f9d6
workflows: aarch64: Shorten the timeout from 60mins. to 10mins.
cosmo0920 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -110,6 +110,115 @@ jobs: | |
| CXX: g++ | ||
| FLB_OPT: ${{ matrix.flb_option }} | ||
|
|
||
| run-aarch64-unit-tests: | ||
| # Ensure for OSS Fluent Bit repo we enable usage of Actuated runners for ARM builds, for forks it should keep existing ubuntu-latest usage. | ||
| runs-on: ${{(github.repository == 'fluent/fluent-bit') && 'actuated-arm64-8cpu-16gb' || 'ubuntu-latest' }} | ||
| permissions: | ||
| contents: read | ||
| # We chain this after Linux one as there are costs for actuated workers | ||
| needs: | ||
| - run-ubuntu-unit-tests | ||
| timeout-minutes: 60 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| config: | ||
| - name: "Aarch64 actuated testing" | ||
| flb_option: "-DFLB_WITHOUT_flb-it-network=1 -DFLB_WITHOUT_flb-it-fstore=1" | ||
| omit_option: "-DFLB_WITHOUT_flb-it-utils=1 -DFLB_WITHOUT_flb-it-pack=1" | ||
| global_option: "-DFLB_BACKTRACE=Off -DFLB_SHARED_LIB=Off -DFLB_DEBUG=On -DFLB_ALL=On -DFLB_EXAMPLES=Off" | ||
| unit_test_option: "-DFLB_TESTS_INTERNAL=On" | ||
| compiler: gcc | ||
| steps: | ||
| - name: Checkout Fluent Bit code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Actuated mirror | ||
| if: github.repository == 'fluent/fluent-bit' | ||
| uses: self-actuated/hub-mirror@master | ||
|
|
||
| - name: Setup environment | ||
| if: github.repository == 'fluent/fluent-bit' | ||
|
patrick-stephens marked this conversation as resolved.
Outdated
|
||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y gcc-9 g++-9 clang-12 cmake flex bison libsystemd-dev gcovr libyaml-dev | ||
| sudo ln -s /usr/bin/llvm-symbolizer-12 /usr/bin/llvm-symbolizer || true | ||
|
|
||
| - name: Build and test with actuated runners | ||
| if: github.repository == 'fluent/fluent-bit' | ||
|
patrick-stephens marked this conversation as resolved.
Outdated
|
||
| run: | | ||
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 | ||
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90 | ||
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 90 | ||
|
|
||
| export nparallel=$(( $(getconf _NPROCESSORS_ONLN) > 8 ? 8 : $(getconf _NPROCESSORS_ONLN) )) | ||
| export FLB_OPTION="${{ matrix.config.flb_option }}" | ||
| export FLB_OMIT_OPTION="${{ matrix.config.omit_option }}" | ||
| export GLOBAL_OPTION="${{ matrix.config.global_option }}" | ||
| export FLB_UNIT_TEST_OPTION="${{ matrix.config.unit_test_option }}" | ||
| export FLB_OPT="${FLB_OPTION} ${GLOBAL_OPTION} ${FLB_UNIT_TEST_OPTION} ${FLB_OMIT_OPTION}" | ||
|
|
||
| echo "CC = ${{ matrix.config.compiler }}, CXX = ${{ matrix.config.compiler }}, FLB_OPT = $FLB_OPT" | ||
|
|
||
| cmake ${FLB_OPT} ../ | ||
| make -j $nparallel | ||
| ctest -j $nparallel --build-run-dir . --output-on-failure | ||
| working-directory: build | ||
| env: | ||
| CC: ${{ matrix.config.compiler }} | ||
| CXX: ${{ matrix.config.compiler }} | ||
|
|
||
| run-qemu-ubuntu-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 | ||
|
patrick-stephens marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We probably want to look at stepping this up as well soon, 22 is the default and 24 is coming. Not a blocker now though. |
||
| timeout-minutes: 60 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| arch: | ||
| - s390x | ||
| steps: | ||
| - name: Checkout Fluent Bit code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Prepare and build with QEMU ${{ matrix.arch }} | ||
| uses: uraimo/run-on-arch-action@v2 | ||
| id: build-and-test-on-qemu | ||
| with: | ||
| arch: ${{ matrix.arch }} | ||
| 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 FLB_OMIT_OPTION="" | ||
| 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} ${FLB_OMIT_OPTION}" | ||
| export CC=gcc | ||
| export CXX=gcc | ||
|
|
||
| echo "CC = $CC, CXX = $CXX, 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() | ||
|
|
@@ -120,6 +229,8 @@ jobs: | |
| needs: | ||
| - run-macos-unit-tests | ||
| - run-ubuntu-unit-tests | ||
| - run-aarch64-unit-tests | ||
| - run-qemu-ubuntu-unit-tests | ||
| steps: | ||
| - name: Check build matrix status | ||
| # Ignore MacOS failures | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.