Skip to content

Commit 8b5ebdb

Browse files
authored
Merge pull request #1272 from a-gave/ci/build-firmware
ci: build-firmware: SDK use EXTRA_DEPENDS for lime-packages to speed up the compilation
2 parents 1924fed + ae5f984 commit 8b5ebdb

17 files changed

Lines changed: 34 additions & 17 deletions

File tree

.github/workflows/build-firmware.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ on:
4141
required: false
4242
type: boolean
4343
default: false
44+
build_lime_packages_deps:
45+
description: "Build all lime-packages dependencies, increases compilation time of feeds"
46+
required: false
47+
type: boolean
48+
default: false
4449
schedule:
4550
# Daily lab sweep at 06:00 UTC (03:00 ART).
4651
- cron: "0 6 * * *"
@@ -104,13 +109,24 @@ jobs:
104109
restore-keys: |
105110
lime-feed-v3-${{ matrix.arch }}-${{ matrix.openwrt_release }}-${{ needs.prepare-matrix.outputs.feed_hash }}-
106111
112+
- name: Prevent the compilation of all dependencies of the libremesh packages
113+
if: steps.cache-feed.outputs.cache-hit != 'true' && github.event.inputs.build_lime_packages_deps != 'true'
114+
run: |
115+
shopt -s nullglob
116+
sed -i \
117+
-e '/^define Package\/\$(PKG_NAME)[^/]*$/,/^endef$/ s|DEPENDS:=|EXTRA_DEPENDS:=|g' \
118+
-e '/^define Package\/\$(PKG_NAME)[^/]*$/,/^endef$/ s/+\($(PKG_NAME)[a-zA-Z0-9_-]*\)/\1 (>0),/g' \
119+
-e '/^define Package\/\$(PKG_NAME)[^/]*$/,/^endef$/ s/+\([a-zA-Z_-][a-zA-Z0-9_-]*\)/\1 (>0),/g' \
120+
-e '/^define Package\/\$(PKG_NAME)[^/]*$/,/^endef$/ s|,$||g' \
121+
$(grep -l "PKGARCH:=all" packages/*/Makefile)
122+
107123
- name: Build packages with openwrt/gh-action-sdk
108124
if: steps.cache-feed.outputs.cache-hit != 'true'
109125
uses: openwrt/gh-action-sdk@v9
110126
env:
111127
ARCH: ${{ matrix.sdk_arch }}
112128
FEEDNAME: lime_packages
113-
PACKAGES: ${{ needs.prepare-matrix.outputs.lime_packages_list }} ${{ matrix.extra_packages }}
129+
# PACKAGES: ${{ needs.prepare-matrix.outputs.lime_packages_list }} ${{ matrix.extra_packages }}
114130
# Extra src-git feeds, space-separated `<type>|<name>|<url>[^<sha>]`
115131
# entries; gh-action-sdk appends each to feeds.conf. Pinning the
116132
# full 40-char SHA is required (smart-HTTP rejects short prefixes).
@@ -121,6 +137,7 @@ jobs:
121137
# feed downstream with ImageBuilder's ipkg-make-index / apk mkndx.
122138
INDEX: "0"
123139
IGNORE_ERRORS: "n m y"
140+
# V: "sc"
124141

125142
- name: Diagnose feed build output
126143
if: steps.cache-feed.outputs.cache-hit != 'true'

packages/altermundi-grafana/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ define Package/$(PKG_NAME)
1818
+prometheus-node-exporter-lua-wifi-stations-extra \
1919
+prometheus-node-exporter-lua-wifi-survey \
2020
+prometheus-node-exporter-lua-wifi-params \
21-
+prometheus-node-exporter-lua-location-latlon \
21+
+prometheus-node-exporter-lua-location-latlon
2222

2323
endef
2424

packages/check-date-http/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ define Package/$(PKG_NAME)
99
CATEGORY:=LibreMesh
1010
MAINTAINER:=Gioacchino Mazzurco <gio@altermundi.net>
1111
URL:=http://libremesh.org
12-
DEPENDS:=+libuci-lua +lua
12+
DEPENDS:=+libuci-lua +lua
1313
PKGARCH:=all
1414
endef
1515

packages/lime-eth-config/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ define Package/$(PKG_NAME)
1111
CATEGORY:=LibreMesh
1212
MAINTAINER:=Asociación Civil Altermundi <info@altermundi.net>
1313
URL:=http://libremesh.org
14-
DEPENDS:=+libubus-lua +lime-system +lua +luci-lib-jsonc
14+
DEPENDS:=+libubus-lua +lime-system +lua +luci-lib-jsonc
1515
PKGARCH:=all
1616
endef
1717

packages/miniserver-client/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ define Package/$(PKG_NAME)
1818
+prometheus-node-exporter-lua-wifi-stations-extra \
1919
+prometheus-node-exporter-lua-wifi-survey \
2020
+prometheus-node-exporter-lua-wifi-params \
21-
+prometheus-node-exporter-lua-location-latlon \
21+
+prometheus-node-exporter-lua-location-latlon
2222

2323
endef
2424

packages/shared-state-babel_links_info/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ define Package/$(PKG_NAME)
1111
TITLE:=Babel links module for shared-state
1212
MAINTAINER:=Asociación Civil Altermundi <info@altermundi.net>
1313
DEPENDS:=+lua +luci-lib-jsonc +ubus-lime-utils \
14-
+libubus-lua +shared-state-ref_state_commons shared-state-async
14+
+libubus-lua +shared-state-ref_state_commons +shared-state-async
1515
PKGARCH:=all
1616
endef
1717

packages/shared-state-babeld_hosts/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ define Package/$(PKG_NAME)
1010
MAINTAINER:=Gioacchino Mazzurco <gio@altermundi.net>
1111
URL:=http://libremesh.org
1212
DEPENDS:=+hotplug-initd-services \
13-
+lua +luci-lib-jsonc shared-state
13+
+lua +luci-lib-jsonc +shared-state
1414
PKGARCH:=all
1515
endef
1616

packages/shared-state-bat_links_info/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ define Package/$(PKG_NAME)
1212
TITLE:=Batman protocol links information module for shared-state
1313
MAINTAINER:= Javier <jjorge@inti.gob.ar>
1414
DEPENDS:=+lua +luci-lib-jsonc +ubus-lime-utils \
15-
+lime-system +batctl-default +shared-state-ref_state_commons shared-state-async
15+
+lime-system +batctl-default +shared-state-ref_state_commons +shared-state-async
1616
PKGARCH:=all
1717
endef
1818

packages/shared-state-dnsmasq_hosts/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ define Package/$(PKG_NAME)
1010
MAINTAINER:=Gioacchino Mazzurco <gio@altermundi.net>
1111
URL:=http://libremesh.org
1212
DEPENDS:=+lua +luci-lib-jsonc \
13-
shared-state
13+
+shared-state
1414
PKGARCH:=all
1515
endef
1616

packages/shared-state-dnsmasq_leases/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ define Package/$(PKG_NAME)
1010
MAINTAINER:=Gioacchino Mazzurco <gio@altermundi.net>
1111
URL:=http://libremesh.org
1212
DEPENDS:=+libuci-lua +lua \
13-
+luci-lib-jsonc shared-state +shared-state-dnsmasq_hosts \
13+
+luci-lib-jsonc +shared-state +shared-state-dnsmasq_hosts \
1414
+luci-lib-nixio
1515
PKGARCH:=all
1616
endef

0 commit comments

Comments
 (0)