Skip to content

Commit

Permalink
Merge branch 'project-chip:master' into Set-3-18-24
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-marquez-csa authored Apr 8, 2024
2 parents 313ea2d + bf981c2 commit bbf8ea8
Show file tree
Hide file tree
Showing 1,295 changed files with 26,173 additions and 41,214 deletions.
6 changes: 6 additions & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ HomePods
hostapd
hostname
href
HSM
hsm
HTTPS
HW
hwadr
Expand All @@ -668,6 +670,7 @@ ifdef
ifdefs
IGMP
ihex
Illuminance
IlluminanceMeasurement
IM
imager
Expand Down Expand Up @@ -964,6 +967,7 @@ objcopy
OccupancySensing
OctetString
OECORE
OID
ol
Onboarding
onboardingcodes
Expand All @@ -985,6 +989,7 @@ openweave
OperationalCredentials
operationalDataset
opkg
OPTIGA
optionMask
optionOverride
optionsMask
Expand Down Expand Up @@ -1428,6 +1433,7 @@ transitionTime
TransportMgrBase
TriggerEffect
TRNG
trustm
TrustedRootCertificates
tsan
TSG
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/bootstrap-cache/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Bootstrap cache
description: Bootstrap cache
description: Bootstrap cache (deprecated)
runs:
using: "composite"
steps:
Expand Down
68 changes: 66 additions & 2 deletions .github/actions/bootstrap/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,73 @@ inputs:
description: "Platform name"
required: false
default: none
bootstrap-log-name:
description: "Bootstrap log name"
required: false
default: bootstrap-logs-${{ github.job }}
outputs:
cache-hit:
description: "Bootstrap environment was restored from cache"
value: ${{ fromJSON(steps.restore.outputs.outputs).cache-hit }} # dynamic action returns all outputs in `outputs`

