From 33631309cf882c16ac7709337ffdc48fa5667108 Mon Sep 17 00:00:00 2001 From: Austin Bozowski Date: Tue, 24 May 2022 21:30:03 +0000 Subject: [PATCH] Example GCB config (no test) --- examples/chef/chef.py | 2 ++ integrations/cloudbuild/chef.yaml | 43 +++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 integrations/cloudbuild/chef.yaml diff --git a/examples/chef/chef.py b/examples/chef/chef.py index ef6077cb855776..3be65ab7a425b1 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -260,6 +260,7 @@ def main(argv: Sequence[str]) -> None: # if options.build_all: + print("Building all chef examples") platforms_and_outputs = chef_util.cd_platforms_and_outputs for device in os.listdir(chef_devices_dir): target_file_ext = ".zap" @@ -268,6 +269,7 @@ def main(argv: Sequence[str]) -> None: for platform, directory in platforms_and_outputs.items(): output_dir = os.path.join(_CHEF_SCRIPT_PATH, directory) command = './chef.py -czbr -d {} -t {}'.format(device_name, platform) + print(f"Building {command}") subprocess.check_call(command, cwd=_CHEF_SCRIPT_PATH, shell=True) archive_prefix = "/workspace/artifacts/" if not os.path.exists(archive_prefix): diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml new file mode 100644 index 00000000000000..079c0b4788f249 --- /dev/null +++ b/integrations/cloudbuild/chef.yaml @@ -0,0 +1,43 @@ +steps: + - name: "connectedhomeip/chip-build-vscode:0.5.75" + env: + - PW_ENVIRONMENT_ROOT=/pwenv + args: + - "-c" + - source ./scripts/bootstrap.sh + id: Bootstrap + entrypoint: /usr/bin/bash + volumes: + - name: pwenv + path: /pwenv + timeout: 900s + + - name: "connectedhomeip/chip-build-vscode:0.5.75" + env: + - PW_ENVIRONMENT_ROOT=/pwenv + args: + - >- + ./examples/chef/chef.py --build_all + id: CompileAll + waitFor: + - Bootstrap + entrypoint: ./scripts/run_in_build_env.sh + volumes: + - name: pwenv + path: /pwenv + +logsBucket: matter-build-automation-build-logs + +# Global timeout for all steps +timeout: 14400s + +artifacts: + objects: + location: "gs://matter-build-automation-artifacts/$PROJECT_ID/$COMMIT_SHA/" + paths: ["/workspace/artifacts/*.tar.gz"] + +# Using higher CPU machines generally speeds up builds, except bootstrap is always +# slow. +# options: +# machineType: "E2_HIGHCPU_32" +# diskSizeGb: 200