From e1ed78458e08b1c4fd0650fcf2e6fe5b8f739ff7 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven Date: Fri, 9 Sep 2022 13:04:07 +0000 Subject: [PATCH] Pull request #85: Remove openthread ci scripts Merge in WMN_TOOLS/matter from remove_openthread_ci_scripts to silabs Squashed commit of the following: commit 17a94f1e8eb2560a10d7eee409582596b48d72a6 Author: jepenven-silabs Date: Thu Sep 8 14:31:47 2022 -0400 fix typo commit 9a44fa8cba80bada7c35673427032b6ebea18f8d Author: jepenven-silabs Date: Thu Sep 8 12:00:47 2022 -0400 Fix stash commit 0362349ec838c52b43a5d26fe208018bf750535b Author: Yulina Shu Date: Wed Sep 7 23:47:57 2022 +0000 use build-farm-large for big job commit c5660b1a3d78f1e71b8d517682ee4137ed5e9221 Author: jepenven-silabs Date: Thu Sep 8 08:33:15 2022 -0400 Remove OpenThread python scripts build --- Jenkinsfile | 29 ++++++----- .../build_openthread_csa_examples.py | 48 ------------------- 2 files changed, 18 insertions(+), 59 deletions(-) delete mode 100644 silabs_ci_scripts/build_openthread_csa_examples.py diff --git a/Jenkinsfile b/Jenkinsfile index d45c35da751b01..8a3594003d424e 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,8 @@ buildOverlayDir = '' RELEASE_NAME='22Q4-GA' stashFolder = '' chiptoolPath = '' - +buildFarmLabel = 'Build-Farm' +buildFarmLargeLabel = 'Build-Farm-Large' secrets = [[path: 'teams/gecko-sdk/app/svc_gsdk', engineVersion: 2, secretValues: [[envVar: 'SL_PASSWORD', vaultKey: 'password'], @@ -70,8 +71,6 @@ def initWorkspaceAndScm() } -buildFarmLabel = 'Build-Farm' - def runInWorkspace(Map args, Closure cl) { return { @@ -137,26 +136,34 @@ def bootstrapWorkspace() } } -def buildOpenThreadExample(String name, String board) +def buildOpenThreadExample(String app, String board) { actionWithRetry { - node(buildFarmLabel) + node(buildFarmLargeLabel) { def workspaceTmpDir = createWorkspaceOverlay(advanceStageMarker.getBuildStagesList(), buildOverlayDir) def dirPath = workspaceTmpDir + createWorkspaceOverlay.overlayMatterPath def saveDir = 'matter/' + def buildRelease = true + def releaseString = "\"chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false is_debug=false show_qr_code=false chip_build_libshell=false enable_openthread_cli=false chip_openthread_ftd=true\"" + dir(dirPath) { withDockerContainer(image: "connectedhomeip/chip-build-efr32:0.5.64", args: "-u root") { // CSA Examples build withEnv(['PW_ENVIRONMENT_ROOT='+dirPath]) { - sh "python3 ./silabs_ci_scripts/build_openthread_csa_examples.py \"${name}\" \"${board}\"" + + sh "./scripts/examples/gn_efr32_example.sh ./examples/${app}/efr32 ./out/CSA/${app}/OpenThread/standard ${board}" + + if(buildRelease) { + sh "./scripts/examples/gn_efr32_example.sh ./examples/${app}/efr32 ./out/CSA/${app}/OpenThread/release ${board} ${releaseString}" + } } } - stash name: 'OpenThreadExamples-'+"${name}"+"-"+"${board}", includes: 'out/CSA/*/OpenThread/release/**/*.map ,'+ + stash name: 'OpenThreadExamples-'+"${app}"+"-"+"${board}", includes: 'out/CSA/*/OpenThread/release/**/*.map ,'+ 'out/CSA/*/OpenThread/standard/**/*.s37 ,' + 'out/CSA/*/OpenThread/release/**/*.s37 ' @@ -174,7 +181,7 @@ def buildOpenThreadExample(String name, String board) def buildSilabsCustomOpenThreadExamples(String board) { actionWithRetry { - node(buildFarmLabel) + node(buildFarmLargeLabel) { def workspaceTmpDir = createWorkspaceOverlay(advanceStageMarker.getBuildStagesList(), buildOverlayDir) @@ -208,7 +215,7 @@ def buildSilabsCustomOpenThreadExamples(String board) def buildWiFiLighting() { actionWithRetry { - node(buildFarmLabel) + node(buildFarmLargeLabel) { def workspaceTmpDir = createWorkspaceOverlay(advanceStageMarker.getBuildStagesList(), buildOverlayDir) @@ -254,7 +261,7 @@ def buildWiFiLighting() def buildWiFiLock() { actionWithRetry { - node(buildFarmLabel) + node(buildFarmLargeLabel) { def workspaceTmpDir = createWorkspaceOverlay(advanceStageMarker.getBuildStagesList(), buildOverlayDir) @@ -301,7 +308,7 @@ def buildWiFiLock() def buildWiFiExamples() { actionWithRetry { - node(buildFarmLabel) + node(buildFarmLargeLabel) { def workspaceTmpDir = createWorkspaceOverlay(advanceStageMarker.getBuildStagesList(), buildOverlayDir) diff --git a/silabs_ci_scripts/build_openthread_csa_examples.py b/silabs_ci_scripts/build_openthread_csa_examples.py deleted file mode 100644 index d1523228519801..00000000000000 --- a/silabs_ci_scripts/build_openthread_csa_examples.py +++ /dev/null @@ -1,48 +0,0 @@ -####Imports -import subprocess -import sys -import json -from pathlib import Path - - -#Defines -BUILDS = {"OpenThread"} -standard_build = ("standard", "") -release_build = ("release", - "\"chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false is_debug=false show_qr_code=false chip_build_libshell=false enable_openthread_cli=false chip_openthread_ftd=true\"") -building_command = './scripts/examples/gn_efr32_example.sh ./examples/{app}/efr32 ./out/CSA/{app}{network} {board} {buildArguments}' - - -if (len(sys.argv) > 1): - APPS = {sys.argv[1]} -else: - APPS = {"lighting-app", "lock-app", "light-switch-app", "window-app"} - -if (len(sys.argv) > 2): - BOARDS = {sys.argv[2]} -else: - BOARDS = {"BRD4161A", "BRD4186A"} - -if (len(sys.argv) > 3): - if(sys.argv[3] == "standard"): - BUILD_TYPES = {standard_build} - elif(sys.argv[3] == "release"): - BUILD_TYPES = {release_build} -else: - BUILD_TYPES = {standard_build, release_build} - - -print(BUILD_TYPES) -print(BOARDS) -print(APPS) - -#Build everything -for app_name in APPS: - for build in BUILDS: - for board in BOARDS: - for build_type in BUILD_TYPES: - - #Build all examples - c = building_command.format(app=app_name, network= "/" + build + "/" + build_type[0], board=board, buildArguments=build_type[1]) - val = subprocess.check_call(c, shell= True) -