runs:
using: "composite"
steps:
- name: Bootstrap
- name: Determine bootstrap cache configuration
id: prepare
shell: bash
run: |
# Determine bootstrap cache configuration
# In addition to the various setup files, the work directory matters as well,
# because the bootstrapped Pigweed environment contains absolute paths.
echo "Calculating bootstrap cache key for '$PWD'"
FILES_HASH="${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}"
FINAL_HASH="$(echo "$PWD:$FILES_HASH" | shasum -a 256 | cut -d' ' -f1)"
echo key="${RUNNER_OS}-${RUNNER_ARCH}-${{ inputs.platform }}-${FINAL_HASH}" | tee -a "$GITHUB_OUTPUT"
# Split caches across backends
case "$RUNNER_OS" in
macOS) echo backend=actions;;
*) echo backend=buildjet;;
esac | tee -a "$GITHUB_OUTPUT"
- name: Bootstrap from cache
id: restore
uses: ./.github/actions/dynamic
continue-on-error: true
with:
action: ${{ steps.prepare.outputs.backend }}/cache/restore@v4
with: |
key: ${{ steps.prepare.outputs.key }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Run bootstrap
if: ${{ fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }}
env:
PW_NO_CIPD_CACHE_DIR: 1
PW_ENVSETUP_NO_BANNER: 1
shell: bash
run: bash scripts/bootstrap.sh -p all,${{ inputs.platform }}
run: source scripts/bootstrap.sh -p all,${{ inputs.platform }}

- name: Save bootstrap cache
uses: ./.github/actions/dynamic
if: ${{ fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }}
continue-on-error: true
with:
action: ${{ steps.prepare.outputs.backend }}/cache/save@v4
with: |
key: ${{ steps.prepare.outputs.key }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Upload bootstrap logs
uses: actions/upload-artifact@v4
if: ${{ always() && !env.ACT && fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }}
with:
name: ${{ inputs.bootstrap-log-name }}
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,14 @@ runs:
with:
platform: ${{ inputs.platform }}
extra-parameters: ${{ inputs.extra-submodule-parameters }}
- name: Bootstrap Cache
uses: ./.github/actions/bootstrap-cache
- name: Bootstrap
uses: ./.github/actions/bootstrap
env:
PW_NO_CIPD_CACHE_DIR: Y
with:
platform: ${{ inputs.platform }}
bootstrap-log-name: ${{ inputs.bootstrap-log-name }}
- name: Dump disk info after checkout submodule & Bootstrap
shell: bash
run: scripts/dump_diskspace_info.sh
- name: Upload Bootstrap Logs
uses: ./.github/actions/upload-bootstrap-logs
with:
bootstrap-log-name: ${{ inputs.bootstrap-log-name }}
- name: Work around TSAN ASLR issues
if: runner.os == 'Linux' && !env.ACT
shell: bash
Expand Down
38 changes: 38 additions & 0 deletions .github/actions/dynamic/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Dynamic
description: Dynamically resolves another GitHub action
inputs:
action:
description: Action reference
required: true
with:
description: Action inputs as multi-line YAML string
required: false
default: ""
outputs:
outputs:
description: JSON object of outputs from the action
value: ${{ steps.run.outputs.outputs }}
runs:
using: composite
steps:
- name: Instantiate
shell: bash
run: |
# Dynamically invoke ${{ inputs.action }}
with='${{ inputs.with }}'
[[ -z "$with" ]] || with="$(echo ' with:'; sed -e 's/^/ /' <<<"$with")"
mkdir -p ./.tmp/dynamic-action-instance
cat <<END >./.tmp/dynamic-action-instance/action.yaml
runs:
using: composite
steps:
- id: run
uses: ${{ inputs.action }}
$with
outputs:
outputs:
value: $(echo '$'){{ toJSON(steps.run.outputs) }}
END
- name: Run
id: run
uses: ./.tmp/dynamic-action-instance
18 changes: 0 additions & 18 deletions .github/actions/upload-bootstrap-logs/action.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/bloat_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/project-chip/chip-build:41
image: ghcr.io/project-chip/chip-build:46

steps:
- name: Checkout
Expand All @@ -50,4 +50,4 @@ jobs:
--github-limit-artifacts 500 \
--github-limit-comments 20 \
--github-repository project-chip/connectedhomeip \
--github-api-token "${{ secrets.BLOAT_REPORT }}"
--github-api-token "${{ secrets.GITHUB_TOKEN }}"
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build:41
image: ghcr.io/project-chip/chip-build:46
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build:41
image: ghcr.io/project-chip/chip-build:46
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
Expand Down Expand Up @@ -279,7 +279,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build:41
image: ghcr.io/project-chip/chip-build:46
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
Expand Down Expand Up @@ -340,7 +340,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build:41
image: ghcr.io/project-chip/chip-build:46
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
Expand Down Expand Up @@ -449,7 +449,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build:41
image: ghcr.io/project-chip/chip-build:46
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build:41
image: ghcr.io/project-chip/chip-build:46
options: --user root

steps:
Expand All @@ -54,7 +54,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-esp32:41
image: ghcr.io/project-chip/chip-build-esp32:46
options: --user root

steps:
Expand All @@ -75,7 +75,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-nrf-platform:41
image: ghcr.io/project-chip/chip-build-nrf-platform:46
options: --user root

steps:
Expand All @@ -96,7 +96,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-telink:41
image: ghcr.io/project-chip/chip-build-telink:46
options: --user root

steps:
Expand All @@ -108,7 +108,7 @@ jobs:
platform: telink
# - name: Update Zephyr to specific revision (for developers purpose)
# shell: bash
# run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py b5c8028ec94f3efa69decff3a09f0d6f8a21fd6d"
# run: scripts/run_in_build_env.sh "python3 scripts/tools/telink/update_zephyr.py 65dc1812431bf946dfc110682298acf83d63e27a"
- name: CI Examples Telink
shell: bash
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cirque.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
# need to run with privilege, which isn't supported by job.XXX.contaner
# https://github.com/actions/container-action/issues/2
# container:
# image: ghcr.io/project-chip/chip-build-cirque:41
# image: ghcr.io/project-chip/chip-build-cirque:46
# volumes:
# - "/tmp:/tmp"
# - "/dev/pts:/dev/pts"
Expand All @@ -57,6 +57,7 @@ jobs:
with:
platform: linux

# TODO: Is what's being cached here actually compatible with a regular bootstrap?
- name: Bootstrap Cache
uses: ./.github/actions/bootstrap-cache
- name: Bootstrap Cirque
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/darwin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
LSAN_OPTIONS: detect_leaks=1 malloc_context_size=40 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt

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

steps:
- name: Checkout
Expand All @@ -72,15 +72,7 @@ jobs:

- name: Run macOS Darwin Framework Tool Build Debug
working-directory: src/darwin/Framework
# Keep whatever Xcode settings
# for OTHER_CFLAGS exist by using ${inherited}.
#
# Enable -Wconversion by hand as well, because it seems to not be
# enabled by default in the Xcode config.
#
# Disable availability annotations, since we are not building against a system
# Matter.framework.
run: xcodebuild -target "darwin-framework-tool" -sdk macosx -configuration Debug OTHER_CFLAGS='${inherited} -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
run: xcodebuild -target "darwin-framework-tool" -sdk macosx -configuration Debug
- name: Delete Defaults
run: defaults delete com.apple.dt.xctest.tool
continue-on-error: true
Expand Down
Loading

0 comments on commit bbf8ea8

Please sign in to comment.