Skip to content

Fix: fix cicd builds #1154

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DawidWesierski4
Copy link
Collaborator

CiCd setup is broken due to the actions failing to build the project. Fix via switching building to the script.

@DawidWesierski4 DawidWesierski4 force-pushed the make_cicd_usable branch 27 times, most recently from c52c450 to a920d30 Compare May 16, 2025 15:48
@DawidWesierski4 DawidWesierski4 force-pushed the make_cicd_usable branch 5 times, most recently from f9ea61d to 055340a Compare May 16, 2025 16:26
@Sakoram
Copy link
Collaborator

Sakoram commented May 19, 2025

Please change the"*e810_driver" name to "*ice_driver". The ice driver supports more models from 800 series; like e825 and e830.

@DawidWesierski4 DawidWesierski4 force-pushed the make_cicd_usable branch 8 times, most recently from dd543d1 to 6f8954d Compare May 19, 2025 13:05
@@ -1,4 +1,4 @@
name: Base Build
name: Ubuntu build
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revoke changes in file/job name

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well yes
Base build doesn't tell the user on the website nothing really
We will implement Rockyos support and then we will have on the main readme
Rockyos build
aaaand base build ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

therea re other names under base build, not only this, and we also agreed to keed the same naming convection between BCS/MTL/MCM CI pipelines

Comment on lines 56 to 61
- name: Install the build dependencies
env:
BUILD_AND_INSTALL_DPDK: 1
BUILD_E810_DRIVER: 1
# ICE driver installation is disabled (not supported in GitHub Actions)
BUILD_AND_INSTALL_ICE_DRIVER: 0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This i plan to trigger via path_filters.yml
we can set them dynamically so this job could replace
build ffmpeg
build eBPF XDP
and all others

@DawidWesierski4 DawidWesierski4 force-pushed the make_cicd_usable branch 7 times, most recently from c429c71 to 0137345 Compare May 21, 2025 06:39
CiCd setup is broken due to the actions failing to build the
project. Fix via switching building to the script.
Comment on lines +69 to +70

if [ "$SETUP_ENVIRONMENT" == "1" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allow sourcing the script and exec only if there is such intent.

Suggested change
if [ "$SETUP_ENVIRONMENT" == "1" ]; then
# Allow sourcing of the script.
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]
then
if [ "$SETUP_ENVIRONMENT" == "1" ]; then

Comment on lines +4 to +5
# Copyright 2025 Intel Corporation

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get the path to the script dir and repository root folder to be caller agnostic:

Suggested change
# Copyright 2025 Intel Corporation
# Copyright 2025 Intel Corporation
REPO_DIR="$(readlink -f "$(dirname -- "${BASH_SOURCE[0]}")/../..")"

Copy link
Collaborator Author

@DawidWesierski4 DawidWesierski4 May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are ?
"${BASH_SOURCE[0]}")/../..")" does exactly that
It's dependent on the position of the script, so even when source,d this will point to the position of the soruced script

I think this is the most foolproof way of doing that as dirname $0 is dependent on if the script was sourced or not

But i am open to suggestions
i don't like using absolute paths, usually as relative paths will work no matter the environment IMO

please correct me if I'm wrong ( ╹ -╹)?

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line between calls.

Comment on lines +32 to +37
env:
SETUP_ENVIRONMENT: 0
BUILD_AND_INSTALL_EBPF_XDP: 0
BUILD_AND_INSTALL_DPDK: 0
BUILD_ICE_DRIVER: 0 # Only for CICD action builds
BUILD_AND_INSTALL_ICE_DRIVER: 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this refers to changes:, so for readability should be before steps (steps 99% of time should be the last in current yaml tree.

jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
changed: ${{ steps.filter.outputs.ubuntu_build == 'true' }}
base: ${{ steps.filter.outputs.ubuntu_build == 'true' }}
afxdp_build: ${{ steps.filter.outputs.afxdp_build == 'true' }}
steps:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move env from end to this place for easy to understand flow:

Suggested change
steps:
env:
SETUP_ENVIRONMENT: 0
BUILD_AND_INSTALL_EBPF_XDP: 0
BUILD_AND_INSTALL_DPDK: 0
BUILD_ICE_DRIVER: 0 # Only for CICD action builds
BUILD_AND_INSTALL_ICE_DRIVER: 0
steps:

@@ -25,7 +25,6 @@ jobs:
changed: ${{ steps.filter.outputs.linux_gtest == 'true' }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line between steps

ninja -C build
cd build
sudo ninja install
fi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line at the end of script

cd lib/libbpf/src
make
sudo make install
fi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line at the end of script


if [ ! -d "xdp-tools" ]; then
echo "Clone XDP source code"
git clone --recurse-submodules https://github.com/xdp-project/xdp-tools.git
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use instead:

. "./common.sh"

git_download_strip_unpack "xdp-project/xdp-tools"  "main" "${script_folder}/xdp-tools"
git_download_strip_unpack ""libbpf/libbpf""  "main" "${script_folder}/xdp-tools/lib/libbpf"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants