Skip to content

Commit

Permalink
Merge 8808d7a into 051685b
Browse files Browse the repository at this point in the history
  • Loading branch information
ghost authored Dec 10, 2021
2 parents 051685b + 8808d7a commit 9177912
Show file tree
Hide file tree
Showing 662 changed files with 129,275 additions and 85,479 deletions.
10 changes: 9 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,16 @@ RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/resty
RUN chmod +x /home/$USERNAME/bin/restyle-path
RUN chown -R $USERNAME:$USERNAME /home/$USERNAME
RUN echo "PATH=/home/$USERNAME/bin:${PATH}" >> /home/$USERNAME/.bashrc

# $USERNAME needs to own the esp-idf and tools for the examples to build
RUN chown -R $USERNAME:$USERNAME /opt/espressif/esp-idf
RUN chown -R $USERNAME:$USERNAME /opt/espressif/tools

# $USERNAME needs to own west configuration to build nRF Connect examples
RUN chown -R $USERNAME:$USERNAME /opt/NordicSemiconductor/nrfconnect/.west
RUN chown -R $USERNAME:$USERNAME /opt/NordicSemiconductor/nrfconnect/

# allow read/write access to header and libraries
RUN chown -R $USERNAME:$USERNAME /opt/ubuntu-21.04-aarch64-sysroot/usr/

# allow licenses to be accepted
RUN chown -R $USERNAME:$USERNAME /opt/android/sdk
24 changes: 19 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
run: scripts/run_in_build_env.sh "ninja -C ./out"
build_linux:
name: Build on Linux (gcc_release, clang, mbedtls, simulated)
timeout-minutes: 60
timeout-minutes: 90

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'
Expand Down Expand Up @@ -158,12 +158,26 @@ jobs:
scripts/tests/gn_tests.sh
done
- name: Build using build_examples.py
timeout-minutes: 30
# NOTE: only vscode image contains the cross compile arm64 sysroot
# so the build command below only compiles x64
timeout-minutes: 40
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --no-log-timestamps \
--target linux-x64-all-clusters \
--target linux-x64-all-clusters-ipv6only \
--target linux-x64-chip-tool \
--target linux-x64-chip-tool-ipv6only \
--target linux-x64-minmdns-ipv6only \
--target linux-x64-rpc-console \
--target linux-x64-thermostat-ipv6only \
--target linux-x64-tv-app-ipv6only \
build \
"
- name: Fun fake linux tests
timeout-minutes: 15
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --no-log-timestamps --target-glob 'linux-x64-*' build"
"./scripts/build/build_examples.py --no-log-timestamps --target linux-fake-tests build"
# TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227
# TODO https://github.com/project-chip/connectedhomeip/issues/1512
Expand Down
23 changes: 20 additions & 3 deletions .github/workflows/docker_img.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,24 @@ jobs:
strategy:
fail-fast: false
matrix:
# TODO: Enables "-crosscompile" and "-vscode" images
img: ["", "-android", "-cirque", "-doxygen", "-efr32", "-esp32", "-esp32-qemu", "-infineon", "-k32w", "-mbed-os", "-nrf-platform", "-telink", "-tizen"]
img:
- ""
- "-ameba"
- "-android"
- "-cirque"
- "-crosscompile"
- "-doxygen"
- "-efr32"
- "-esp32"
- "-esp32-qemu"
- "-infineon"
- "-k32w"
- "-mbed-os"
- "-nrf-platform"
- "-telink"
- "-tizen"
# NOTE: vscode image consumes ~52 GB disk space but GitHub-hosted runners provide ~10 GB free disk space(https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources)
#- "-vscode"
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -43,6 +59,7 @@ jobs:
- name: Scan for vulnerabilities
uses: crazy-max/docker-scan-action@master
with:
image: connectedhomeip/chip-build${{ matrix.img }}:0.5.33
# NOTE: This task validates the images built previously with latest tag
image: connectedhomeip/chip-build${{ matrix.img }}:latest
annotations: true

25 changes: 15 additions & 10 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,23 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build example EFR32 Lock App for BRD4161A
timeout-minutes: 10
- name: Build some BRD4161A variants
timeout-minutes: 30
run: |
scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ out/lock_app_debug BRD4161A
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A lock-app \
out/lock_app_debug/BRD4161A/chip-efr32-lock-example.out /tmp/bloat_reports/
- name: Build example EFR32 Lighting App for BRD4161A
timeout-minutes: 10
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--enable-flashbundle \
--target-glob '*-brd4161a-{lock,light,unit-test}' \
build \
--copy-artifacts-to out/artifacts \
"
- name: Prepare bloat report for light app
run: |
scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_debug BRD4161A
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A lighting-app \
out/lighting_app_debug/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
efr32 BRD4161A lighting-app \
out/efr32-brd4161a-light/chip-efr32-lighting-example.out \
/tmp/bloat_reports/
- name: Build example EFR32 Lighting App for BRD4161A with RPCs
timeout-minutes: 10
run: |
Expand Down
29 changes: 15 additions & 14 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ jobs:
name: ESP32
timeout-minutes: 85

env:
BUILD_TYPE: esp32

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'

