Skip to content

Commit d529ab1

Browse files
authored
Merge branch 'master' into rjosefsen/soil-measurement-server-impl
2 parents 3509dce + a12250a commit d529ab1

File tree

526 files changed

+31557
-28890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

526 files changed

+31557
-28890
lines changed

.github/actions/perform-codeql-analysis/action.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ runs:
88
using: "composite"
99
steps:
1010
- name: Perform CodeQL Analysis
11-
uses: github/codeql-action/analyze@v2
11+
uses: github/codeql-action/analyze@v3
1212
with:
1313
category: "/language:${{ inputs.language }}"
1414
upload: False
@@ -19,11 +19,18 @@ runs:
1919
patterns: |
2020
-**/third_party/**
2121
-**/scripts/**
22+
-**/tests/**
23+
24+
# Disabling checks that are not too important, and that result in many hundreds of alerts due to generated code
25+
# Disable checks: No trivial switch statements
26+
-**/*.cpp:cpp/trivial-switch
27+
# Disable check: Empty branch of conditional
28+
-**/*.cpp:cpp/empty-block
2229
input: "sarif-results/${{ inputs.language }}.sarif"
2330
output: "sarif-results/${{ inputs.language }}.sarif"
2431

2532
- name: Upload SARIF
26-
uses: github/codeql-action/upload-sarif@v2
33+
uses: github/codeql-action/upload-sarif@v3
2734
with:
2835
sarif_file: "sarif-results/${{ inputs.language }}.sarif"
2936
- name: Upload loc as a Build Artifact

.github/workflows/build.yaml

Lines changed: 53 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -75,27 +75,49 @@ jobs:
7575
uses: github/codeql-action/init@v3
7676
with:
7777
languages: "cpp"
78+
queries: security-extended, security-and-quality
7879
- name: Setup Build
7980
run: scripts/build/gn_gen.sh --args="chip_config_memory_debug_checks=true chip_config_memory_debug_dmalloc=false"
8081
- name: Run Build
8182
run: scripts/run_in_build_env.sh "ninja -C ./out"
8283
- name: Run Tests
8384
run: scripts/tests/gn_tests.sh
85+
- name: Clean out build output
86+
run: rm -rf ./out
87+
88+
# Do not run below steps with CodeQL since we are getting "Out of runner space issues" with CodeQL and their added coverage is limited
8489
- name: Set up Build Without Detail Logging
90+
if: inputs.run-codeql != true
8591
run: scripts/build/gn_gen.sh --args="chip_detail_logging=false"
8692
- name: Run Build Without Detail Logging
93+
if: inputs.run-codeql != true
8794
run: scripts/run_in_build_env.sh "ninja -C ./out"
95+
- name: Cleanout build output
96+
if: inputs.run-codeql != true
97+
run: rm -rf ./out
8898
- name: Set up Build Without Progress Logging
99+
if: inputs.run-codeql != true
89100
run: scripts/build/gn_gen.sh --args="chip_detail_logging=false chip_progress_logging=false"
90101
- name: Run Build Without Progress Logging
102+
if: inputs.run-codeql != true
91103
run: scripts/run_in_build_env.sh "ninja -C ./out"
104+
- name: Clean out build output
105+
if: inputs.run-codeql != true
106+
run: rm -rf ./out
92107
- name: Set up Build Without Error Logging
108+
if: inputs.run-codeql != true
93109
run: scripts/build/gn_gen.sh --args="chip_detail_logging=false chip_progress_logging=false chip_error_logging=false"
94110
- name: Run Build Without Error Logging
111+
if: inputs.run-codeql != true
95112
run: scripts/run_in_build_env.sh "ninja -C ./out"
113+
- name: Clean out build output
114+
if: inputs.run-codeql != true
115+
run: rm -rf ./out
96116
- name: Set up Build Without Logging
117+
if: inputs.run-codeql != true
97118
run: scripts/build/gn_gen.sh --args="chip_logging=false"
98119
- name: Run Build Without Logging
120+
if: inputs.run-codeql != true
99121
run: scripts/run_in_build_env.sh "ninja -C ./out"
100122
- name: Uploading core files
101123
uses: actions/upload-artifact@v4
@@ -128,7 +150,7 @@ jobs:
128150
name: Build on Linux (fake, gcc_release, clang, simulated)
129151

130152
runs-on: ubuntu-latest
131-
if: github.actor != 'restyled-io[bot]'
153+
if: github.actor != 'restyled-io[bot]' && inputs.run-codeql != true
132154

133155
container:
134156
image: ghcr.io/project-chip/chip-build:125
@@ -161,11 +183,13 @@ jobs:
161183
uses: ./.github/actions/checkout-submodules-and-bootstrap
162184
with:
163185
platform: linux
164-
- name: Initialize CodeQL
165-
if: ${{ inputs.run-codeql }}
166-
uses: github/codeql-action/init@v3
167-
with:
168-
languages: "cpp"
186+
# CodeQL + this job is consistently failing (in the step "Run Tests with sanitizers")
187+
# deactivate until a better workaround is found
188+
# - name: Initialize CodeQL
189+
# if: ${{ inputs.run-codeql }}
190+
# uses: github/codeql-action/init@v3
191+
# with:
192+
# languages: "cpp"
169193
- name: Setup and Build Simulated Device
170194
run: |
171195
BUILD_TYPE=simulated
@@ -270,11 +294,13 @@ jobs:
270294
run: |
271295
./scripts/run_in_build_env.sh \
272296
"./scripts/build/build_examples.py --target linux-fake-tests build"
273-
- name: Perform CodeQL Analysis
274-
if: ${{ inputs.run-codeql }}
275-
uses: ./.github/actions/perform-codeql-analysis
276-
with:
277-
language: cpp
297+
# CodeQL + this job is consistently failing (in the step "Run Tests with sanitizers")
298+
# deactivate until a better solution is found
299+
# - name: Perform CodeQL Analysis
300+
# if: ${{ inputs.run-codeql }}
301+
# uses: ./.github/actions/perform-codeql-analysis
302+
# with:
303+
# language: cpp
278304

279305
- name: Uploading core files
280306
uses: actions/upload-artifact@v4
@@ -302,7 +328,7 @@ jobs:
302328
name: Build on Linux (python_lib)
303329

304330
runs-on: ubuntu-latest
305-
if: github.actor != 'restyled-io[bot]'
331+
if: github.actor != 'restyled-io[bot]' && inputs.run-codeql != true
306332

307333
container:
308334
image: ghcr.io/project-chip/chip-build:125
@@ -367,7 +393,7 @@ jobs:
367393
name: Build on Linux (python lighting-app)
368394

369395
runs-on: ubuntu-latest
370-
if: github.actor != 'restyled-io[bot]'
396+
if: github.actor != 'restyled-io[bot]' && inputs.run-codeql != true
371397

372398
container:
373399
image: ghcr.io/project-chip/chip-build:125
@@ -400,7 +426,7 @@ jobs:
400426
build_darwin:
401427
name: Build on Darwin (clang, simulated)
402428
runs-on: macos-13
403-
if: github.actor != 'restyled-io[bot]'
429+
if: github.actor != 'restyled-io[bot]' && inputs.run-codeql != true
404430

405431
steps:
406432
- name: Checkout
@@ -415,11 +441,12 @@ jobs:
415441
- name: Try to ensure the directory for diagnostic log collection exists
416442
run: |
417443
mkdir -p ~/Library/Logs/DiagnosticReports || true
418-
- name: Initialize CodeQL
419-
if: ${{ inputs.run-codeql }}
420-
uses: github/codeql-action/init@v3
421-
with:
422-
languages: "cpp"
444+
# Build on Darwin + CodeQL often takes 6 hours (which is more than the maximum allowed by GitHub Runners), Deactivate it until we can investigate this
445+
# - name: Initialize CodeQL
446+
# if: ${{ inputs.run-codeql }}
447+
# uses: github/codeql-action/init@v3
448+
# with:
449+
# languages: "cpp"
423450

424451
- name: Setup and Build Simulated Device
425452
run: |
@@ -473,11 +500,12 @@ jobs:
473500
name: crash-log-darwin
474501
path: ~/Library/Logs/DiagnosticReports/
475502

476-
- name: Perform CodeQL Analysis
477-
if: ${{ inputs.run-codeql }}
478-
uses: ./.github/actions/perform-codeql-analysis
479-
with:
480-
language: cpp
503+
# Build on Darwin + CodeQL often takes 6 hours (which is more than the maximum allowed by GitHub Runners), Deactivate it until we can investigate this
504+
# - name: Perform CodeQL Analysis
505+
# if: ${{ inputs.run-codeql }}
506+
# uses: ./.github/actions/perform-codeql-analysis
507+
# with:
508+
# language: cpp
481509

482510
# TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227
483511
# TODO https://github.com/project-chip/connectedhomeip/issues/1512
@@ -488,7 +516,7 @@ jobs:
488516
env:
489517
TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt"
490518

491-
if: github.actor != 'restyled-io[bot]'
519+
if: github.actor != 'restyled-io[bot]' && inputs.run-codeql != true
492520
runs-on: ubuntu-latest
493521

494522
container:

.github/workflows/examples-esp32.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
run: scripts/examples/esp_example.sh lighting-app sdkconfig.defaults esp32h2
118118

119119
- name: Build example Lighting App (Target:ESP32C6)
120-
run: scripts/examples/esp_example.sh lighting-app sdkconfig.defaults esp32c6
120+
run: scripts/examples/esp_example.sh lighting-app sdkconfig.wifi_thread.defaults esp32c6
121121

122122
- name: Uploading Size Reports
123123
uses: ./.github/actions/upload-size-reports

.github/workflows/tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ jobs:
501501
./scripts/run_in_build_env.sh \
502502
"./scripts/build/build_examples.py \
503503
--target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \
504+
--target linux-x64-bridge-ipv6only-no-ble-no-wifi-tsan-clang-test \
504505
--target linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test \
505506
--target linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test \
506507
--target linux-x64-air-purifier-ipv6only-no-ble-no-wifi-tsan-clang-test \
@@ -523,6 +524,7 @@ jobs:
523524
run: |
524525
echo -n "" >/tmp/test_env.yaml
525526
echo "ALL_CLUSTERS_APP: out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app" >> /tmp/test_env.yaml
527+
echo "BRIDGE_APP: out/linux-x64-bridge-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-bridge-app" >> /tmp/test_env.yaml
526528
echo "CHIP_LOCK_APP: out/linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-lock-app" >> /tmp/test_env.yaml
527529
echo "CAMERA_APP: out/linux-x64-camera/chip-camera-app" >> /tmp/test_env.yaml
528530
echo "ENERGY_MANAGEMENT_APP: out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app" >> /tmp/test_env.yaml

0 commit comments

Comments
 (0)