Skip to content

Commit

Permalink
Merge branch 'master' into nordic-ota-events
Browse files Browse the repository at this point in the history
  • Loading branch information
chrkroh authored Feb 15, 2023
2 parents 752f8c1 + 552e6eb commit a9fa9a6
Show file tree
Hide file tree
Showing 397 changed files with 9,817 additions and 8,601 deletions.
80 changes: 62 additions & 18 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ name: Builds
on:
push:
pull_request:
merge_group:
workflow_dispatch:

concurrency:
Expand All @@ -27,7 +28,6 @@ env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:

build_linux_gcc_debug:
name: Build on Linux (gcc_debug)
timeout-minutes: 85
Expand Down Expand Up @@ -66,6 +66,14 @@ jobs:
run: |
mkdir /tmp/cores || true
sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true
- name: Bootstrap cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh
Expand All @@ -77,6 +85,7 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Setup Build
run: scripts/build/gn_gen.sh --args="chip_config_memory_debug_checks=true chip_config_memory_debug_dmalloc=false"
- name: Run Build
Expand Down Expand Up @@ -173,6 +182,14 @@ jobs:
run: |
mkdir /tmp/cores || true
sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true
- name: Bootstrap cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh
Expand All @@ -184,6 +201,7 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Setup and Build Simulated Device
timeout-minutes: 20
run: |
Expand All @@ -203,18 +221,18 @@ jobs:
env:
LSAN_OPTIONS: detect_leaks=1
run: |
for BUILD_TYPE in asan tsan ubsan; do
case $BUILD_TYPE in
"asan") GN_ARGS='is_clang=true is_asan=true';;
"msan") GN_ARGS='is_clang=true is_msan=true';;
"tsan") GN_ARGS='is_clang=true is_tsan=true chip_enable_wifi=false';;
"ubsan") GN_ARGS='is_clang=true is_ubsan=true';;
esac
rm -rf ./out/sanitizers
BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands
BUILD_TYPE=sanitizers scripts/tests/gn_tests.sh
done
for BUILD_TYPE in asan tsan ubsan; do
case $BUILD_TYPE in
"asan") GN_ARGS='is_clang=true is_asan=true';;
"msan") GN_ARGS='is_clang=true is_msan=true';;
"tsan") GN_ARGS='is_clang=true is_tsan=true chip_enable_wifi=false';;
"ubsan") GN_ARGS='is_clang=true is_ubsan=true';;
esac
rm -rf ./out/sanitizers
BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands
BUILD_TYPE=sanitizers scripts/tests/gn_tests.sh
done
- name: Ensure codegen is done for sanitize
timeout-minutes: 45
run: |
Expand Down Expand Up @@ -323,9 +341,18 @@ jobs:
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux

- name: Bootstrap cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh

- name: Setup Build, Run Build and Run Tests
timeout-minutes: 50
run: |
Expand All @@ -343,9 +370,9 @@ jobs:
- name: Run Python Setup Payload Generator Test
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh 'scripts/examples/gn_build_example.sh examples/chip-tool out/'
scripts/run_in_build_env.sh 'pip3 install -r src/setup_payload/python/requirements.txt'
scripts/run_in_build_env.sh 'python3 src/setup_payload/tests/run_python_setup_payload_gen_test.py out/chip-tool'
scripts/run_in_build_env.sh 'scripts/examples/gn_build_example.sh examples/chip-tool out/'
scripts/run_in_build_env.sh 'pip3 install -r src/setup_payload/python/requirements.txt'
scripts/run_in_build_env.sh 'python3 src/setup_payload/tests/run_python_setup_payload_gen_test.py out/chip-tool'
build_darwin:
name: Build on Darwin (clang, python_lib, simulated)
Expand All @@ -372,6 +399,14 @@ jobs:
- name: Try to ensure the directory for diagnostic log collection exists
run: |
mkdir -p ~/Library/Logs/DiagnosticReports || true
- name: Bootstrap cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 25
run: scripts/build/gn_bootstrap.sh
Expand All @@ -383,6 +418,7 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Setup and Build Simulated Device
timeout-minutes: 20
run: |
Expand Down Expand Up @@ -462,6 +498,14 @@ jobs:
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux

- name: Bootstrap cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh
Expand All @@ -472,8 +516,8 @@ jobs:
name: bootstrap-logs
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
.environment/pigweed-venv/*.log
- name: Run Build Coverage
timeout-minutes: 20
run: ./scripts/build_coverage.sh

24 changes: 23 additions & 1 deletion .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ name: Build Chef CI examples on all platforms
on:
push:
pull_request:
merge_group:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
Expand All @@ -43,6 +44,13 @@ jobs:
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux
- name: Bootstrap cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh
Expand Down Expand Up @@ -71,6 +79,13 @@ jobs:
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform esp32
- name: Bootstrap cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh
Expand Down Expand Up @@ -99,10 +114,17 @@ jobs:
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform nrfconnect
- name: Bootstrap cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh
- name: CI Examples NRFConnect
shell: bash
run: |
./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t nrfconnect"
./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t nrfconnect"
1 change: 1 addition & 0 deletions .github/workflows/cirque.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ name: Cirque
on:
push:
pull_request:
merge_group:
workflow_dispatch:

concurrency:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/darwin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ name: Darwin Tests
on:
push:
pull_request:
merge_group:
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -64,6 +65,14 @@ jobs:
sudo chown ${USER} /cores || true
mkdir -p ~/Library/Logs/DiagnosticReports || true
mkdir objdir-clone || true
- name: Bootstrap cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 25
run: scripts/build/gn_bootstrap.sh
Expand All @@ -75,6 +84,7 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Delete Defaults
run: defaults delete com.apple.dt.xctest.tool
continue-on-error: true
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ name: Darwin
on:
push:
pull_request:
merge_group:
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -44,6 +45,14 @@ jobs:
run: scripts/checkout_submodules.py --shallow --platform darwin
- name: Setup Environment
run: brew install [email protected]

- name: Bootstrap cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 25
run: scripts/build/gn_bootstrap.sh
Expand All @@ -55,6 +64,7 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Block zap-cli from being used
# xcodebuild is NOT expected to require zap-cli
run: scripts/run_in_build_env.sh 'mv $PW_ENVIRONMENT_ROOT/cipd/packages/zap/zap-cli $PW_ENVIRONMENT_ROOT/cipd/packages/zap/zap-cli.moved'
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/docbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ jobs:
path: matter
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: cache-pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-doc-pip
cache-dependency-path: matter/docs/requirements.txt
cache: pip
- name: Install base dependencies
working-directory: matter
run: |
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/examples-ameba.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ name: Build example - Ameba
on:
push:
pull_request:
merge_group:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
Expand Down Expand Up @@ -49,6 +50,15 @@ jobs:
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform ameba
- name: Bootstrap cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
run: scripts/build/gn_bootstrap.sh
- name: Build example Ameba All Clusters App
run: |
./scripts/run_in_build_env.sh \
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/examples-bouffalolab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ name: Build example - BouffaloLab
on:
push:
pull_request:
merge_group:
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -55,7 +56,14 @@ jobs:
env:
GH_CONTEXT: ${{ toJson(github) }}
run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}"


- name: Bootstrap cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 25
run: scripts/build/gn_bootstrap.sh
Expand All @@ -67,6 +75,7 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build example BL602 Lighting App
timeout-minutes: 30
run: |
Expand Down
Loading

0 comments on commit a9fa9a6

Please sign in to comment.