Skip to content

Commit

Permalink
Example GCB config (no test)
Browse files Browse the repository at this point in the history
  • Loading branch information
aBozowski committed May 24, 2022
1 parent 187da61 commit 3363130
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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):
Expand Down
43 changes: 43 additions & 0 deletions integrations/cloudbuild/chef.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3363130

Please sign in to comment.