Skip to content

Commit

Permalink
Cherry pick chef work from master into Interop testing te9 (project-c…
Browse files Browse the repository at this point in the history
…hip#19602)

* fix: enabled extended discovery on chef/nrfconnect (project-chip#18022)

Change-Id: I10d6456465f48134d1f8c5f5cbc257dd50dbb839

* Chef Refactor (project-chip#18009)

* Chef - Add stateful_shell.py and constants.py

Change-Id: Ia59a3d2a71204e4af2c41d6192d47f048a58c3b4

* Chef - Print splash text

Change-Id: I9b162cabab700e87f12806668b2953bf57348449

* Chef - Use textwrap.dedent on textblocks

Change-Id: I861f24ac20d440cf4a3e605809421a766ecdd476

* Chef - Remove use of commandQueue

Change-Id: I75d5ae6fea25c6b933cb9823a29e9c2224b8188d

* Chef - Replace shell writes with Python open() calls

Change-Id: I0147fa6b96d3a15bf95352acbd136e8f1e648b8f

* Chef - Make paths into global constants

Change-Id: Ib177d584bcd463aaafe10f4f338a90d6b234c3f1

* Chef - Remove HexInputToInt

Change-Id: Iebe5e76c169951e842262530d3feba5ac899a33c

* Chef - Remove unused statements

Change-Id: I56670e31722348fb47a1e59d2651cdcf3f983e28

* Chef - Convert variables to snake case per PEP8

Change-Id: I52520eec1dfb8093c39ce4570aa99cdd0b0d854a

* Chef - Add function type hinting

Change-Id: Ib82f0bf4752819b65d2c76058429931c6986bd83

* Chef - Fix typo doRpc -> do_rpc (project-chip#18278)

Change-Id: I226aacc73738ce98487272fcd126efc81159ba47

* [nrfconnect] Added kconfig option to enable extended discovery (project-chip#18367)

There is no kconfig that would allow to easily enable and disable
extended discovery from config file.

Added kconfig enabling extended discovery.

* Chef - Add RPC support for NRF (project-chip#17774) (project-chip#18282)

Change-Id: I8e4e35e2aae656d8d2f228d63855c8eb75c1d791

* [EFR32] Add support for efr32 MG24 for the chef example (project-chip#18621)

* Template app for chef

* chef update for BRD4186A thread

* Device info provider efr32, some fixes for nrf and linux (CHEF DIR ONLY project-chip#18817)

* Add changes in chef directory only

* Make device info provider available for EFR32. Ensure its storage is initialized

* Ensure storage is initialized for NRF example as well

* Ensure storage is initialized for linux examples as well

* Add dependency to example providers in light switch as well

* Relocate the storage init configuration after server init in linux main

* RPC support in the example tool chef linux build (project-chip#18294)

Port RPC server enabled logic into example tool chef

the usage example:
  $ ./chef.py -zbr -t linux -d lighting-app --pid 0x8000

* Chef - Add output from stateful_shell (project-chip#18918)

* Stateful shell compatibility improvements (project-chip#19006)

* Chef - Use latin1 encoding when reading tmp files

* Chef - Use local temp files to support Docker usage

* Chef - Preserve returncode in stateful_shell (project-chip#19144)

* Chef CI (project-chip#18859)

* 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

* Chef - Add BUILD.gn and unit tests for stateful_shell.py (project-chip#19205)

* Chef - Use temporary folder for stateful_shell artifacts (project-chip#19362)

* Chef - Add sample_app_util for parsing zap files (project-chip#19087)

* Chef - Fix: wrong order for clearing directory on zzap run (project-chip#19324)

* Remove test_zap_file_parser.py from sources as it is already in tests (project-chip#19527)

* Chef - Revert lighting app rename from project-chip#17983

* Chef - Check in generated files for lighting-app to fix CI

* Chef CI - Change image to 0.5.64 for compatability with TE9

* bump ca-certificate version in cirque docker (project-chip#19368)

* Update pigweed to e61718e9f4e5c (project-chip#18955)

* Fix broken Chef NRF build caused by project-chip#18955 (project-chip#19204)

Co-authored-by: Douglas Rocha Ferraz <[email protected]>
Co-authored-by: Kamil Kasperczyk <[email protected]>
Co-authored-by: mkardous-silabs <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: MtTsai <[email protected]>
Co-authored-by: Austin Bozowski <[email protected]>
Co-authored-by: yunhanw-google <[email protected]>
Co-authored-by: rgoliver <[email protected]>
  • Loading branch information
9 people authored and danielsilabs committed Sep 9, 2022
1 parent 6ca2b71 commit 6457df7
Show file tree
Hide file tree
Showing 85 changed files with 9,238 additions and 1,137 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.64
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.64
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.64
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.64
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"
2 changes: 2 additions & 0 deletions .restyled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ 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/sample_app_util/test_files/*.yaml"
- "examples/chef/zzz_generated/**/*"


changed_paths:
Expand Down
1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
if (chip_link_tests) {
deps = [
"//:fake_platform_tests",
"//examples/chef:chef.tests",
"//scripts/build:build_examples.tests",
"//scripts/idl:idl.tests",
"//src:tests_run",
Expand Down
1 change: 1 addition & 0 deletions config/ameba/chip.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ string(APPEND CHIP_GN_ARGS "pw_assert_BACKEND = \"//third_party/connectedhomeip/
string(APPEND CHIP_GN_ARGS "pw_sys_io_BACKEND = \"//third_party/connectedhomeip/examples/platform/ameba/pw_sys_io:pw_sys_io_ameba\"\n")
string(APPEND CHIP_GN_ARGS "dir_pw_third_party_nanopb = \"//third_party/connectedhomeip/third_party/nanopb/repo\"\n")
string(APPEND CHIP_GN_ARGS "pw_build_LINK_DEPS = [\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_assert:impl\", \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_log:impl\"]\n")
string(APPEND CHIP_GN_ARGS "pw_rpc_CONFIG = \"//third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc:disable_global_mutex\"")
endif (matter_enable_rpc)

# Build ota-requestor
Expand Down
1 change: 1 addition & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ if(CONFIG_ENABLE_PW_RPC)
chip_gn_arg_append("pw_trace_BACKEND" "\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_trace_tokenized\"")
chip_gn_arg_append("dir_pw_third_party_nanopb" "\"//third_party/connectedhomeip/third_party/nanopb/repo\"")
chip_gn_arg_append("pw_build_LINK_DEPS" "[\"\$dir_pw_assert:impl\", \"\$dir_pw_log:impl\"]")
chip_gn_arg_append("pw_rpc_CONFIG" "\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc:disable_global_mutex\"")
endif()

if (CONFIG_BUILD_CHIP_TESTS)
Expand Down
4 changes: 4 additions & 0 deletions config/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,10 @@ target_sources(${APP_TARGET} PRIVATE
${MBED_COMMON}/util/PigweedLogger.cpp
)

list(APPEND CHIP_DEFINES
PW_RPC_USE_GLOBAL_MUTEX=0
)

target_include_directories(${APP_TARGET} PRIVATE
${PIGWEED_ROOT}/pw_sys_io/public
${PIGWEED_ROOT}/pw_assert/public
Expand Down
1 change: 1 addition & 0 deletions config/mbed/chip-gn/lib/pw_rpc/pw_rpc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ pw_build_LINK_DEPS = [
]

dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo"
pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex"

chip_enable_pw_rpc = true
5 changes: 5 additions & 0 deletions config/nrfconnect/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ config CHIP_QSPI_NOR
bool
default y

# Enable extended discovery
config CHIP_EXTENDED_DISCOVERY
bool
default y

# Enable OpenThread

config NET_L2_OPENTHREAD
Expand Down
6 changes: 6 additions & 0 deletions config/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ config CHIP_OTA_IMAGE_INCLUDE_MCUBOOT

endif

config CHIP_EXTENDED_DISCOVERY
bool "Enable extended discovery"
help
Enables the device to advertise commissionable service when not in the
commissioning mode.

module = MATTER
module-str = Matter
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/ameba/chip_main.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ include(${pigweed_dir}/pw_protobuf_compiler/proto.cmake)

set(dir_pw_third_party_nanopb "${chip_dir}/third_party/nanopb/repo" CACHE STRING "" FORCE)

pw_set_module_config(pw_rpc_CONFIG pw_rpc.disable_global_mutex_config)
pw_set_backend(pw_log pw_log_basic)
pw_set_backend(pw_assert pw_assert_log)
pw_set_backend(pw_sys_io pw_sys_io.ameba)
Expand Down
3 changes: 3 additions & 0 deletions examples/all-clusters-app/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ flashing_script()
if (CONFIG_ENABLE_PW_RPC)
get_filename_component(CHIP_ROOT ./third_party/connectedhomeip REALPATH)
include(third_party/connectedhomeip/third_party/pigweed/repo/pw_build/pigweed.cmake)

pw_set_module_config(pw_rpc_CONFIG pw_rpc.disable_global_mutex_config)

pw_set_backend(pw_log pw_log_basic)
pw_set_backend(pw_assert pw_assert_log)
pw_set_backend(pw_sys_io pw_sys_io.esp32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@
#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00

#define CHIP_DEVICE_CONFIG_SED_IDLE_INTERVAL 2000_ms32

#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1
43 changes: 43 additions & 0 deletions examples/chef/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright (c) 2022 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.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

import("//build_overrides/pigweed.gni")
import("$dir_pw_build/python.gni")

pw_python_package("chef") {
setup = [ "setup.py" ]

inputs = [
"sample_app_util/test_files/sample_zap_file.zap",
"sample_app_util/test_files/sample_zap_file_hashmeta.yaml",
]

sources = [
"__init__.py",
"chef.py",
"constants.py",
"sample_app_util/__init__.py",
"sample_app_util/sample_app_util.py",
"sample_app_util/zap_file_parser.py",
"stateful_shell.py",
]

tests = [
"test_stateful_shell.py",
"sample_app_util/test_zap_file_parser.py",
]
}
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.
Empty file added examples/chef/__init__.py
Empty file.
Loading

0 comments on commit 6457df7

Please sign in to comment.