Expand Down Expand Up @@ -62,29 +59,33 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build example All Clusters App
timeout-minutes: 10
run: scripts/examples/esp_example.sh all-clusters-app sdkconfig_m5stack.defaults
- name: Copy aside build products
- name: Build some M5Stack variations
timeout-minutes: 20
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--enable-flashbundle \
--target-glob '*-m5stack-{all-clusters,all-clusters-rpc-ipv6only}' \
build \
--copy-artifacts-to out/artifacts \
"
- name: Prepare bloat report
run: |
mkdir -p example_binaries/$BUILD_TYPE-build
cp examples/all-clusters-app/esp32/build/chip-all-clusters-app.elf \
example_binaries/$BUILD_TYPE-build/chip-all-clusters-app.elf
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
esp32 m5stack all-clusters-app \
example_binaries/$BUILD_TYPE-build/chip-all-clusters-app.elf \
out/esp32-m5stack-all-clusters/chip-all-clusters-app.elf \
/tmp/bloat_reports/
- name: Build example All Clusters App C3
timeout-minutes: 10
run: scripts/examples/esp_example.sh all-clusters-app sdkconfig_c3devkit.defaults
- name: Copy aside build products
run: |
mkdir -p example_binaries/$BUILD_TYPE-build
mkdir -p example_binaries/esp32-build
cp examples/all-clusters-app/esp32/build/chip-all-clusters-app.elf \
example_binaries/$BUILD_TYPE-build/chip-all-clusters-app.elf
example_binaries/esp32-build/chip-all-clusters-app.elf
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
esp32 c3devkit all-clusters-app \
example_binaries/$BUILD_TYPE-build/chip-all-clusters-app.elf \
example_binaries/esp32-build/chip-all-clusters-app.elf \
/tmp/bloat_reports/
- name: Build example Pigweed App
timeout-minutes: 10
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/examples-infineon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,38 @@ jobs:
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh \
"scripts/build/build_examples.py --no-log-timestamps --target 'infineon-p6-lock' build"
"scripts/build/build_examples.py \
--enable-flashbundle --no-log-timestamps \
--target infineon-p6-lock \
build \
--copy-artifacts-to out/artifacts \
"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
p6 default lock-app \
out/infineon-p6-lock/chip-p6-lock-example.out
- name: Build all-clusters-app example
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh \
"scripts/build/build_examples.py --no-log-timestamps --target 'infineon-p6-all-clusters' build"
"scripts/build/build_examples.py \
--enable-flashbundle --no-log-timestamps \
--target infineon-p6-all-clusters \
build \
--copy-artifacts-to out/artifacts \
"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
p6 default all-clusters-app \
out/infineon-p6-all-clusters/chip-p6-clusters-example.out
- name: Build lighting-app example
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh \
"scripts/build/build_examples.py --no-log-timestamps --target 'infineon-p6-light' build"
"scripts/build/build_examples.py \
--enable-flashbundle --no-log-timestamps \
--target infineon-p6-light \
build \
--copy-artifacts-to out/artifacts \
"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
p6 default light-app \
out/infineon-p6-light/chip-p6-lighting-example.out
Expand Down
92 changes: 92 additions & 0 deletions .github/workflows/examples-linux-arm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Copyright (c) 2020 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 example - Linux ARM

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:
arm_crosscompile:
name: Linux ARM Cross compile
timeout-minutes: 70

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-crosscompile:0.5.33
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Set up environment for size reports
if: ${{ !env.ACT }}
env:
GH_CONTEXT: ${{ toJson(github) }}
run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}"

- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build Some samples
timeout-minutes: 20
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-arm64-all-clusters \
--target linux-arm64-chip-tool-ipv6only \
--target linux-arm64-minmdns \
--target linux-arm64-thermostat-no-ble \
build \
"
- name: Bloat report - chip-tool
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
linux arm64 chip-tool-ipv6only \
out/linux-arm64-chip-tool-ipv6only/chip-tool \
/tmp/bloat_reports/
- name: Bloat report - thermostat
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
linux arm64 thermostat-no-ble \
out/linux-arm64-thermostat-no-ble/thermostat-app \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
with:
name: Size,Linux-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }}
path: |
/tmp/bloat_reports/
50 changes: 25 additions & 25 deletions .pullapprove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ groups:
teams: [reviewers-comcast]
reviews:
request: 10
# shared-reviewers-espressif:
# type: optional
# conditions:
# - files.include('*')
# reviewers:
# teams: [reviewers-espressif]
# reviews:
# request: 10
shared-reviewers-espressif:
type: optional
conditions:
- files.include('*')
reviewers:
teams: [reviewers-espressif]
reviews:
request: 10
shared-reviewers-google:
type: optional
conditions:
Expand All @@ -112,14 +112,14 @@ groups:
teams: [reviewers-google]
reviews:
request: 10
# shared-reviewers-lg:
# type: optional
# conditions:
# - files.include('*')
# reviewers:
# teams: [reviewers-lg]
# reviews:
# request: 10
shared-reviewers-lg:
type: optional
conditions:
- files.include('*')
reviewers:
teams: [reviewers-lg]
reviews:
request: 10
shared-reviewers-nordic:
type: optional
conditions:
Expand All @@ -144,14 +144,14 @@ groups:
teams: [reviewers-silabs]
reviews:
request: 10
# shared-reviewers-tcl:
# type: optional
# conditions:
# - files.include('*')
# reviewers:
# teams: [reviewers-tcl]
# reviews:
# request: 1
shared-reviewers-tcl:
type: optional
conditions:
- files.include('*')
reviewers:
teams: [reviewers-tcl]
reviews:
request: 1

############################################################
# Base Required Reviewers
Expand All @@ -164,7 +164,7 @@ groups:
requests.
type: required
requirements:
- len(groups.approved.include('shared-reviewers-*')) >= 3
- len(groups.approved.include('shared-reviewers-*')) >= 2
reviews:
required: 0
labels:
Expand Down
Loading

0 comments on commit 9177912

Please sign in to comment.