-
Notifications
You must be signed in to change notification settings - Fork 65
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
base: main
Are you sure you want to change the base?
Fix: fix cicd builds #1154
Conversation
c52c450
to
a920d30
Compare
f9ea61d
to
055340a
Compare
Please change the"*e810_driver" name to "*ice_driver". The ice driver supports more models from 800 series; like e825 and e830. |
dd543d1
to
6f8954d
Compare
@@ -1,4 +1,4 @@ | |||
name: Base Build | |||
name: Ubuntu build |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
.github/workflows/ubuntu_build.yml
Outdated
- 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 |
There was a problem hiding this comment.
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
c429c71
to
0137345
Compare
CiCd setup is broken due to the actions failing to build the project. Fix via switching building to the script.
0137345
to
ae75162
Compare
|
||
if [ "$SETUP_ENVIRONMENT" == "1" ]; then |
There was a problem hiding this comment.
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.
if [ "$SETUP_ENVIRONMENT" == "1" ]; then | |
# Allow sourcing of the script. | |
if [[ "${BASH_SOURCE[0]}" == "${0}" ]] | |
then | |
if [ "$SETUP_ENVIRONMENT" == "1" ]; then |
# Copyright 2025 Intel Corporation | ||
|
There was a problem hiding this comment.
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:
# Copyright 2025 Intel Corporation | |
# Copyright 2025 Intel Corporation | |
REPO_DIR="$(readlink -f "$(dirname -- "${BASH_SOURCE[0]}")/../..")" |
There was a problem hiding this comment.
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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new line between calls.
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 |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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:
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 | |||
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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"
CiCd setup is broken due to the actions failing to build the project. Fix via switching building to the script.