From 1548bae49f9ff280b98ddf433c9f9f2adb0e617d Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Mon, 26 Jun 2023 18:35:39 -0700 Subject: [PATCH] Use actions to cut down on repeated workflow code (#27486) * Testing this out * Moving to actions * Can't do this for checkout :( * Giving these names * Collapsing more * Moving this to the right place * Moving these to the new standard ones * Updating name * Adding CodeQL * Moving last straggler over * This retry isn't buying us anything anymore, this was a github infra issue * Cleaning this one up too * Typo on this one * Size reports * Workaround not needed anymore * This needs to be done in this order * Typo in this flow * Fixing lint file * adding recursive back --- .github/actions/bootstrap-cache/action.yaml | 17 ++ .github/actions/bootstrap/action.yaml | 8 + .../action.yaml | 30 ++ .../actions/checkout-submodules/action.yaml | 16 + .../perform-codeql-analysis/action.yaml | 38 +++ .../actions/setup-size-reports/action.yaml | 15 + .../actions/upload-bootstrap-logs/action.yaml | 18 ++ .../actions/upload-size-reports/action.yaml | 17 ++ .github/workflows/bloat_check.yaml | 11 +- .github/workflows/build.yaml | 275 +++--------------- .github/workflows/chef.yaml | 89 +----- .github/workflows/cirque.yaml | 33 +-- .github/workflows/darwin-tests.yaml | 43 +-- .github/workflows/darwin.yaml | 43 +-- .github/workflows/docker_img.yaml | 10 +- .github/workflows/examples-ameba.yaml | 33 +-- .github/workflows/examples-asr.yaml | 33 +-- .github/workflows/examples-bouffalolab.yaml | 52 +--- .../workflows/examples-cc13x2x7_26x2x7.yaml | 60 +--- .github/workflows/examples-cc32xx.yaml | 52 +--- .github/workflows/examples-efr32.yaml | 56 +--- .github/workflows/examples-esp32.yaml | 89 +----- .github/workflows/examples-infineon.yaml | 52 +--- .github/workflows/examples-k32w.yaml | 52 +--- .github/workflows/examples-linux-arm.yaml | 52 +--- .github/workflows/examples-linux-imx.yaml | 34 +-- .../workflows/examples-linux-standalone.yaml | 52 +--- .github/workflows/examples-mbed.yaml | 52 +--- .github/workflows/examples-mw320.yaml | 52 +--- .github/workflows/examples-nrfconnect.yaml | 52 +--- .github/workflows/examples-openiotsdk.yaml | 39 +-- .github/workflows/examples-qpg.yaml | 53 +--- .github/workflows/examples-telink.yaml | 44 +-- .github/workflows/examples-tizen.yaml | 34 +-- .github/workflows/full-android.yaml | 43 +-- .github/workflows/fuzzing-build.yaml | 80 +---- .github/workflows/java-tests.yaml | 35 +-- .github/workflows/lint.yml | 43 +-- .github/workflows/minimal-build.yaml | 14 +- .github/workflows/qemu.yaml | 72 +---- .github/workflows/release_artifacts.yaml | 84 ++---- .github/workflows/smoketest-android.yaml | 42 +-- .github/workflows/spell.yml | 20 +- .github/workflows/tests.yaml | 146 ++-------- .github/workflows/todos.yaml | 10 +- .github/workflows/unit_integration_test.yaml | 26 +- .github/workflows/zap_regeneration.yaml | 35 +-- .github/workflows/zap_templates.yaml | 34 +-- examples/chef/README.md | 17 +- 49 files changed, 541 insertions(+), 1766 deletions(-) create mode 100644 .github/actions/bootstrap-cache/action.yaml create mode 100644 .github/actions/bootstrap/action.yaml create mode 100644 .github/actions/checkout-submodules-and-bootstrap/action.yaml create mode 100644 .github/actions/checkout-submodules/action.yaml create mode 100644 .github/actions/perform-codeql-analysis/action.yaml create mode 100644 .github/actions/setup-size-reports/action.yaml create mode 100644 .github/actions/upload-bootstrap-logs/action.yaml create mode 100644 .github/actions/upload-size-reports/action.yaml diff --git a/.github/actions/bootstrap-cache/action.yaml b/.github/actions/bootstrap-cache/action.yaml new file mode 100644 index 00000000000000..af0d09819a5e26 --- /dev/null +++ b/.github/actions/bootstrap-cache/action.yaml @@ -0,0 +1,17 @@ +name: Bootstrap cache +description: Bootstrap cache +runs: + using: "composite" + steps: + - uses: Wandalen/wretry.action@v1.3.0 + name: Bootstrap cache + continue-on-error: true + with: + action: buildjet/cache@v3 + attempt_limit: 3 + attempt_delay: 2000 + with: | + key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} + path: | + .environment + build_overrides/pigweed_environment.gni diff --git a/.github/actions/bootstrap/action.yaml b/.github/actions/bootstrap/action.yaml new file mode 100644 index 00000000000000..66e6645fff4992 --- /dev/null +++ b/.github/actions/bootstrap/action.yaml @@ -0,0 +1,8 @@ +name: Bootstrap +description: Bootstrap +runs: + using: "composite" + steps: + - name: Bootstrap + shell: bash + run: bash scripts/bootstrap.sh diff --git a/.github/actions/checkout-submodules-and-bootstrap/action.yaml b/.github/actions/checkout-submodules-and-bootstrap/action.yaml new file mode 100644 index 00000000000000..8b178ce64438fc --- /dev/null +++ b/.github/actions/checkout-submodules-and-bootstrap/action.yaml @@ -0,0 +1,30 @@ +name: Checkout submodules & Bootstrap +description: Checkout submodules & Bootstrap +inputs: + platform: + description: "Platform name" + required: true + extra-submodule-parameters: + description: "extra submodule parameters" + required: false + default: "" + bootstrap-log-name: + description: "Bootstrap log name" + required: false + default: bootstrap-logs +runs: + using: "composite" + steps: + - name: Checkout submodules + uses: ./.github/actions/checkout-submodules + with: + platform: ${{ inputs.platform }} + extra-parameters: ${{ inputs.extra-submodule-parameters }} + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache + - name: Bootstrap + uses: ./.github/actions/bootstrap + - name: Upload Bootstrap Logs + uses: ./.github/actions/upload-bootstrap-logs + with: + platform: ${{ inputs.bootstrap-log-name }} diff --git a/.github/actions/checkout-submodules/action.yaml b/.github/actions/checkout-submodules/action.yaml new file mode 100644 index 00000000000000..d5d4709ed3f37c --- /dev/null +++ b/.github/actions/checkout-submodules/action.yaml @@ -0,0 +1,16 @@ +name: Checkout submodules +description: Checkout submodules +inputs: + extra-parameters: + description: "extra parameters" + required: false + default: "" + platform: + description: "Platform name" + required: true +runs: + using: "composite" + steps: + - name: Checkout submodules + shell: bash + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ${{ inputs.platform }} ${{ inputs.extra-parameters }} diff --git a/.github/actions/perform-codeql-analysis/action.yaml b/.github/actions/perform-codeql-analysis/action.yaml new file mode 100644 index 00000000000000..ff63a60665f08c --- /dev/null +++ b/.github/actions/perform-codeql-analysis/action.yaml @@ -0,0 +1,38 @@ +name: Run CodeQL Analysis +description: Run and upload CodeQL Analysis +inputs: + language: + description: "language for codeql analysis" + required: true +runs: + using: "composite" + steps: + - name: Perform CodeQL Analysis + if: ${{ inputs.run-codeql }} + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{ inputs.language }}" + upload: False + output: sarif-results + - name: filter-sarif + if: ${{ inputs.run-codeql }} + uses: advanced-security/filter-sarif@v1 + with: + patterns: | + -**/third_party/** + -**/scripts/** + input: "sarif-results/${{ inputs.language }}.sarif" + output: "sarif-results/${{ inputs.language }}.sarif" + + - name: Upload SARIF + if: ${{ inputs.run-codeql }} + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: "sarif-results/${{ inputs.language }}.sarif" + - name: Upload loc as a Build Artifact + if: ${{ inputs.run-codeql }} + uses: actions/upload-artifact@v2.2.0 + with: + name: sarif-results + path: sarif-results + retention-days: 1 diff --git a/.github/actions/setup-size-reports/action.yaml b/.github/actions/setup-size-reports/action.yaml new file mode 100644 index 00000000000000..511a434242d2e6 --- /dev/null +++ b/.github/actions/setup-size-reports/action.yaml @@ -0,0 +1,15 @@ +name: Setup size reports +description: Setup size reports +inputs: + gh-context: + description: "GH Context" + required: true + +runs: + using: "composite" + steps: + - name: Set up environment for size reports + shell: bash + env: + GH_CONTEXT: ${{ inputs.gh-context }} + run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" diff --git a/.github/actions/upload-bootstrap-logs/action.yaml b/.github/actions/upload-bootstrap-logs/action.yaml new file mode 100644 index 00000000000000..85209c7302f2a5 --- /dev/null +++ b/.github/actions/upload-bootstrap-logs/action.yaml @@ -0,0 +1,18 @@ +name: Upload bootstrap logs +description: Upload bootstrap logs +inputs: + bootstrap-log-name: + description: "Bootstrap log name" + required: false + default: bootstrap-logs +runs: + using: "composite" + steps: + - name: Uploading bootstrap logs + uses: actions/upload-artifact@v3 + if: ${{ always() && !env.ACT }} + with: + name: ${{ inputs.bootstrap-log-name }} + path: | + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log diff --git a/.github/actions/upload-size-reports/action.yaml b/.github/actions/upload-size-reports/action.yaml new file mode 100644 index 00000000000000..c71312ae6578ee --- /dev/null +++ b/.github/actions/upload-size-reports/action.yaml @@ -0,0 +1,17 @@ +name: upload-size-reports +description: upload-size-reports +inputs: + platform-name: + description: "Platform name Name" + required: true + +runs: + using: "composite" + steps: + - name: Uploading Size Reports + uses: actions/upload-artifact@v3 + if: ${{ !env.ACT }} + with: + name: Size,${{ inputs.platform-name }}-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} + path: | + /tmp/bloat_reports/ diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 33651d52198a01..c44f9a5559c8ed 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -36,15 +36,8 @@ jobs: image: connectedhomeip/chip-build:0.7.3 steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - + - name: Checkout + uses: actions/checkout@v3 - name: Report run: | scripts/tools/memory/gh_report.py \ diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b187652a85871e..2cf7dc01d8f5ae 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,9 +31,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: build_linux_gcc_debug: name: Build on Linux (gcc_debug) @@ -57,46 +55,17 @@ jobs: env: CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} run: echo "$CONCURRENCY_CONTEXT" - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + - name: Checkout + uses: actions/checkout@v3 - name: Try to ensure the directories for core dumping exist and we can write them. run: | mkdir /tmp/cores || true sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - + platform: linux - name: Initialize CodeQL if: ${{ inputs.run-codeql }} uses: github/codeql-action/init@v2 @@ -138,34 +107,9 @@ jobs: retention-days: 5 - name: Perform CodeQL Analysis if: ${{ inputs.run-codeql }} - uses: github/codeql-action/analyze@v2 - with: - category: "/language:cpp" - upload: False - output: sarif-results - - name: filter-sarif - if: ${{ inputs.run-codeql }} - uses: advanced-security/filter-sarif@v1 - with: - patterns: | - -**/third_party/** - -**/scripts/** - input: "sarif-results/cpp.sarif" - output: "sarif-results/cpp.sarif" - - - name: Upload SARIF - if: ${{ inputs.run-codeql }} - uses: github/codeql-action/upload-sarif@v2 + uses: ./.github/actions/perform-codeql-analysis with: - sarif_file: "sarif-results/cpp.sarif" - - - name: Upload loc as a Build Artifact - if: ${{ inputs.run-codeql }} - uses: actions/upload-artifact@v2.2.0 - with: - name: sarif-results - path: sarif-results - retention-days: 1 + language: cpp # OBJDIR on linux is > 10K files and takes more than 50 minutes to upload, usually # having the job timeout. # @@ -202,45 +146,17 @@ jobs: env: CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} run: echo "$CONCURRENCY_CONTEXT" - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + - name: Checkout + uses: actions/checkout@v3 - name: Try to ensure the directories for core dumping exist and we can write them. run: | mkdir /tmp/cores || true sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: linux - name: Initialize CodeQL if: ${{ inputs.run-codeql }} uses: github/codeql-action/init@v2 @@ -326,34 +242,10 @@ jobs: "./scripts/build/build_examples.py --target linux-fake-tests build" - name: Perform CodeQL Analysis if: ${{ inputs.run-codeql }} - uses: github/codeql-action/analyze@v2 - with: - category: "/language:cpp" - upload: False - output: sarif-results - - name: filter-sarif - if: ${{ inputs.run-codeql }} - uses: advanced-security/filter-sarif@v1 - with: - patterns: | - -**/third_party/** - -**/scripts/** - input: "sarif-results/cpp.sarif" - output: "sarif-results/cpp.sarif" - - - name: Upload SARIF - if: ${{ inputs.run-codeql }} - uses: github/codeql-action/upload-sarif@v2 + uses: ./.github/actions/perform-codeql-analysis with: - sarif_file: "sarif-results/cpp.sarif" + language: cpp - - name: Upload loc as a Build Artifact - if: ${{ inputs.run-codeql }} - uses: actions/upload-artifact@v2.2.0 - with: - name: sarif-results - path: sarif-results - retention-days: 1 - name: Uploading core files uses: actions/upload-artifact@v3 if: ${{ failure() && !env.ACT }} @@ -398,32 +290,12 @@ jobs: env: CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} run: echo "$CONCURRENCY_CONTEXT" - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: linux - name: Setup Build, Run Build and Run Tests run: | @@ -449,49 +321,21 @@ jobs: if: github.actor != 'restyled-io[bot]' steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin + platform: darwin - name: Try to ensure the directory for diagnostic log collection exists run: | mkdir -p ~/Library/Logs/DiagnosticReports || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - - name: Initialize CodeQL if: ${{ inputs.run-codeql }} uses: github/codeql-action/init@v2 with: languages: "cpp" + - name: Setup and Build Simulated Device run: | BUILD_TYPE=simulated @@ -536,36 +380,13 @@ jobs: with: name: crash-log-darwin path: ~/Library/Logs/DiagnosticReports/ + - name: Perform CodeQL Analysis if: ${{ inputs.run-codeql }} - uses: github/codeql-action/analyze@v2 + uses: ./.github/actions/perform-codeql-analysis with: - category: "/language:cpp" - upload: False - output: sarif-results - - name: filter-sarif - if: ${{ inputs.run-codeql }} - uses: advanced-security/filter-sarif@v1 - with: - patterns: | - -**/third_party/** - -**/scripts/** - input: "sarif-results/cpp.sarif" - output: "sarif-results/cpp.sarif" - - - name: Upload SARIF - if: ${{ inputs.run-codeql }} - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: "sarif-results/cpp.sarif" + language: cpp - - name: Upload loc as a Build Artifact - if: ${{ inputs.run-codeql }} - uses: actions/upload-artifact@v2.2.0 - with: - name: sarif-results - path: sarif-results - retention-days: 1 # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 # TODO https://github.com/project-chip/connectedhomeip/issues/1512 @@ -583,40 +404,12 @@ jobs: net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: linux - name: Run Build Coverage run: ./scripts/build_coverage.sh diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index fae5880d89f5d7..183c115555f0e2 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: chef_linux: name: Chef - Linux CI Examples @@ -39,31 +37,12 @@ jobs: options: --user root steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: linux - name: CI Examples Linux shell: bash run: | @@ -79,31 +58,12 @@ jobs: options: --user root steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32 - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: esp32 - name: CI Examples ESP32 shell: bash run: | @@ -119,31 +79,12 @@ jobs: options: --user root steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform nrfconnect - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: nrfconnect - name: CI Examples NRFConnect shell: bash run: | diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index 8388e90aff5c47..321b450f8799de 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -26,9 +26,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: cirque: name: Cirque @@ -53,30 +51,15 @@ jobs: # options: "--privileged" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + uses: ./.github/actions/checkout-submodules with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni + platform: linux + + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache - name: Bootstrap run: | integrations/docker/images/chip-build-cirque/run.sh \ diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index 885f935c0a19f1..0920d90438c979 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -28,9 +28,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: test_suites_chip_tool_darwin: name: Test Suites - Darwin @@ -46,16 +44,8 @@ jobs: runs-on: macos-latest steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin + - name: Checkout + uses: actions/checkout@v3 - name: Setup Environment # coreutils for stdbuf run: brew install coreutils @@ -66,30 +56,11 @@ jobs: sudo chown ${USER} /cores || true mkdir -p ~/Library/Logs/DiagnosticReports || true mkdir objdir-clone || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: darwin + bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - name: Run macOS Darwin Framework Tool Build Debug working-directory: src/darwin/Framework diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index 1ec153e0f8af06..a422c2066a8d98 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -26,9 +26,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: darwin: name: Build Darwin @@ -37,43 +35,14 @@ jobs: runs-on: macos-latest steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin + - name: Checkout + uses: actions/checkout@v3 - name: Setup Environment run: brew install python@3.9 - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - + platform: darwin - name: Block zap-cli from being used # xcodebuild is NOT expected to require zap-cli run: scripts/run_in_build_env.sh 'D=$(dirname $(which zap-cli)) && mv $D/zap-cli $D/zap-cli.moved' diff --git a/.github/workflows/docker_img.yaml b/.github/workflows/docker_img.yaml index 975e5194a4208e..150922d984fb08 100644 --- a/.github/workflows/docker_img.yaml +++ b/.github/workflows/docker_img.yaml @@ -56,14 +56,8 @@ jobs: # 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: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - name: Build All images using project bash script run: | cd integrations/docker/images/chip-build${{ matrix.img }} diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 51d8961f80ce7b..ef5947ec4adbbe 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: ameba: name: Ameba @@ -42,31 +40,12 @@ jobs: options: --user root steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ameba - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: ameba - name: Build example Ameba All Clusters App run: | ./scripts/run_in_build_env.sh \ diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index 49788293fe7a8b..b826fcbe88c16c 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: asr: name: ASR @@ -40,31 +38,12 @@ jobs: options: --user root steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform asr - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: asr - name: Build all ASR582X examples run: | ./scripts/run_in_build_env.sh \ diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index 9d5920fa47b255..a22eb4c81cf1a2 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -26,8 +26,6 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 jobs: bouffalolab: @@ -41,46 +39,18 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform bouffalolab --recursive - + platform: bouffalolab + extra-submodule-parameters: " --recursive" - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - + gh-context: ${{ toJson(github) }} - name: Build example BL602 Lighting App run: | ./scripts/run_in_build_env.sh \ @@ -126,9 +96,7 @@ jobs: run: rm -rf ./out - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,BouffaloLab-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: BouffaloLab diff --git a/.github/workflows/examples-cc13x2x7_26x2x7.yaml b/.github/workflows/examples-cc13x2x7_26x2x7.yaml index 3661bc8187f3a4..7d9ec65e5aac25 100644 --- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml +++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml @@ -24,9 +24,7 @@ concurrency: cancel-in-progress: true env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: cc26x2x7: name: cc26x2x7 @@ -45,46 +43,18 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform cc13xx_26xx + platform: cc13xx_26xx - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - + gh-context: ${{ toJson(github) }} + - name: Build examples run: | scripts/run_in_build_env.sh "\ @@ -152,16 +122,12 @@ jobs: out/artifacts/ti-cc13x4_26x4-lighting/chip-LP_EM_CC1354P10_6-lighting-example.out \ /tmp/bloat_reports/ - name: Uploading Size Reports - uses: actions/upload-artifact@v2 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,cc13x2x7_26x2x7-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: cc13x2x7_26x2x7 - name: Uploading Size Reports - uses: actions/upload-artifact@v2 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,cc13x4_26x4-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: cc13x4_26x4 diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 027b9fb0b93a36..66c0f47e41d526 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: cc32xx: name: cc32xx @@ -43,45 +41,17 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform cc32xx + platform: cc32xx - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build examples run: | @@ -98,9 +68,7 @@ jobs: /tmp/bloat_reports/ - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,cc32xx-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: cc32xx diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 89e52ab036bc53..5f384b4542d899 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -25,8 +25,6 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 jobs: efr32: @@ -44,49 +42,21 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform silabs_docker - - # - name: Out of Tree verification - # run: third_party/silabs/out_of_tree_verification.sh + platform: silabs_docker - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - # - name: Test SLC gen + gh-context: ${{ toJson(github) }} + +# - name: Test SLC gen + # timeout-minutes: 30 # run: | # scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4187C --slc_generate --docker # scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4164A --slc_generate --docker @@ -133,9 +103,7 @@ jobs: - name: Clean out build output run: rm -rf ./out - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,EFR32-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: EFR32 diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 9f941b99df06f3..f795cd4863ae5c 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: esp32: name: ESP32 @@ -41,46 +39,18 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32 + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: esp32 - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build some M5Stack variations run: | @@ -145,11 +115,10 @@ jobs: run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,ESP32-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: /tmp/bloat_reports/ + platform-name: ESP32 esp32_1: name: ESP32_1 @@ -163,40 +132,12 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32 - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: esp32 - name: Build example Bridge App run: scripts/examples/esp_example.sh bridge-app diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index b5045a8153e907..b798ae148c58cd 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -26,9 +26,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: infineon: name: Infineon examples building @@ -41,46 +39,18 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform infineon + platform: infineon - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build PSoC6 lock-app example run: | @@ -171,9 +141,7 @@ jobs: out/artifacts/cyw30739-cyw930739m2evb_01-switch/chip-cyw30739-light-switch-example.elf \ /tmp/bloat_reports/ - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,Infineon-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: Infineon \ No newline at end of file diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index 656b097b9de09d..fa80b0d146e725 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: k32w: name: K32W @@ -43,46 +41,18 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform k32w0 + platform: k32w0 - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build examples run: | @@ -116,9 +86,7 @@ jobs: out/artifacts/k32w-contact-crypto-platform-tokenizer/chip-k32w0x-contact-example \ /tmp/bloat_reports/ - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,K32W-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: K32W diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 1e8b9af889af78..15a55fbb604b36 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: arm_crosscompile: name: Linux ARM Cross compile @@ -41,46 +39,18 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + platform: linux - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build Some samples run: | @@ -108,9 +78,7 @@ jobs: out/linux-arm64-thermostat-no-ble-clang/thermostat-app \ /tmp/bloat_reports/ - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,Linux-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: Linux diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 8a9a69dc3212f3..476d94793023a1 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: imx: name: Linux i.MX Build @@ -39,32 +37,12 @@ jobs: image: connectedhomeip/chip-build-imx:0.7.19.1 steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: linux - name: Build lighting-app run: | diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index b6b125f03fa3f2..3bd48a1960b8ba 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: linux_standalone: name: Linux Standalone @@ -41,46 +39,18 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + platform: linux - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build Standalone cert tool run: | @@ -211,9 +181,7 @@ jobs: --target linux-x64-contact-sensor-no-ble-with-ui \ build" - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,Linux-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: Linux-Standalone diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 46b5c6f83962b4..e1fb72d40301f3 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -26,9 +26,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: mbedos: name: Mbed OS examples building @@ -47,16 +45,12 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform mbed + platform: mbed - name: Detect changed paths uses: dorny/paths-filter@v2 @@ -69,34 +63,10 @@ jobs: - 'examples/pigweed-app/mbed/**' - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build lock-app example run: | @@ -173,9 +143,7 @@ jobs: run: scripts/tests/mbed/mbed_unit_tests.sh -b=$APP_TARGET -p=$APP_PROFILE - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,Mbed-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: Mbed diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 743167a01117c8..d685fb26cd384b 100755 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: mw320: name: MW320 @@ -43,46 +41,18 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform mw320 + platform: mw320 - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build MW320 all clusters example app run: | @@ -93,9 +63,7 @@ jobs: --copy-artifacts-to out/artifacts \ " - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,MW320-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: MW320 diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index f7d17fb29d4b5c..985f3b5c7fff82 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: nrfconnect: name: nRF Connect SDK @@ -44,16 +42,12 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform nrfconnect + platform: nrfconnect - name: Detect changed paths uses: dorny/paths-filter@v2 id: changed_paths @@ -68,34 +62,10 @@ jobs: shell: - 'examples/shell/nrfconnect/**' - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Check nRF Connect SDK revision. run: scripts/run_in_build_env.sh "python3 scripts/setup/nrfconnect/update_ncs.py --check" @@ -233,9 +203,7 @@ jobs: src/test_driver/nrfconnect/build/Testing/Temporary/LastTest.log - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,nRFConnect-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: nRFConnect diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index ebbafce22fbf3a..15bfa0b5bab8df 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -26,9 +26,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: openiotsdk: name: Open IoT SDK examples building @@ -46,38 +44,19 @@ jobs: options: --privileged steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --recursive --platform openiotsdk + platform: openiotsdk + extra-submodule-parameters: " --recursive" - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + gh-context: ${{ toJson(github) }} - name: Build and install Python controller run: | diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 4e5225893ac5cb..0f426d8286999b 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: qpg: name: QPG @@ -43,46 +41,18 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform qpg + platform: qpg - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build QPG6105 example apps run: | @@ -110,11 +80,8 @@ jobs: qpg qpg6105+debug lock-app \ out/qpg-qpg6105-lock/chip-qpg6105-lock-example.out \ /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,QPG-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: QPG \ No newline at end of file diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 9d7890782129de..05c0adcccff319 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: telink: name: Telink @@ -43,38 +41,18 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform telink + platform: telink - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + gh-context: ${{ toJson(github) }} - name: Build example Telink All Clusters App run: | @@ -272,9 +250,7 @@ jobs: run: rm -rf ./out - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,Telink-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: Telink diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 42a1c8d7b72349..655b6a092f7f81 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: tizen: name: Tizen @@ -43,32 +41,12 @@ jobs: - "/tmp/output_binaries:/tmp/output_binaries" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform tizen - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: tizen - name: Build Tizen examples run: | diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index 2815716e278bd9..2ec4fdcca3e7ae 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -24,9 +24,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: full_android: name: Run @@ -43,16 +41,11 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - uses: Wandalen/wretry.action@v1.3.0 - if: ${{ !env.ACT }} + - uses: actions/checkout@v3 name: Checkout with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - # To use act like: + token: ${{ github.token }} + # To use act like: # act -j full_android # # Note you likely still need to have non submodules setup for the @@ -61,32 +54,10 @@ jobs: - uses: actions/checkout@v3.5.2 if: ${{ env.ACT }} name: Checkout (ACT for local build) - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform android - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: android - name: Build Android arm-chip-tool run: | diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index 7d3aefa882bc4a..aabb379e8a8deb 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -24,9 +24,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: build_linux_fuzzing: name: Build on Linux @@ -40,44 +38,20 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - submodules: true - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - run: apt-get update - run: apt-get install --fix-missing llvm-10 clang-10 - name: Try to ensure the objdir-clone dir exists run: | mkdir objdir-clone || true - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + uses: ./.github/actions/bootstrap + - name: Upload Bootstrap Logs + uses: ./.github/actions/upload-bootstrap-logs - name: Build all-clusters-app run: | @@ -102,44 +76,20 @@ jobs: if: github.actor != 'restyled-io[bot]' steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - submodules: true - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - name: Setup Environment run: brew install llvm - name: Try to ensure the objdir-clone dir exists run: | mkdir objdir-clone || true - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + uses: ./.github/actions/bootstrap + - name: Upload Bootstrap Logs + uses: ./.github/actions/upload-bootstrap-logs - name: Build all-clusters-app run: | diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index af87116d985698..f56b1c42d77c5c 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -28,9 +28,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: java_tests_linux: name: Linux @@ -49,38 +47,17 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3.5.2 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - name: Try to ensure the directories for core dumping exist and we can write them. run: | mkdir /tmp/cores || true sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true mkdir objdir-clone || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - name: Generate unit tests run: | scripts/run_in_build_env.sh \ diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9b442b24ddceba..5c2a7441b08ad9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,10 +23,6 @@ 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 -env: - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - jobs: code-lints: runs-on: ubuntu-latest @@ -36,44 +32,15 @@ jobs: image: connectedhomeip/chip-build:0.6.47 steps: - - uses: Wandalen/wretry.action@v1.3.0 - if: ${{ !env.ACT }} - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - # To use act like: - # act -j code-lints - # - # Note you likely still need to have non submodules setup for the - # local machine, like: - # git submodule deinit --all - - uses: actions/checkout@v3.5.2 - if: ${{ env.ACT }} - name: Checkout (ACT for local build) + - name: Checkout + uses: actions/checkout@v3 # Bootstrap and checkout for internal scripts (like idl_lint) # to run - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: linux - name: Check for matter lint errors if: always() diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index 0a209feec9ff1f..ea63c286056893 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -34,16 +34,12 @@ jobs: image: connectedhomeip/chip-build-minimal:0.7.3 steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + platform: linux - name: Configure and build All Clusters App run: | CC=gcc CXX=g++ scripts/configure --project=examples/all-clusters-app/linux && ./ninja-build diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 7b5a81eafab98c..43faed9920953d 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: qemu-esp32: @@ -45,40 +43,12 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32 - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: esp32 - name: Build ESP32 QEMU test images run: | @@ -111,32 +81,12 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform tizen - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: tizen - name: Build and run tests run: | diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index cfc9280cba1330..9e2c26166fef7f 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -23,9 +23,7 @@ on: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: esp32: name: ESP32 @@ -37,40 +35,16 @@ jobs: image: connectedhomeip/chip-build-esp32:0.7.3 steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - submodules: true - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - ref: "${{ github.event.inputs.releaseTag }}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni + ref: "${{ github.event.inputs.releaseTag }}" + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + uses: ./.github/actions/bootstrap + - name: Upload Bootstrap Logs + uses: ./.github/actions/upload-bootstrap-logs - name: Build run: scripts/examples/esp_example.sh all-clusters-app @@ -96,40 +70,16 @@ jobs: container: image: connectedhomeip/chip-build-efr32:0.7.3 steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 with: - action: actions/checkout@v3.5.2 - with: | - submodules: true - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - ref: "${{ github.event.inputs.releaseTag }}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni + ref: "${{ github.event.inputs.releaseTag }}" + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + uses: ./.github/actions/bootstrap + - name: Upload Bootstrap Logs + uses: ./.github/actions/upload-bootstrap-logs - name: Build example EFR32 Lock App run: scripts/examples/gn_silabs_example.sh examples/lock-app/efr32/ diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 5e8335ff9b7a93..8a095f0e604173 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: android: name: Smoke Run - Android @@ -44,40 +42,12 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform android - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: android - name: Build Android CHIPTool and CHIPTest (ARM64) run: | diff --git a/.github/workflows/spell.yml b/.github/workflows/spell.yml index 2280119b06b3e0..6c562b9b73979b 100644 --- a/.github/workflows/spell.yml +++ b/.github/workflows/spell.yml @@ -29,14 +29,8 @@ jobs: name: Check Spelling - reviewdog runs-on: ubuntu-latest steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - uses: reviewdog/action-misspell@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -44,12 +38,6 @@ jobs: name: Check Spelling - pyspelling runs-on: ubuntu-latest steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - uses: igsekor/pyspelling-any@v1.0.4 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 3d87c5ecd4a005..27c5ac86a1c1e6 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -28,9 +28,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: test_suites_linux: name: Test Suites - Linux @@ -54,15 +52,8 @@ jobs: net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" steps: - - uses: Wandalen/wretry.action@v1.3.0 - if: ${{ !env.ACT }} - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 # To use act like: # act -j test_suites_linux # @@ -72,8 +63,11 @@ jobs: - uses: actions/checkout@v3.5.2 if: ${{ env.ACT }} name: Checkout (ACT for local build) - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - name: Try to ensure the directories for core dumping exist and we can write them. run: | @@ -81,30 +75,6 @@ jobs: sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true mkdir objdir-clone || true - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - - name: Validate that xml are parsable # The sub-items being run here are the same as the input XMLs listed # at src/app/zap-templates/zcl/zcl.json @@ -330,16 +300,8 @@ jobs: runs-on: macos-latest steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin + - name: Checkout + uses: actions/checkout@v3 - name: Setup Environment # coreutils for stdbuf run: brew install coreutils @@ -350,30 +312,12 @@ jobs: sudo chown ${USER} /cores || true mkdir -p ~/Library/Logs/DiagnosticReports || true mkdir objdir-clone || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: darwin + bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + - name: Build Apps run: | @@ -465,8 +409,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3.5.2 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - name: Try to ensure the directories for core dumping exist and we can write them. run: | @@ -474,30 +421,6 @@ jobs: sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true mkdir objdir-clone || true - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - - name: Build Python REPL and example apps run: | scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv --extra_packages "mobly"' @@ -557,8 +480,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3.5.2 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin - name: Setup Environment # coreutils for stdbuf run: brew install coreutils @@ -569,30 +490,11 @@ jobs: sudo chown ${USER} /cores || true mkdir -p ~/Library/Logs/DiagnosticReports || true mkdir objdir-clone || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: darwin + bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - name: Build Python REPL and example apps run: | diff --git a/.github/workflows/todos.yaml b/.github/workflows/todos.yaml index 5fb1a3d85098c8..f80dbd784eb69e 100644 --- a/.github/workflows/todos.yaml +++ b/.github/workflows/todos.yaml @@ -23,14 +23,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - name: Run Issue Bot uses: derjuulsn/todo-issue@main with: diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index db74425fe40d0f..366a26d4b7fae6 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -43,28 +43,12 @@ jobs: options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - name: Bootstrap - run: | - mkdir -p /tmp/log_output ; - bash scripts/bootstrap.sh ; - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: linux - name: Artifact suffix id: outsuffix uses: haya14busa/action-cond@v1 diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 60e2a850016791..2d7bb344e674b2 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -23,9 +23,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: zap_regeneration: name: ZAP Regeneration @@ -39,33 +37,14 @@ jobs: if: github.actor != 'restyled-io[bot]' steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 with: - action: actions/checkout@v3.5.2 - with: | - submodules: true - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + submodules: true + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: linux - name: Generate all run: ./scripts/run_in_build_env.sh scripts/tools/zap_regen_all.py diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 35cc94bc7f8ec0..4ab45952330bae 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: zap_templates: name: ZAP templates generation @@ -41,32 +39,12 @@ jobs: if: github.actor != 'restyled-io[bot]' steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: linux - name: Generate all run: ./scripts/run_in_build_env.sh scripts/tools/zap_regen_all.py diff --git a/examples/chef/README.md b/examples/chef/README.md index 69116306a2f8c1..cd384b2350fdd9 100644 --- a/examples/chef/README.md +++ b/examples/chef/README.md @@ -137,19 +137,12 @@ chef_$PLATFORM: options: --user root steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: | - scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform $PLATFORM - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: $PLATFORM - name: CI Examples $PLATFORM shell: bash run: |