Skip to content

Commit

Permalink
Chef CI (project-chip#18859)
Browse files Browse the repository at this point in the history
* Squashed commit of the following:

commit bc116c2
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 19:53:36 2022 +0000

    Update manifest

commit e89bdda
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 19:48:58 2022 +0000

    Resync workflows with master, delete test example

commit 6da917b
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 19:41:53 2022 +0000

    Workflow naming

commit 80506eb
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 19:36:45 2022 +0000

    Help messages

commit c1724ec
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 19:29:19 2022 +0000

    Restyle

commit e24916f
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 19:21:06 2022 +0000

    Style

commit cdbc67c
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 19:02:23 2022 +0000

    Re run generate

commit 03361f7
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 18:48:10 2022 +0000

    Indent error

commit 82daba0
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 18:45:37 2022 +0000

    Further validate CI - expected fail now

commit d103893
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 08:06:27 2022 +0000

    TODO and err msg

commit b2e5cb3
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 07:59:28 2022 +0000

    Demo fix CI

commit d7dd6a2
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 07:41:13 2022 +0000

    More elegant CI fail

commit 51595e9
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 07:36:46 2022 +0000

    Missed

commit 4070d6f
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 07:35:26 2022 +0000

    Use cached files in GCB, test CI fail

commit bf89f5a
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 01:33:30 2022 +0000

    Flush buffers to fix stdout ordering

commit 3a9012b
Author: Austin Bozowski <[email protected]>
Date:   Thu May 26 00:54:40 2022 +0000

    Missed revert

commit c25a5bb
Author: Austin Bozowski <[email protected]>
Date:   Wed May 25 23:14:09 2022 +0000

    Minor

commit 1898821
Author: Austin Bozowski <[email protected]>
Date:   Wed May 25 22:33:36 2022 +0000

    Revert

commit 86de3af
Author: Austin Bozowski <[email protected]>
Date:   Wed May 25 20:40:59 2022 +0000

    Split builds

commit 56afe21
Author: Austin Bozowski <[email protected]>
Date:   Wed May 25 17:17:23 2022 +0000

    Revert

commit 88b88bd
Author: Austin Bozowski <[email protected]>
Date:   Wed May 25 02:14:42 2022 +0000

    Switch to stateful shell

commit 1b4a0f1
Author: Austin Bozowski <[email protected]>
Date:   Wed May 25 01:25:43 2022 +0000

    Minot

commit b26e609
Author: Austin Bozowski <[email protected]>
Date:   Wed May 25 01:04:16 2022 +0000

    Restyle

commit 547a361
Author: Austin Bozowski <[email protected]>
Date:   Wed May 25 00:11:17 2022 +0000

    Fix underscore

commit 9193a3d
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 23:54:53 2022 +0000

    Make CI uniform

commit 91c7a22
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 23:27:14 2022 +0000

    Fix indent error

commit 70c5780
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 22:44:04 2022 +0000

    Close quote

commit 7fad5ec
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 22:33:38 2022 +0000

    Test impact of bootstrap

commit 3363130
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 21:30:03 2022 +0000

    Example GCB config (no test)

commit 187da61
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 21:13:06 2022 +0000

    Compress outputs to tar file in GCB dir

commit 7c9866d
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 20:23:53 2022 +0000

    Move non re-used logic to chef, simplify

commit 921557a
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 20:10:35 2022 +0000

    Build all function

commit ba144ea
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 18:13:56 2022 +0000

    Refactor

commit e007f0e
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 16:55:23 2022 +0000

    clear allow list var

commit 0bc28e7
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 10:12:32 2022 +0000

    Disable git manifest

commit df7883e
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 10:10:10 2022 +0000

    Disable git manifest

commit 78752e2
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 10:01:23 2022 +0000

    Fetch

commit 5523fb1
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 09:52:56 2022 +0000

    Use included image

commit caafa2e
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 09:42:48 2022 +0000

    Image for CI

commit 929ef49
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 09:20:35 2022 +0000

    Install git

commit a09f7e5
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 09:16:28 2022 +0000

    validate zzz in workflow

commit 47c63e7
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 08:48:35 2022 +0000

    Delete dup declare

commit 603e531
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 08:45:30 2022 +0000

    Keep cached ZAP output fresh with validator function

commit 78a87ba
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 08:13:14 2022 +0000

    Filter zap cache to one file, Add zap version to manifest

commit 53156a1
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 07:35:19 2022 +0000

    Move zzz to chef dir, write manifest, new opt

commit a345cb5
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 06:23:33 2022 +0000

    typo

commit 8ee0354
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 06:05:53 2022 +0000

    Add shell

commit bb454c8
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 05:56:50 2022 +0000

    bootstrap

commit c4186dd
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 05:53:51 2022 +0000

    Split bootstrap, run script direct

commit 366d91b
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 03:21:15 2022 +0000

    Minor style

commit a2d973c
Author: Austin Bozowski <[email protected]>
Date:   Tue May 24 00:19:51 2022 +0000

    Temp delete other workflows, fix newlines

commit c29d9ed
Author: Austin Bozowski <[email protected]>
Date:   Mon May 23 23:40:11 2022 +0000

    Chef workflow

commit c3f2ee2
Author: Austin Bozowski <[email protected]>
Date:   Mon May 23 22:44:57 2022 +0000

    Add cached ZAP output

commit 6f04f9e
Author: Austin Bozowski <[email protected]>
Date:   Mon May 23 22:20:35 2022 +0000

    chef: fix path error, add options for cached zap

* Regen zzz after merge; job WAI

* Lic

* Squashed commit of the following:

commit 733c61d
Author: Austin Bozowski <[email protected]>
Date:   Sat May 28 01:29:36 2022 +0000

    Repair workflows for merge

commit 281c051
Author: Austin Bozowski <[email protected]>
Date:   Sat May 28 01:25:12 2022 +0000

    Fix build all but no test

commit 3e2ed8e
Author: Austin Bozowski <[email protected]>
Date:   Sat May 28 01:05:03 2022 +0000

    Re run generate_zzz and disable git check

commit 9cdf590
Author: Austin Bozowski <[email protected]>
Date:   Sat May 28 00:55:03 2022 +0000

    Fix dedent

commit d5bf603
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 23:07:06 2022 +0000

    Run restyle

commit 43ed453
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 22:58:10 2022 +0000

    Style

commit 8ec4bd8
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 22:44:20 2022 +0000

    Stateful shell

commit 29700a5
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 22:24:00 2022 +0000

    stateful shell

commit 2443fb3
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 22:07:10 2022 +0000

    Fix find and replace

commit 07db659
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 21:59:16 2022 +0000

    Test stateful shell

commit ecd2d00
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 21:49:16 2022 +0000

    Restyle

commit 4ff29bb
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 21:46:02 2022 +0000

    Important comment

commit ab9e2ed
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 21:39:14 2022 +0000

    isort

commit 321cfca
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 21:38:32 2022 +0000

    Flush print

commit 5d2fa9d
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 21:31:11 2022 +0000

    Reference and new print

commit 0499025
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 21:27:24 2022 +0000

    Ref

commit f1ad021
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 21:25:36 2022 +0000

    Suffix

commit 2ef6d3e
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 21:21:42 2022 +0000

    Refactor

commit 88b852a
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 20:56:58 2022 +0000

    OK

commit 37f91b1
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 20:24:26 2022 +0000

    Ref

commit 0216a73
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 20:10:37 2022 +0000

    Group

commit 7299fd7
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 20:07:36 2022 +0000

    Reference

commit 997124e
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 19:59:14 2022 +0000

    JSON

commit d7f26cb
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 19:40:01 2022 +0000

    Temp delete workflows

commit 9421c27
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 19:35:13 2022 +0000

    Refactor

commit 7264515
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 19:30:57 2022 +0000

    More refactor

commit 3f826ff
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 19:07:38 2022 +0000

    Begin refactor

commit b73ddd5
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 18:30:32 2022 +0000

    Comment

commit 161e92b
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 18:25:21 2022 +0000

    Comment, dedent, comment, fstring

commit 89ce50e
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 17:24:35 2022 +0000

    dedent and remove bundle placeholder

commit d3c7d98
Author: Austin Bozowski <[email protected]>
Date:   Fri May 27 17:17:40 2022 +0000

    Sort imports

* Fix indent

* Squashed commit of the following:

commit 76f7414
Author: Austin Bozowski <[email protected]>
Date:   Tue May 31 07:48:51 2022 +0000

    remove subproc

commit e66e064
Author: Austin Bozowski <[email protected]>
Date:   Tue May 31 07:38:41 2022 +0000

    Restore workflows

commit f1f308f
Author: Austin Bozowski <[email protected]>
Date:   Tue May 31 07:32:39 2022 +0000

    Restyle and test

commit bddb576
Author: Austin Bozowski <[email protected]>
Date:   Tue May 31 07:21:24 2022 +0000

    Style

commit 77f334e
Author: Austin Bozowski <[email protected]>
Date:   Tue May 31 07:16:09 2022 +0000

    MD5 memory

commit dd59f1e
Author: Austin Bozowski <[email protected]>
Date:   Tue May 31 07:04:36 2022 +0000

    Rename manifest

commit 1f570d4
Author: Austin Bozowski <[email protected]>
Date:   Tue May 31 06:59:55 2022 +0000

    Minor

commit 8692341
Author: Austin Bozowski <[email protected]>
Date:   Tue May 31 06:52:11 2022 +0000

    clean

commit 27656a5
Author: Austin Bozowski <[email protected]>
Date:   Tue May 31 06:34:53 2022 +0000

    Style

commit e31e668
Author: Austin Bozowski <[email protected]>
Date:   Tue May 31 06:34:17 2022 +0000

    Format

commit 6dbd4f3
Author: Austin Bozowski <[email protected]>
Date:   Tue May 31 06:23:25 2022 +0000

    Make validate better

commit c4a99f0
Author: Austin Bozowski <[email protected]>
Date:   Tue May 31 05:44:42 2022 +0000

    Restructure manifest

commit f6358a7
Author: Austin Bozowski <[email protected]>
Date:   Tue May 31 05:20:49 2022 +0000

    Pull only chef changes from update2

* Squashed commit of the following:

commit c1f4948
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 19:46:50 2022 +0000

    Restore workflows

commit 239b61c
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 19:42:00 2022 +0000

    Output

commit 0602dc1
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 19:34:09 2022 +0000

    Test

commit f92534c
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 19:31:52 2022 +0000

    Refs`

commit ccc6564
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 19:25:25 2022 +0000

    Helpful output

commit 0a1de0a
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 18:41:07 2022 +0000

    Fix git

commit cac8616
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 18:38:57 2022 +0000

    Finish git

commit 23ca784
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 18:21:11 2022 +0000

    Untested git

commit d8bb5b3
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 08:31:24 2022 +0000

    Save command

commit beb3b77
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 08:17:48 2022 +0000

    Repair

commit 5aadacf
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 08:15:50 2022 +0000

    test

commit 7bb9a17
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 08:08:53 2022 +0000

    Format

commit 04a966e
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 07:56:02 2022 +0000

    RM workflows

commit 5474f72
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 07:54:41 2022 +0000

    Shell

commit ede604c
Author: Austin Bozowski <[email protected]>
Date:   Wed Jun 1 07:35:53 2022 +0000

    Merge from pull/19006

* chef generate_zzz

* Simplify md5

* Restyle, dedent, fix instructions

* Missed type hint

* Missed return code

* Squashed commit of the following:

commit 2ecd59c
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 01:47:42 2022 +0000

    [no ci] restore workflows

commit 1fca56e
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 01:46:24 2022 +0000

    Clean

commit c91c923
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 01:39:37 2022 +0000

    Style

commit 950d454
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 01:32:32 2022 +0000

    generate_zzz

commit b151b26
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 01:31:41 2022 +0000

    Update help text

commit 576f163
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 01:27:13 2022 +0000

    fix dead ref

commit 27ea5b5
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 01:24:54 2022 +0000

    validate should break now

commit c8762f6
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 01:10:31 2022 +0000

    docstring

commit 69e84a4
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 01:07:38 2022 +0000

    Delete manifest

commit bce3069
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 01:07:01 2022 +0000

    Make write to folder

commit ca95512
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 00:45:49 2022 +0000

    Temp delete workflows, remove git check on master

* Exclude chef zzz_generated from restyle

* Exclude restyle

* Squashed commit of the following:

commit 436ce0b
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 21:36:07 2022 +0000

    [no ci] caps

commit 126ff6a
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 21:28:34 2022 +0000

    Restyle

commit f7b7222
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 21:23:37 2022 +0000

    [no ci] restore workflows

commit d44b014
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 21:21:27 2022 +0000

    README

commit be2dc9c
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 21:19:04 2022 +0000

    README

commit 01deda9
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 21:15:31 2022 +0000

    README

commit abba224
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 20:37:28 2022 +0000

    Make GCB workable

commit 1623e4b
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 20:31:36 2022 +0000

    Flatten with block

commit 02f3e78
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 20:29:42 2022 +0000

    Remove functionality to check master branch for zap

commit 2a79c1c
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 20:24:07 2022 +0000

    Remove explicit encoding

commit 2dfcb00
Author: Austin Bozowski <[email protected]>
Date:   Thu Jun 2 20:20:43 2022 +0000

    Temp delete workflows

* Misspelled word

* --generate_zzz after zap file changed in master

* propagate nrf error, fix esp32

* Fix overwrite

* Fix dedents

* generate_zzz and update workflow image version
  • Loading branch information
aBozowski authored Jun 6, 2022
1 parent 588c6fa commit 4a83d6f
Show file tree
Hide file tree
Showing 19 changed files with 3,923 additions and 62 deletions.
119 changes: 119 additions & 0 deletions .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Build Chef CI examples on all platforms

on:
push:
pull_request:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

jobs:

validate_zzz:
name: Chef - Validate cached ZAP output
runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'
container:
image: connectedhomeip/chip-build:0.5.77
options: --user root
steps:
- uses: Wandalen/[email protected]
name: Checkout
with:
action: actions/checkout@v3
with: |
token: ${{ github.token }}
attempt_limit: 3
attempt_delay: 2000
- name: Chef validate zzz
shell: bash
run: |
cd examples/chef
python3 chef.py --validate_zzz
chef_linux:
name: Chef - Linux CI Examples
needs: validate_zzz
runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build:0.5.77
options: --user root

steps:
- uses: Wandalen/[email protected]
name: Checkout
with:
action: actions/checkout@v3
with: |
token: ${{ github.token }}
attempt_limit: 3
attempt_delay: 2000
- name: CI Examples Linux
shell: bash
run: |
./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t linux"
chef_esp32:
name: Chef - ESP32 CI Examples
needs: validate_zzz
runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-esp32:0.5.77
options: --user root

steps:
- uses: Wandalen/[email protected]
name: Checkout
with:
action: actions/checkout@v3
with: |
token: ${{ github.token }}
attempt_limit: 3
attempt_delay: 2000
- name: CI Examples ESP32
shell: bash
run: |
./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t esp32"
chef_nrfconnect:
name: Chef - NRFConnect CI Examples
needs: validate_zzz
runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-nrf-platform:0.5.77
options: --user root

steps:
- uses: Wandalen/[email protected]
name: Checkout
with:
action: actions/checkout@v3
with: |
token: ${{ github.token }}
attempt_limit: 3
attempt_delay: 2000
- name: CI Examples NRFConnect
shell: bash
run: |
./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t nrfconnect"
1 change: 1 addition & 0 deletions .restyled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ exclude:
- "src/controller/python/chip/clusters/Objects.py" # generated file, no point to restyle
- "src/controller/python/chip/clusters/CHIPClusters.py" # generated file, no point to restyle
- "scripts/idl/tests/outputs/**/*" # Matches generated output 1:1
- "examples/chef/zzz_generated/**/*"


changed_paths:
Expand Down
61 changes: 61 additions & 0 deletions examples/chef/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,64 @@ Run `chef.py -h` to see the available commands
3. Click on `Save As` and save the file with the name of your new device type
into the `devices` folder. This device is now available for the script. See
`chef.py -h` for a list of devices available.

## CI

### zzz_generated

To eliminate a dependency on ZAP in CI jobs, all chef examples found in
`examples/chef/devices` must have their output from the ZAP tool cached in
`examples/chef/zzz_generated`.

To generate the cache, one may execute chef with the option `--generate_zzz`.
This will run ZAP for all devices in `examples/chef/devices` and place the
output into the appropriate directory structure.

Other than the output from the ZAP tool, the cache directory contains two
additional files for each device:

- `INPUTMD5.txt` contains the md5 hex digest of the ZAP file used to generate
the directory.
- `ZAPSHA.txt` contains the commit of ZAP in the user's tree when the
directory was generated.

```
zzz_generated/
└── lighting-app
├── INPUTMD5.txt
├── zap-generated
│   ├── access.h
│   ├── af-gen-event.h
│   └── ...
└── ZAPSHA.txt
```

These additional files will be used by the CI jobs to validate whether the cache
must be regenerated i.e. regeneration is needed when ZAP or the input ZAP files
change.

### Workflow

All CI jobs for chef can be found in `.github/workflows/chef.yaml`.

#### Validate

The workflow begins by calling chef with `--validate_zzz`.

`--validate_zzz` will recalculate the current ZAP commit and the md5 of all
example ZAP files and compare with what is committed to `zzz_generated`.

If the validation job fails, it will provide instructions to repair
`zzz_generated` and no builds will run.

#### Build

Once the validation job is complete, there is a separate job for each platform,
which run in parallel.

These jobs use a platform-specific image with base `chip-build`.

The build jobs call chef with the options `--ci -t <PLATFORM>`. The `--ci`
option will execute builds for all devices specified in `_CI_ALLOW_LIST` defined
in `chef.py` (so long as these devices are also in `/devices`) on the specified
platform.
Loading

0 comments on commit 4a83d6f

Please sign in to comment.