Skip to content

ci: build-firmware: SDK use EXTRA_DEPENDS for lime-packages to speed up the compilation - #1272

Merged
a-gave merged 3 commits into
libremesh:masterfrom
a-gave:ci/build-firmware
Aug 21, 2026
Merged

ci: build-firmware: SDK use EXTRA_DEPENDS for lime-packages to speed up the compilation#1272
a-gave merged 3 commits into
libremesh:masterfrom
a-gave:ci/build-firmware

Conversation

@a-gave

@a-gave a-gave commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

The rest of the lime-packages built via by the ci via the action gh-action-sdk are compiled with NO_DEFAULT_FEEDS.
No issue so far since there is no libremesh package that needs to have one of its dependency actually compiled during it's own compilation.
Instead it speed up the compilation of a single architecture from 40m-1h to 10-15min.

@ilario ilario left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It seems excellent to me :)

@a-gave

a-gave commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

mmm.. looking instead at the output of the action now. It seems that the build_feed actually needs some openwrt packages to build the initramfs..
maybe it could be restructured with a list of these required tools and install only them

@ilario

ilario commented Aug 14, 2026

Copy link
Copy Markdown
Member

Is it vwifi?
Likely we are using it for the tests on qemu...

@a-gave
a-gave force-pushed the ci/build-firmware branch from a131d51 to f9cbc37 Compare August 14, 2026 15:27
@a-gave

a-gave commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

mmm.. looking instead at the output of the action now. It seems that the build_feed actually needs some openwrt packages to build the initramfs.. maybe it could be restructured with a list of these required tools and install only them

No sorry, the initramfs part is done using the imagebuilder.

Is it vwifi? Likely we are using it for the tests on qemu...

Yes it seems that there is still an issue with vwifi for x86_64, didn't realize how to fix yet.

@a-gave
a-gave force-pushed the ci/build-firmware branch from f9cbc37 to ee383af Compare August 14, 2026 16:05
@a-gave
a-gave marked this pull request as draft August 14, 2026 16:06
a-gave added 2 commits August 21, 2026 15:31
…list

Compile via SDK the whole feeds 'lime_packages' and 'vwifi' instead of a list of PACKAGES

This is a bit faster, like from the actual 1h40m to 1h.20m, since the ci action
openwrt/gh-action-sdk when a packages list is provided do more steps for each package,
and recompile big stuff like the kernel or hostapd for several packages consuming time.
fix: add missing '+' to dependencies, like 'shared-state' to '+shared-state'
fix: remove trailing whitespaces from packages makefiles
ubus-lime-utils: depends directly on uci instead of libuci which has
  a particular version scheme that doesn't support well using extra_depends.
@a-gave
a-gave force-pushed the ci/build-firmware branch from ee383af to 1f925f9 Compare August 21, 2026 13:41
@a-gave a-gave changed the title ci: build-firmware: add NO_DEFAULT_FEEDS to speed up compilation ci: build-firmware: SDK use EXTRA_DEPENDS for lime-packages to speed up compilation Aug 21, 2026
@a-gave a-gave changed the title ci: build-firmware: SDK use EXTRA_DEPENDS for lime-packages to speed up compilation ci: build-firmware: SDK use EXTRA_DEPENDS for lime-packages to speed up the compilation Aug 21, 2026
@a-gave
a-gave marked this pull request as ready for review August 21, 2026 15:55
@ilario

ilario commented Aug 21, 2026

Copy link
Copy Markdown
Member

Just checked the code. It seems eeeexcellent to me!!!!
Please merge when you consider to :)

Replace DEPENDS with EXTRA_DEPENDS in all lime-packages makefiles before
building them via SDK.

This is an alternative way to avoid to compile all lime-packages dependencies
which consume time.

The common way is to pass NO_DEFAULT_FEEDS=1 to the openwrt/gh-action-sdk
but this is not doable here with the arch x86_64 because we have the package vwifi
to compile, needed for the qemu-mesh wifi simulation, that needs the openwrt
default feed 'base'.

lime-packages are compiled with EXTRA_DEPENDS that avoids to select the in place
openwrt default packages like the routing protocol 'babeld' when building
'lime-proto-babeld' whose dependencies are modified in this way, with a soft
_VERSION_CONSTRAINT (>0) [0]:
```
DEPENDS:=+babeld lime-system +luci-lib-nixio
```
to
```
EXTRA_DEPENDS:=babeld (>0), lime-system (>0), luci-lib-nixio (>0)
```

As a resume between similar directives in the packages makefiles, cfr. [1]:
- PKG_BUILD_DEPENDS: require the dependencies to be in place and built before the package
- DEPENDS: doesn't require the dependencies to be in place and built but if they are
  present, i.e. with all the default feeds in feeds.conf, 'selects' them and compile them
  before the package.
- EXTRA_DEPENDS: doesn't try to 'select' them if they are present, but includes them in the
  package control list.

[0] Note: IB fails in a strange way to install libuci20250120-2025.12.02~66127cd7-r1
[1] https://openwrt.org/docs/guide-developer/packages#buildpackage_variables
@a-gave
a-gave force-pushed the ci/build-firmware branch from 1f925f9 to ae5f984 Compare August 21, 2026 23:47
@a-gave

a-gave commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

Just checked the code. It seems eeeexcellent to me!!!! Please merge when you consider to :)

Thanks added only a missing check that the sed regex to transform DEPENDS to EXTRA_DEPENDS is done only inside the portion of the makefiles that contains a definition of a package.

I'm merging this.

@a-gave
a-gave merged commit 8b5ebdb into libremesh:master Aug 21, 2026
11 checks passed
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.

2 participants