-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
CI: packages: Add github CI job to build all packages #10407
Conversation
e0bf205
to
0d305d5
Compare
Why that arch specifically? |
I did this only for mips 32 be because this will take some time to build. I think we do not have enough resources to build it for all targets. I am thinking about to add an other with experimental toolchain like gcc 12 and so on. |
The kernel build takes 22m 50s here, for the all targets build it is about 10 minutes.This workflow will build all core packages and kernel modules and it also found a problem. It failed because of this problem, that is getting fixed in #10396, I do not know why our build bots do not fail on this.
|
a9662d9
to
f60e7ef
Compare
shell: su buildbot -c "sh -e {0}" | ||
working-directory: openwrt | ||
run: | | ||
echo CONFIG_ALL=y >> .config |
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.
BTW this is how the config is seeded on our buildbots:
seedconfig: |-
CONFIG_BUILDBOT=y
CONFIG_DEVEL=y
# CONFIG_CCACHE is not set
CONFIG_KERNEL_KALLSYMS=y
so if the idea is to prevent build breakage later on our buildbots, then I would probably try to do it in similar way.
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.
I would like to build all core kernel and user space packages here to detect if some pull request breaks building them. The build bots use a 2 stage setup, with the SDK, but that is more complicated.
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.
The build bots use a 2 stage setup, with the SDK, but that is more complicated.
Indeed, but changes introduced in this repository might actually break the SDKs (we notice that much later either in Docker container build steps or on buildbots), or produce different (or unusable) results with the SDKs.
Having one BE and one LE target is certainly a good idea. I would vote for x86/64 as that 2nd one due to KVM (much faster in QEMU), familiarity etc. |
1b505b7
to
4acd746
Compare
.github/workflows/packages.yml
Outdated
- name: Build toolchain | ||
shell: su buildbot -c "sh -e {0}" | ||
working-directory: openwrt | ||
run: make toolchain/install -j$(nproc) BUILD_LOG=1 |
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.
Is this step required when using an external toolchain?
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.
Seems so as it does create some wrapper script
.github/workflows/packages.yml
Outdated
- name: Build Kernel | ||
shell: su buildbot -c "sh -e {0}" | ||
working-directory: openwrt | ||
run: make target/compile -j$(nproc) BUILD_LOG=1 |
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.
We have our own CI step to test Kernel changes, do you want to rebuild them here to? I'd see if we can disable as much Kernel as possible and only check core packages without kmods.
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.
Agree that we can skip kernel build as we already have jobs that does the same.
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.
The kernel build does not test if we can package the kernel modules. For example if kmod misses a dependency or the .ko file does not exists the kernel test will not fail, but this will fail.
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.
imho we should find a way to compile kmods in the kernel build test. Currently we use make package/linux/compile that afaik package the .ko. Problem is that package like mac80211 require manual compilation as they are not handled by package/linux/compile
I am getting the following compile errors:
iucode-tool-2.3.1 on x86_64:
I have to look more closely into these problems. |
.github/workflows/packages.yml
Outdated
--overwrite-config \ | ||
--config ${{ env.TARGET }}/${{ env.SUBTARGET }} | ||
|
||
make defconfig |
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.
In theory the script already run defconfig if i'm not wrong
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.
removed
.github/workflows/packages.yml
Outdated
- name: Build everything | ||
shell: su buildbot -c "sh -e {0}" | ||
working-directory: openwrt | ||
run: make -j$(nproc) BUILD_LOG=1 |
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.
I think we have to build everything separately. A simple make won't permit us to skip things like kernel build.
Also having split jobs permit us to better track what is actually failing. (and eventually build only package without creating an actual image)
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.
In that case make package/compile should be used. Running each individually would take forever as it checks the dependencies every time
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.
Yes I mean using all the subcommand, wasn't saying to call compile for each package.
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.
I would like to compile all normal and kernel packages from the OpenWrt core here explicitly.
I restricted it to only two targets, but on these I would like to run a full build to hopefully spot build problems early.
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.
@hauke to make debug quicker i notice a little trick on another workflow.
make -j$(nproc) BUILD_LOG=1 || make -j1 V=s
in theory the affected error should be printed. What do you think?
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.
make -j1 V=s
You should probably first backup the logs which would be likely containing the previous error(s), since it might be related to some concurrent build issue and thus single threaded build attempt might succeed and clear out that previous build error(s).
in theory the affected error should be printed
What about following ci: show build failures directly in job log output ?
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.
I copied it form ynezz@2dc201b
9111715
to
232ae69
Compare
trace-cmd-v3.1.2 and iucode-tool-2.3.1 are failing to compile because we do not add this: I will check if this means that fortify source is not working when using external musl toolchains. |
(btw a bit ot but we lack workflow to test toolchain changes) |
fe3666d
to
088fd45
Compare
Also building for x86/64 on x86/64 is extra sensitive for host lib leakage iirc, so it's definitely a good candidate imo. |
Is there an easy way to also enable all CONFIG_KERNEL_* symbols? There's a lot of breakage in some of them when we're adding a new kernel. |
088fd45
to
f0165ca
Compare
f0165ca
to
05155c8
Compare
@hauke considering we already have test for tools why not use the tools container also for this? |
Yes I will try to use the pre build tools. unetd is still not building without the LLVM toolchain.
|
I'm probably blind but the tools is not getting compiled? Or if it should be part of the toolchain are we sure we are shipping external toolchain with them?
|
05155c8
to
bf73c04
Compare
bf73c04
to
0cc0e94
Compare
@hauke remember to set the correct permission |
657191f
to
deaddb9
Compare
@stintel We do not have a option to build all I am using now the tools container like it is done in the kernel.yml file. I syned the code again with the kernel.yml, but did not add the ccache. I would like to detect problems like a gdb build failure after the readĺine upgrade, are they still detected with ccache? I also updated the permissions to match kernel.yml. |
173e274
to
f1abd78
Compare
unetd always includes $(INCLUDE_DIR)/bpf.mk. This file always checks if the LLVM version is supported in CLANG_VER_VALID. unetd only needs bpf when UNETD_VXLAN_SUPPORT is set. It fails when UNETD_VXLAN_SUPPORT is not set and llvm is not installed. Fix it by only checking the LLVM version when a LLVM toolchain is available. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This will build OpenWrt for MIPS malta BE and x86 64 Bit with all packages and kernel modules activated. It is triggered when something changes in the build system or when a package definition is changed. This task probably needs 90 minutes to execute, but I hope that it will find build problems in pull requests early. This intentionally does not activate the feeds, because building them too would take too long. We only build x86/64 and malta/be to save resources. I would like to detect build problems when a package is changed. We often had build breaks when a package version was increased sometime even in other packages which used it as a dependency. This is based on the .github/workflows/packages.yml workflow. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
f1abd78
to
b99d377
Compare
This will build OpenWrt for MIPS malta BE with all core packages
activated. It is triggered when something changes in the build system or
when a package definition is changed. This task probably needs multiple
hours to execute, but I hope that it will find build problems in pull
requests early.
This is based on the .github/workflows/packages.yml workflow.
Signed-off-by: Hauke Mehrtens hauke@hauke-m.de