Skip to content

Commit b23afdf

Browse files
author
tro
authored
greengrass-lite recipe: add option to build autorev for nightly tests (#294)
1 parent ac8b740 commit b23afdf

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

.github/workflows/nightly-autorev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,5 @@ jobs:
5050
export DEVICE=${{ matrix.device }} && \
5151
export IMAGE=${{ matrix.image }} && \
5252
echo "SRCREV:pn-greengrass-lite = \"${AUTOREV}\"" >> conf/local.conf && \
53+
echo "DISABLE_FETCHCONTENT:pn-greengrass-lite = \"1\"" >> conf/local.conf && \
5354
bitbake $IMAGE'

meta-aws-demos/recipes-iot/aws-iot-greengrass/greengrass-lite_git.bb

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ LDFLAGS:append:libc-musl = " -largp"
3232
# THIS IS DISABLED IF exernalsrc is enabled
3333
SRC_URI = "\
3434
git://github.com/aws-greengrass/aws-greengrass-lite.git;protocol=https;branch=main;name=ggl \
35-
git://github.com/FreeRTOS/coreMQTT.git;protocol=https;branch=main;name=mqtt;destsuffix=${S}/thirdparty/core_mqtt \
36-
git://github.com/FreeRTOS/backoffAlgorithm.git;protocol=https;branch=main;name=backoff;destsuffix=${S}/thirdparty/backoff_algorithm \
37-
git://github.com/aws/SigV4-for-AWS-IoT-embedded-sdk.git;protocol=https;branch=main;name=sigv4;destsuffix=${S}/thirdparty/aws_sigv4 \
38-
git://github.com/aws-greengrass/aws-greengrass-sdk-lite.git;protocol=https;branch=main;name=sdk;destsuffix=${S}/thirdparty/ggl_sdk \
35+
${@'' if d.getVar('DISABLE_FETCHCONTENT') else 'git://github.com/FreeRTOS/coreMQTT.git;protocol=https;branch=main;name=mqtt;destsuffix=${S}/thirdparty/core_mqtt'} \
36+
${@'' if d.getVar('DISABLE_FETCHCONTENT') else 'git://github.com/FreeRTOS/backoffAlgorithm.git;protocol=https;branch=main;name=backoff;destsuffix=${S}/thirdparty/backoff_algorithm'} \
37+
${@'' if d.getVar('DISABLE_FETCHCONTENT') else 'git://github.com/aws/SigV4-for-AWS-IoT-embedded-sdk.git;protocol=https;branch=main;name=sigv4;destsuffix=${S}/thirdparty/aws_sigv4'} \
38+
${@'' if d.getVar('DISABLE_FETCHCONTENT') else 'git://github.com/aws-greengrass/aws-greengrass-sdk-lite.git;protocol=https;branch=main;name=sdk;destsuffix=${S}/thirdparty/ggl_sdk'} \
3939
file://001-disable_strip.patch \
4040
${@bb.utils.contains('PACKAGECONFIG','fleetprovisioning','file://004-fix-fleet-provisioning-circular-dependency.patch','',d)} \
4141
file://greengrass-lite.yaml \
@@ -57,10 +57,11 @@ SRCREV_sigv4 = "f0409ced6c2c9430f0e972019b7e8f20bbf58f4e"
5757
SRCREV_sdk = "9f9b95363d6de4c68ee5d34ba5c6065b4c1b31fb"
5858

5959
EXTRA_OECMAKE:append = " \
60-
-DFETCHCONTENT_SOURCE_DIR_CORE_MQTT=${S}/thirdparty/core_mqtt \
61-
-DFETCHCONTENT_SOURCE_DIR_BACKOFF_ALGORITHM=${S}/thirdparty/backoff_algorithm \
62-
-DFETCHCONTENT_SOURCE_DIR_AWS_SIGV4=${S}/thirdparty/aws_sigv4 \
63-
-DFETCHCONTENT_SOURCE_DIR_GGL_SDK=${S}/thirdparty/ggl_sdk \
60+
${@'' if d.getVar('DISABLE_FETCHCONTENT') else '-DFETCHCONTENT_SOURCE_DIR_CORE_MQTT=${S}/thirdparty/core_mqtt'} \
61+
${@'' if d.getVar('DISABLE_FETCHCONTENT') else '-DFETCHCONTENT_SOURCE_DIR_BACKOFF_ALGORITHM=${S}/thirdparty/backoff_algorithm'} \
62+
${@'' if d.getVar('DISABLE_FETCHCONTENT') else '-DFETCHCONTENT_SOURCE_DIR_AWS_SIGV4=${S}/thirdparty/aws_sigv4'} \
63+
${@'' if d.getVar('DISABLE_FETCHCONTENT') else '-DFETCHCONTENT_SOURCE_DIR_GGL_SDK=${S}/thirdparty/ggl_sdk'} \
64+
${@'-DFETCHCONTENT_FULLY_DISCONNECTED=OFF' if d.getVar('DISABLE_FETCHCONTENT') else ''} \
6465
"
6566

6667
SRCREV_FORMAT .= "_ggl_core_mqtt_backoff_aws_sigv4_ggl_sdk"
@@ -73,6 +74,8 @@ do_configure:prepend() {
7374
grep -q ${SRCREV_sdk} ${S}/fc_deps.json || bbfatal "ERROR: dependency version mismatch, please update 'SRCREV_sdk'!"
7475
}
7576

77+
do_configure[network] = "${@'1' if d.getVar('DISABLE_FETCHCONTENT') else '0'}"
78+
7679
S = "${WORKDIR}/git"
7780

7881
# Fleet provisioning configuration - overwrite in your local config, e.g. IOT_DATA_ENDPOINT:pn-greengrass-lite = "xxx"
@@ -261,3 +264,7 @@ SSTATE_SCAN_FILES:append = " ${@' ${CLAIM_CERT_PATH} ${CLAIM_KEY_PATH} ${ROOT_CA
261264
USERADD_PACKAGES = "${PN}"
262265
GROUPADD_PARAM:${PN} = "-r ${gg_group}; -r ${ggc_group}"
263266
USERADD_PARAM:${PN} = "-r -M -N -g ${gg_group} -s /bin/false ${gg_user}; -r -M -N -g ${ggc_group} -s /bin/false ${ggc_user}"
267+
268+
# for testing you can add this to your local.conf to test the latest version from upstream git main branch
269+
# SRCREV_ggl:pn-greengrass-lite = "${AUTOREV}"
270+
# DISABLE_FETCHCONTENT:pn-greengrass-lite = "1"

0 commit comments

Comments
 (0)