Skip to content

Commit 37396d8

Browse files
authored
ci: force build of new/updates recipes (#797)
In a PR test build, it's possible to have a new recipe (or updates with a bbappend) which is not included in any image we build. We could do a 'world' build but that would be really expensive. Instead this change tries to catch any updated .bb or .bbappend file, and force a bitbake build. If the recipe was already built as part of the image, it should be a quick no-op. If the recipe was not built, then it's a good thing to check that it builds!
2 parents fe0f3ca + df5802c commit 37396d8

File tree

12 files changed

+152
-49
lines changed

12 files changed

+152
-49
lines changed

.github/actions/compile/action.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,33 @@ runs:
2626
name: kas-lock
2727
path: ci/
2828

29-
- name: OE sstate-cache and downloads
29+
- name: Setup build variables and sstate-cache
3030
shell: bash
3131
run: |
3232
# use a monthly sstate cache folder
3333
# keep current and last month to allow smooth end of month transition
3434
rm -rf ${{inputs.cache_dir}}/sstate-cache-$(date -d '2 months ago' '+%Y-%m')
3535
echo "DL_DIR=${{inputs.cache_dir}}/downloads" >> $GITHUB_ENV
3636
echo "SSTATE_DIR=${{inputs.cache_dir}}/sstate-cache-$(date '+%Y-%m')" >> $GITHUB_ENV
37+
echo "KAS_WORK_DIR=$PWD/../kas" >> $GITHUB_ENV
3738
38-
- name: Kas build
39+
- name: Dump kas-build yaml
3940
shell: bash
4041
run: |
41-
export KAS_WORK_DIR=$PWD/../kas
4242
mkdir $KAS_WORK_DIR
4343
${{inputs.kas}} dump --resolve-env --resolve-local --resolve-refs \
4444
ci/mirror.yml:ci/${{ inputs.machine }}.yml${{ inputs.distro_yaml }}${{ inputs.kernel_yaml }} > kas-build.yml
45+
46+
- name: Kas qcom world build
47+
shell: bash
48+
run: |
49+
${{inputs.kas}} build ci/mirror.yml:ci/${{ inputs.machine }}.yml${{ inputs.distro_yaml }}${{ inputs.kernel_yaml }}:ci/world.yml
50+
ci/kas-container-shell-helper.sh ci/yocto-pybootchartgui.sh
51+
mv $KAS_WORK_DIR/build/buildchart.svg buildchart-world.svg
52+
53+
- name: Kas build images
54+
shell: bash
55+
run: |
4556
${{inputs.kas}} build ci/mirror.yml:ci/${{ inputs.machine }}.yml${{ inputs.distro_yaml }}${{ inputs.kernel_yaml }}
4657
ci/kas-container-shell-helper.sh ci/yocto-pybootchartgui.sh
4758
mv $KAS_WORK_DIR/build/buildchart.svg .
@@ -53,7 +64,9 @@ runs:
5364
- uses: actions/upload-artifact@v4
5465
with:
5566
name: buildchart-${{ inputs.distro_name }}${{ inputs.kernel_dirname }}-${{ inputs.machine }}
56-
path: buildchart.svg
67+
path: |
68+
buildchart.svg
69+
buildchart-world.svg
5770
5871
- uses: actions/upload-artifact@v4
5972
with:

ci/base.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ machine: unset
4747

4848
target:
4949
- core-image-base
50-
- packagegroup-qcom-ci

ci/qcom-distro.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,3 @@ local_conf_header:
3131

3232
target:
3333
- qcom-multimedia-image
34-
- packagegroup-qcom-ci

ci/world.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/siemens/kas/master/kas/schema-kas.json
2+
3+
header:
4+
version: 14
5+
6+
local_conf_header:
7+
world_build: |
8+
EXCLUDE_FROM_WORLD = "1"
9+
EXCLUDE_FROM_WORLD:layer-qcom = "0"
10+
#EXCLUDE_FROM_WORLD:layer-qcom-distro = "0"
11+
12+
target:
13+
- world

classes-recipe/image_types_qcom.bbclass

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ IMAGE_TYPES += "qcomflash"
77

88
QCOM_BOOT_FIRMWARE ?= ""
99

10-
QCOM_ESP_IMAGE ?= "esp-qcom-image"
10+
QCOM_ESP_IMAGE ?= "${@bb.utils.contains("MACHINE_FEATURES", "efi", "esp-qcom-image", "", d)}"
1111
QCOM_ESP_FILE ?= "${@'efi.bin' if d.getVar('QCOM_ESP_IMAGE') else ''}"
1212

13-
# ARMv7 machines don't use EFI / UKI
14-
QCOM_ESP_IMAGE:qcom-armv7a = ""
15-
1613
# There is currently no upstream-compatible way for the firmware to
1714
# identify and load the correct DTB from a combined-dtb that contains all
1815
# dtbs defined in KERNEL_DEVICETREE, so pick the first individual image

conf/machine/qcom-armv8a.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require conf/machine/include/qcom-common.inc
22
require conf/machine/include/arm/arch-armv8a.inc
33

4-
MACHINE_FEATURES += "screen ext2"
4+
MACHINE_FEATURES += "screen ext2 efi"
55

66
# UFS partitions in 820/845/RB5 setup with 4096 logical sector size
77
EXTRA_IMAGECMD:ext4 += " -b 4096 "

recipes-bsp/packagegroups/packagegroup-qcom-ci.bb

Lines changed: 0 additions & 25 deletions
This file was deleted.

recipes-bsp/packagegroups/packagegroup-qcom-graphics.bb

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
From 2795c0549215aaace165d6a98356923bddc71305 Mon Sep 17 00:00:00 2001
2+
From: Nicolas Dechesne <[email protected]>
3+
Date: Thu, 11 Sep 2025 19:10:27 +0200
4+
Subject: [PATCH] scripts: use /usr/bin/env python3
5+
6+
Using #!/usr/bin/env python3 instead of #!/usr/bin/python3 in the
7+
shebang line of a script is generally considered better practice for
8+
portability and flexibility.
9+
10+
* env uses the user's PATH environment variable to locate python3
11+
* Using env avoids hardcoding the path, making your script more
12+
portable.
13+
* Works well with virtual environments:
14+
15+
Signed-off-by: Nicolas Dechesne <[email protected]>
16+
Upstream-Status: Submitted [https://github.com/qca/qca-swiss-army-knife/pull/12]
17+
---
18+
tools/scripts/ath10k/ath10k-bdencoder | 2 +-
19+
tools/scripts/ath10k/ath10k-fw-repo | 2 +-
20+
tools/scripts/ath10k/ath10k-fwencoder | 2 +-
21+
tools/scripts/ath11k/ath11k-fw-repo | 2 +-
22+
tools/scripts/ath11k/ath11k-fwencoder | 2 +-
23+
tools/scripts/ath12k/ath12k-fw-repo | 2 +-
24+
tools/scripts/ath12k/ath12k-fwencoder | 2 +-
25+
tools/scripts/ath9k/read-powers | 2 +-
26+
8 files changed, 8 insertions(+), 8 deletions(-)
27+
28+
diff --git a/tools/scripts/ath10k/ath10k-bdencoder b/tools/scripts/ath10k/ath10k-bdencoder
29+
index 964b2f7..9a57e1f 100755
30+
--- a/tools/scripts/ath10k/ath10k-bdencoder
31+
+++ b/tools/scripts/ath10k/ath10k-bdencoder
32+
@@ -1,4 +1,4 @@
33+
-#!/usr/bin/python3
34+
+#!/usr/bin/env python3
35+
#
36+
# Copyright (c) 2015 Qualcomm Atheros, Inc.
37+
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
38+
diff --git a/tools/scripts/ath10k/ath10k-fw-repo b/tools/scripts/ath10k/ath10k-fw-repo
39+
index 8c5c977..e86f916 100755
40+
--- a/tools/scripts/ath10k/ath10k-fw-repo
41+
+++ b/tools/scripts/ath10k/ath10k-fw-repo
42+
@@ -1,4 +1,4 @@
43+
-#!/usr/bin/python3
44+
+#!/usr/bin/env python3
45+
#
46+
# Copyright (c) 2016 Qualcomm Atheros, Inc.
47+
# Copyright (c) 2018, The Linux Foundation. All rights reserved.
48+
diff --git a/tools/scripts/ath10k/ath10k-fwencoder b/tools/scripts/ath10k/ath10k-fwencoder
49+
index ceb26b4..7c2f63c 100755
50+
--- a/tools/scripts/ath10k/ath10k-fwencoder
51+
+++ b/tools/scripts/ath10k/ath10k-fwencoder
52+
@@ -1,4 +1,4 @@
53+
-#!/usr/bin/python3
54+
+#!/usr/bin/env python3
55+
#
56+
# Copyright (c) 2012-2015 Qualcomm Atheros, Inc.
57+
#
58+
diff --git a/tools/scripts/ath11k/ath11k-fw-repo b/tools/scripts/ath11k/ath11k-fw-repo
59+
index 15c7b9b..0169642 100755
60+
--- a/tools/scripts/ath11k/ath11k-fw-repo
61+
+++ b/tools/scripts/ath11k/ath11k-fw-repo
62+
@@ -1,4 +1,4 @@
63+
-#!/usr/bin/python3
64+
+#!/usr/bin/env python3
65+
#
66+
# Copyright (c) 2016 Qualcomm Atheros, Inc.
67+
# Copyright (c) 2018,2020 The Linux Foundation. All rights reserved.
68+
diff --git a/tools/scripts/ath11k/ath11k-fwencoder b/tools/scripts/ath11k/ath11k-fwencoder
69+
index 9889393..cb8b373 100755
70+
--- a/tools/scripts/ath11k/ath11k-fwencoder
71+
+++ b/tools/scripts/ath11k/ath11k-fwencoder
72+
@@ -1,4 +1,4 @@
73+
-#!/usr/bin/python3
74+
+#!/usr/bin/env python3
75+
#
76+
# Copyright (c) 2012-2015 Qualcomm Atheros, Inc.
77+
# Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
78+
diff --git a/tools/scripts/ath12k/ath12k-fw-repo b/tools/scripts/ath12k/ath12k-fw-repo
79+
index ac627d8..d6007d1 100755
80+
--- a/tools/scripts/ath12k/ath12k-fw-repo
81+
+++ b/tools/scripts/ath12k/ath12k-fw-repo
82+
@@ -1,4 +1,4 @@
83+
-#!/usr/bin/python3
84+
+#!/usr/bin/env python3
85+
#
86+
# Copyright (c) 2016 Qualcomm Atheros, Inc.
87+
# Copyright (c) 2018,2020 The Linux Foundation. All rights reserved.
88+
diff --git a/tools/scripts/ath12k/ath12k-fwencoder b/tools/scripts/ath12k/ath12k-fwencoder
89+
index f9d2955..b512ce1 100755
90+
--- a/tools/scripts/ath12k/ath12k-fwencoder
91+
+++ b/tools/scripts/ath12k/ath12k-fwencoder
92+
@@ -1,4 +1,4 @@
93+
-#!/usr/bin/python3
94+
+#!/usr/bin/env python3
95+
#
96+
# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved
97+
# Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
98+
diff --git a/tools/scripts/ath9k/read-powers b/tools/scripts/ath9k/read-powers
99+
index 535747d..db0ed5b 100755
100+
--- a/tools/scripts/ath9k/read-powers
101+
+++ b/tools/scripts/ath9k/read-powers
102+
@@ -1,4 +1,4 @@
103+
-#!/usr/bin/python3
104+
+#!/usr/bin/env python3
105+
#
106+
# Copyright (c) 2010 Atheros Communications Inc.
107+
#
108+
--
109+
2.34.1
110+

recipes-devtools/qca-swiss-army-knife/qca-swiss-army-knife_git.bb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ SRC_URI = " \
1212
file://ath10k-generate-pci-board-2_json.sh \
1313
file://ath11k-generate-pci-board-2_json.sh \
1414
file://ath11k-generate-ahb-board-2_json.sh \
15+
file://0001-scripts-use-usr-bin-env-python3.patch \
1516
"
1617

1718
PV = "0.0+"

0 commit comments

Comments
 (0)