From 4f47a3344ed79f589ebfae976d4175044783f6c3 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 4 Mar 2022 15:54:19 -0800 Subject: [PATCH] Checkouts are constantly timing out, trying some retries (#15883) * Update build.yaml * Trying passing in token * Adding retries --- .github/workflows/bloat_check.yaml | 13 +- .github/workflows/build.yaml | 156 ++++++++++-------- .github/workflows/cirque.yaml | 48 +++--- .github/workflows/darwin.yaml | 43 ++--- .github/workflows/docker_img.yaml | 15 +- .github/workflows/doxygen.yaml | 113 +++++++------ .github/workflows/examples-ameba.yaml | 18 +- .github/workflows/examples-cyw30739.yaml | 15 +- .github/workflows/examples-efr32.yaml | 17 +- .github/workflows/examples-esp32.yaml | 32 ++-- .github/workflows/examples-infineon.yaml | 81 ++++----- .github/workflows/examples-k32w.yaml | 17 +- .github/workflows/examples-linux-arm.yaml | 17 +- .github/workflows/examples-linux-imx.yaml | 15 +- .../workflows/examples-linux-standalone.yaml | 21 ++- .github/workflows/examples-nrfconnect.yaml | 37 +++-- .github/workflows/examples-qpg.yaml | 15 +- .github/workflows/examples-telink.yaml | 23 ++- .github/workflows/examples-tizen.yaml | 18 +- .github/workflows/fixit_rotation.yaml | 12 +- .github/workflows/full-android.yaml | 27 +-- .github/workflows/full-mbed.yaml | 15 +- .github/workflows/fuzzing-build.yaml | 39 +++-- .github/workflows/lint.yml | 81 ++++----- .github/workflows/qemu.yaml | 15 +- .github/workflows/rebase.yaml | 36 ++-- .github/workflows/release_artifacts.yaml | 33 ++-- .github/workflows/smoketest-android.yaml | 23 ++- .github/workflows/smoketest-mbed.yaml | 15 +- .github/workflows/spell.yml | 27 ++- .github/workflows/tests.yaml | 52 +++--- .github/workflows/todos.yaml | 60 ++++--- .github/workflows/unit_integration_test.yaml | 20 ++- .github/workflows/zap_regeneration.yaml | 37 +++-- .github/workflows/zap_templates.yaml | 35 ++-- scripts/tools/memory/README-GitHub-CI.md | 2 +- 36 files changed, 727 insertions(+), 516 deletions(-) diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 10d6e8df877638..43db1458ebbc30 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -22,7 +22,7 @@ concurrency: # Don't cancel an already-running bloat check just because it took more # than 5 minutes to run and our cron job is trying to schedule a new one. cancel-in-progress: false - + jobs: pull_request_update: name: Report on pull requests @@ -33,8 +33,15 @@ jobs: image: connectedhomeip/chip-build:0.5.56 steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout + with: + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Report run: | diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5896c01e683ee1..853eebb3143726 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -35,24 +35,27 @@ jobs: image: connectedhomeip/chip-build:0.5.56 volumes: - "/tmp/log_output:/tmp/test_logs" - options: - --sysctl "net.ipv6.conf.all.disable_ipv6=0 + options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" steps: - name: Dump GitHub context env: - GITHUB_CONTEXT: ${{ toJSON(github) }} + GITHUB_CONTEXT: ${{ toJSON(github) }} run: echo "$GITHUB_CONTEXT" - name: Dump Concurrency context 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 }} + 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" - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true - + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Bootstrap timeout-minutes: 10 run: scripts/build/gn_bootstrap.sh @@ -62,8 +65,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Setup Build run: scripts/build/gn_gen.sh --args="chip_config_memory_debug_checks=true chip_config_memory_debug_dmalloc=true" - name: Run Build @@ -97,7 +100,7 @@ jobs: run: scripts/run_in_build_env.sh "ninja -C ./out" build_linux: name: Build on Linux (fake, gcc_release, clang, mbedtls, simulated) - timeout-minutes: 120 + timeout-minutes: 120 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -106,23 +109,27 @@ jobs: image: connectedhomeip/chip-build:0.5.56 volumes: - "/tmp/log_output:/tmp/test_logs" - options: - --sysctl "net.ipv6.conf.all.disable_ipv6=0 + options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" steps: - name: Dump GitHub context env: - GITHUB_CONTEXT: ${{ toJSON(github) }} + GITHUB_CONTEXT: ${{ toJSON(github) }} run: echo "$GITHUB_CONTEXT" - name: Dump Concurrency context 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 }} + 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" - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 # - name: Initialize CodeQL # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} # uses: github/codeql-action/init@v1 @@ -137,16 +144,16 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Setup and Build Simulated Device timeout-minutes: 20 run: | - BUILD_TYPE=simulated - GN_ARGS='chip_tests_zap_config="app1" chip_project_config_include_dirs=["../../examples/placeholder/linux/apps/app1/include", "../../config/standalone"] chip_config_network_layer_ble=false' - CHIP_ROOT_PATH=examples/placeholder/linux - CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS" - scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" + BUILD_TYPE=simulated + GN_ARGS='chip_tests_zap_config="app1" chip_project_config_include_dirs=["../../examples/placeholder/linux/apps/app1/include", "../../config/standalone"] chip_config_network_layer_ble=false' + CHIP_ROOT_PATH=examples/placeholder/linux + CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS" + scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" - name: Setup Build, Run Build and Run Tests timeout-minutes: 90 run: | @@ -167,39 +174,39 @@ jobs: env: LSAN_OPTIONS: detect_leaks=0 run: | - # for BUILD_TYPE in asan msan tsan ubsan; do - for BUILD_TYPE in asan tsan ubsan; do - case $BUILD_TYPE in - "asan") GN_ARGS='is_clang=true is_asan=true';; - "msan") GN_ARGS='is_clang=true is_msan=true';; - "tsan") GN_ARGS='is_clang=true is_tsan=true chip_enable_wifi=false';; - "ubsan") GN_ARGS='is_clang=true is_ubsan=true';; - esac + # for BUILD_TYPE in asan msan tsan ubsan; do + for BUILD_TYPE in asan tsan ubsan; do + case $BUILD_TYPE in + "asan") GN_ARGS='is_clang=true is_asan=true';; + "msan") GN_ARGS='is_clang=true is_msan=true';; + "tsan") GN_ARGS='is_clang=true is_tsan=true chip_enable_wifi=false';; + "ubsan") GN_ARGS='is_clang=true is_ubsan=true';; + esac - scripts/build/gn_gen.sh --args="$GN_ARGS" - scripts/tests/gn_tests.sh - done + scripts/build/gn_gen.sh --args="$GN_ARGS" + scripts/tests/gn_tests.sh + done - name: Build using build_examples.py timeout-minutes: 40 run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps \ - --target linux-x64-all-clusters \ - --target linux-x64-all-clusters-ipv6only \ - --target linux-x64-chip-tool \ - --target linux-x64-chip-tool-ipv6only \ - --target linux-x64-minmdns-ipv6only \ - --target linux-x64-rpc-console \ - --target linux-x64-thermostat-ipv6only \ - --target linux-x64-tv-app-ipv6only \ - build \ - " + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --no-log-timestamps \ + --target linux-x64-all-clusters \ + --target linux-x64-all-clusters-ipv6only \ + --target linux-x64-chip-tool \ + --target linux-x64-chip-tool-ipv6only \ + --target linux-x64-minmdns-ipv6only \ + --target linux-x64-rpc-console \ + --target linux-x64-thermostat-ipv6only \ + --target linux-x64-tv-app-ipv6only \ + build \ + " - name: Run fake linux tests timeout-minutes: 15 run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target linux-fake-tests build" + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --no-log-timestamps --target linux-fake-tests build" # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 # TODO https://github.com/project-chip/connectedhomeip/issues/1512 @@ -229,32 +236,36 @@ jobs: image: connectedhomeip/chip-build:0.5.56 volumes: - "/tmp/log_output:/tmp/test_logs" - options: - --sysctl "net.ipv6.conf.all.disable_ipv6=0 + options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" steps: - name: Dump GitHub context env: - GITHUB_CONTEXT: ${{ toJSON(github) }} + GITHUB_CONTEXT: ${{ toJSON(github) }} run: echo "$GITHUB_CONTEXT" - name: Dump Concurrency context 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 }} + 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" - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Bootstrap timeout-minutes: 10 run: scripts/build/gn_bootstrap.sh - name: Setup Build, Run Build and Run Tests timeout-minutes: 50 run: | - scripts/build/gn_gen.sh --args="enable_rtti=true enable_pylib=true chip_config_memory_debug_checks=false chip_config_memory_debug_dmalloc=false" - scripts/run_in_build_env.sh "ninja -C ./out" - scripts/tests/gn_tests.sh + scripts/build/gn_gen.sh --args="enable_rtti=true enable_pylib=true chip_config_memory_debug_checks=false chip_config_memory_debug_dmalloc=false" + scripts/run_in_build_env.sh "ninja -C ./out" + scripts/tests/gn_tests.sh - name: Run Python library specific unit tests timeout-minutes: 5 run: | @@ -267,10 +278,15 @@ jobs: if: github.actor != 'restyled-io[bot]' steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 #- name: Initialize CodeQL # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} # uses: github/codeql-action/init@v1 @@ -298,16 +314,16 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Setup and Build Simulated Device timeout-minutes: 20 run: | - BUILD_TYPE=simulated - GN_ARGS='chip_tests_zap_config="app1" chip_project_config_include_dirs=["../../examples/placeholder/linux/apps/app1/include", "../../config/standalone"] chip_config_network_layer_ble=false' - CHIP_ROOT_PATH=examples/placeholder/linux - CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS" - scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" + BUILD_TYPE=simulated + GN_ARGS='chip_tests_zap_config="app1" chip_project_config_include_dirs=["../../examples/placeholder/linux/apps/app1/include", "../../config/standalone"] chip_config_network_layer_ble=false' + CHIP_ROOT_PATH=examples/placeholder/linux + CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS" + scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" - name: Setup Build, Run Build and Run Tests timeout-minutes: 120 # Just go ahead and do the "all" build; on Darwin that's fairly diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index 74d16ffa84c42d..5ae9f998e3a2f4 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -15,9 +15,9 @@ name: Cirque on: - push: - pull_request: - workflow_dispatch: + push: + pull_request: + workflow_dispatch: concurrency: group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} @@ -27,7 +27,7 @@ jobs: cirque: name: Cirque timeout-minutes: 60 - + env: DOCKER_RUN_VERSION: 0.5.56 GITHUB_CACHE_PATH: /tmp/cirque-cache/ @@ -35,28 +35,33 @@ jobs: runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' -# need to run with privilege, which isn't supported by job.XXX.contaner -# https://github.com/actions/container-action/issues/2 -# container: -# image: connectedhomeip/chip-build-cirque:0.5.56 -# volumes: -# - "/tmp:/tmp" -# - "/dev/pts:/dev/pts" -# env: -# LOG_DIR: /tmp/cirque_test_output/ -# CLEANUP_DOCKER_FOR_CI: 1 -# options: "--privileged" + # need to run with privilege, which isn't supported by job.XXX.contaner + # https://github.com/actions/container-action/issues/2 + # container: + # image: connectedhomeip/chip-build-cirque:0.5.56 + # volumes: + # - "/tmp:/tmp" + # - "/dev/pts:/dev/pts" + # env: + # LOG_DIR: /tmp/cirque_test_output/ + # CLEANUP_DOCKER_FOR_CI: 1 + # options: "--privileged" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Get cirque cache key id: cirque-key run: | - echo "::set-output name=val::$(scripts/tests/cirque_tests.sh cachekeyhash)" + echo "::set-output name=val::$(scripts/tests/cirque_tests.sh cachekeyhash)" - name: Cache uses: actions/cache@v2 @@ -66,7 +71,7 @@ jobs: path: ${{ env.GITHUB_CACHE_PATH }} key: ${{ runner.os }}-cirque-${{ steps.cirque-key.outputs.val }} restore-keys: | - ${{ runner.os }}-cirque- + ${{ runner.os }}-cirque- - name: Bootstrap timeout-minutes: 10 @@ -122,6 +127,5 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ always() }} && ${{ !env.ACT }} with: - name: - cirque_log-${{steps.outsuffix.outputs.value}}-logs + name: cirque_log-${{steps.outsuffix.outputs.value}}-logs path: /tmp/cirque_test_output/ diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index b5f0d661aa95d1..f1770705ddf244 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -22,30 +22,35 @@ on: concurrency: group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} cancel-in-progress: true - + jobs: darwin: name: Build Darwin - timeout-minutes: 120 + timeout-minutes: 120 if: github.actor != 'restyled-io[bot]' runs-on: macos-latest steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Environment run: brew install openssl pkg-config python@3.9 - name: Fix pkgconfig link working-directory: /usr/local/lib/pkgconfig run: | - pwd - ls -la /usr/local/Cellar/ - ls -la /usr/local/Cellar/openssl@1.1 - OPEN_SSL_VERSION=`ls -la /usr/local/Cellar/openssl@1.1 | cat | tail -n1 | awk '{print $NF}'` - ln -s /usr/local/Cellar/openssl@1.1/$OPEN_SSL_VERSION/lib/pkgconfig/* . + pwd + ls -la /usr/local/Cellar/ + ls -la /usr/local/Cellar/openssl@1.1 + OPEN_SSL_VERSION=`ls -la /usr/local/Cellar/openssl@1.1 | cat | tail -n1 | awk '{print $NF}'` + ln -s /usr/local/Cellar/openssl@1.1/$OPEN_SSL_VERSION/lib/pkgconfig/* . - name: Bootstrap timeout-minutes: 25 run: scripts/build/gn_bootstrap.sh @@ -55,8 +60,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Run iOS Build Debug timeout-minutes: 30 working-directory: src/darwin/Framework @@ -97,28 +102,28 @@ jobs: - name: Build example chip-tool-darwin timeout-minutes: 10 run: | - scripts/examples/gn_build_example.sh examples/chip-tool-darwin out/debug chip_config_network_layer_ble=false is_asan=true + scripts/examples/gn_build_example.sh examples/chip-tool-darwin out/debug chip_config_network_layer_ble=false is_asan=true - name: Build example All Clusters Server timeout-minutes: 10 run: | - scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false + scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false - name: Build example OTA Provider timeout-minutes: 5 run: | - scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false + scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false - name: Build example OTA Requestor timeout-minutes: 5 run: | - scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false + scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false - name: Delete Defaults run: defaults delete com.apple.dt.xctest.tool continue-on-error: true - name: Run Framework Tests timeout-minutes: 10 run: | - mkdir -p /tmp/darwin/framework-tests - ../../../out/debug/chip-all-clusters-app > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) & - xcodebuild test -target "CHIP" -scheme "CHIP Framework Tests" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-documentation -Wno-conditional-uninitialized -Wno-incomplete-umbrella' > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2) + mkdir -p /tmp/darwin/framework-tests + ../../../out/debug/chip-all-clusters-app > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) & + xcodebuild test -target "CHIP" -scheme "CHIP Framework Tests" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-documentation -Wno-conditional-uninitialized -Wno-incomplete-umbrella' > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2) working-directory: src/darwin/Framework - name: Uploading log files uses: actions/upload-artifact@v2 diff --git a/.github/workflows/docker_img.yaml b/.github/workflows/docker_img.yaml index 18c15b969b5724..21ea8cd8ee5028 100644 --- a/.github/workflows/docker_img.yaml +++ b/.github/workflows/docker_img.yaml @@ -17,10 +17,10 @@ name: Docker CHIP images on: push: paths: - - 'integrations/docker/images/**' + - "integrations/docker/images/**" pull_request: paths: - - 'integrations/docker/images/**' + - "integrations/docker/images/**" workflow_dispatch: jobs: @@ -52,8 +52,14 @@ jobs: #- "-vscode" - "-zap" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout + with: + action: actions/checkout@v3 + with: | + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Build All images using project bash script run: | cd integrations/docker/images/chip-build${{ matrix.img }} @@ -64,4 +70,3 @@ jobs: # NOTE: This task validates the images built previously with latest tag image: connectedhomeip/chip-build${{ matrix.img }}:latest annotations: true - diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index b53d0088e18f78..d590aa14d11c79 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -17,64 +17,64 @@ name: Doxygen on: push: paths: - - '**.do[xc]' - - '**.c[cs]?' - - '**.cxx' - - '**.cpp' - - '**.c++' - - '**.ii' - - '**.ixx' - - '**.ipp' - - '**.i++' - - '**.inl' - - '**.[hH]' - - '**.hh' - - '**.HH' - - '**.hxx' - - '**.hpp' - - '**.h++' - - '**.mm' - - '**.txt' - - '**.[ido]dl' - - '**.java' - - '**.d' - - '**.php[45]?' - - '**.inc' - - '**.phtml' - - '**.[mM]' + - "**.do[xc]" + - "**.c[cs]?" + - "**.cxx" + - "**.cpp" + - "**.c++" + - "**.ii" + - "**.ixx" + - "**.ipp" + - "**.i++" + - "**.inl" + - "**.[hH]" + - "**.hh" + - "**.HH" + - "**.hxx" + - "**.hpp" + - "**.h++" + - "**.mm" + - "**.txt" + - "**.[ido]dl" + - "**.java" + - "**.d" + - "**.php[45]?" + - "**.inc" + - "**.phtml" + - "**.[mM]" pull_request: paths: - - '**.do[xc]' - - '**.c[cs]?' - - '**.cxx' - - '**.cpp' - - '**.c++' - - '**.ii' - - '**.ixx' - - '**.ipp' - - '**.i++' - - '**.inl' - - '**.[hH]' - - '**.hh' - - '**.HH' - - '**.hxx' - - '**.hpp' - - '**.h++' - - '**.mm' - - '**.txt' - - '**.[ido]dl' - - '**.java' - - '**.d' - - '**.php[45]?' - - '**.inc' - - '**.phtml' - - '**.[mM]' + - "**.do[xc]" + - "**.c[cs]?" + - "**.cxx" + - "**.cpp" + - "**.c++" + - "**.ii" + - "**.ixx" + - "**.ipp" + - "**.i++" + - "**.inl" + - "**.[hH]" + - "**.hh" + - "**.HH" + - "**.hxx" + - "**.hpp" + - "**.h++" + - "**.mm" + - "**.txt" + - "**.[ido]dl" + - "**.java" + - "**.d" + - "**.php[45]?" + - "**.inc" + - "**.phtml" + - "**.[mM]" workflow_dispatch: concurrency: group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} cancel-in-progress: true - + jobs: doxygen: name: Build Doxygen @@ -89,10 +89,15 @@ jobs: steps: - name: "Print Actor" run: echo ${{github.actor}} - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Generate run: scripts/helpers/doxygen.sh - name: Extract branch name diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 31172bc10bfe42..d6e2a301589ca3 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -18,6 +18,10 @@ on: push: pull_request: +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + jobs: ameba: name: Ameba @@ -32,10 +36,14 @@ jobs: options: --user root steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Build example Ameba All Clusters App - run: - scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target-glob 'ameba-*' build" + run: scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target-glob 'ameba-*' build" diff --git a/.github/workflows/examples-cyw30739.yaml b/.github/workflows/examples-cyw30739.yaml index 42f3fd62f1fe4f..184bcaa6a1df24 100644 --- a/.github/workflows/examples-cyw30739.yaml +++ b/.github/workflows/examples-cyw30739.yaml @@ -35,10 +35,15 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -55,8 +60,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build example CYW30739 Apps timeout-minutes: 30 run: | diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 02ccd66e6f026d..0df45e0d2d3262 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -39,10 +39,15 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -59,8 +64,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build some BRD4161A variants timeout-minutes: 50 @@ -94,7 +99,7 @@ jobs: run: | scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ out/lock_app_wifi_wf200 BRD4161A --wifi wf200 .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+wf200 lock-app \ - out/lock_app_wifi_wf200/BRD4161A/chip-efr32-lock-example.out /tmp/bloat_reports/ + out/lock_app_wifi_wf200/BRD4161A/chip-efr32-lock-example.out /tmp/bloat_reports/ - name: Uploading Size Reports uses: actions/upload-artifact@v2 if: ${{ !env.ACT }} diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index cff76ce978a5b8..1194f2377d718d 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -21,7 +21,7 @@ on: concurrency: group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} cancel-in-progress: true - + jobs: # TODO ESP32 https://github.com/project-chip/connectedhomeip/issues/1510 esp32: @@ -37,10 +37,15 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -57,8 +62,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build some M5Stack variations timeout-minutes: 30 run: | @@ -117,10 +122,15 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Bootstrap timeout-minutes: 10 @@ -132,8 +142,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build example Bridge App timeout-minutes: 10 diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 53eb2f5248fd81..6014c3fcab3340 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -35,10 +35,15 @@ jobs: image: connectedhomeip/chip-build-infineon:0.5.56 steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -55,53 +60,53 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build lock-app example timeout-minutes: 10 run: | - scripts/run_in_build_env.sh \ - "scripts/build/build_examples.py \ - --enable-flashbundle --no-log-timestamps \ - --target infineon-p6-lock \ - build \ - --copy-artifacts-to out/artifacts \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - p6 default lock-app \ - out/infineon-p6-lock/chip-p6-lock-example.out + scripts/run_in_build_env.sh \ + "scripts/build/build_examples.py \ + --enable-flashbundle --no-log-timestamps \ + --target infineon-p6-lock \ + build \ + --copy-artifacts-to out/artifacts \ + " + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + p6 default lock-app \ + out/infineon-p6-lock/chip-p6-lock-example.out - name: Build all-clusters-app example timeout-minutes: 10 run: | - scripts/run_in_build_env.sh \ - "scripts/build/build_examples.py \ - --enable-flashbundle --no-log-timestamps \ - --target infineon-p6-all-clusters \ - build \ - --copy-artifacts-to out/artifacts \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - p6 default all-clusters-app \ - out/infineon-p6-all-clusters/chip-p6-clusters-example.out + scripts/run_in_build_env.sh \ + "scripts/build/build_examples.py \ + --enable-flashbundle --no-log-timestamps \ + --target infineon-p6-all-clusters \ + build \ + --copy-artifacts-to out/artifacts \ + " + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + p6 default all-clusters-app \ + out/infineon-p6-all-clusters/chip-p6-clusters-example.out - name: Build lighting-app example timeout-minutes: 10 run: | - scripts/run_in_build_env.sh \ - "scripts/build/build_examples.py \ - --enable-flashbundle --no-log-timestamps \ - --target infineon-p6-light \ - build \ - --copy-artifacts-to out/artifacts \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - p6 default light-app \ - out/infineon-p6-light/chip-p6-lighting-example.out + scripts/run_in_build_env.sh \ + "scripts/build/build_examples.py \ + --enable-flashbundle --no-log-timestamps \ + --target infineon-p6-light \ + build \ + --copy-artifacts-to out/artifacts \ + " + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + p6 default light-app \ + out/infineon-p6-light/chip-p6-lighting-example.out - name: Uploading Size Reports uses: actions/upload-artifact@v2 if: ${{ !env.ACT }} with: name: Size,P6-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} path: | - out/infineon-p6-lock/p6-default-lock-app-sizes.json - out/infineon-p6-all-clusters/p6-default-all-clusters-app-sizes.json - out/infineon-p6-light/p6-default-light-app-sizes.json + out/infineon-p6-lock/p6-default-lock-app-sizes.json + out/infineon-p6-all-clusters/p6-default-all-clusters-app-sizes.json + out/infineon-p6-light/p6-default-light-app-sizes.json diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index edf0108f9477ef..7d1fbccc76557f 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -21,7 +21,7 @@ on: concurrency: group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} cancel-in-progress: true - + jobs: k32w: name: K32W @@ -38,10 +38,15 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -58,8 +63,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build examples timeout-minutes: 30 run: | diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 7ea664cc632a00..3b36392e97ee07 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -36,10 +36,15 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -56,10 +61,10 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build Some samples - timeout-minutes: 20 + timeout-minutes: 20 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 608fdbe1a48aeb..45889941e10133 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -34,10 +34,15 @@ jobs: image: connectedhomeip/chip-build-imx:0.5.56 steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Build App timeout-minutes: 30 @@ -47,5 +52,5 @@ jobs: - name: Build chip-tool timeout-minutes: 30 run: | - ./scripts/examples/imxlinux_example.sh \ - examples/chip-tool examples/chip-tool/out/aarch64 + ./scripts/examples/imxlinux_example.sh \ + examples/chip-tool examples/chip-tool/out/aarch64 diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 19d259857171bc..61190ae5a84c10 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -21,7 +21,7 @@ on: concurrency: group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} cancel-in-progress: true - + jobs: linux_standalone: name: Linux Standalone @@ -39,10 +39,15 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -59,13 +64,13 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build Standalone cert tool timeout-minutes: 5 run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target-glob '*-chip-cert' build" + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --no-log-timestamps --target-glob '*-chip-cert' build" - name: Build example Standalone Echo Client timeout-minutes: 5 run: | diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 906524a561f172..bfb3c55b3faa41 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -39,25 +39,30 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Detect changed paths uses: dorny/paths-filter@v2 id: changed_paths with: - filters: | - nrfconnect: - - '**/nrfconnect/**' - - '**/Zephyr/**' - - '**/zephyr/**' - tests: - - '**/tests/**' - shell: - - 'examples/shell/nrfconnect/**' - pigweed-app: - - 'examples/pigweed-app/nrfconnect/**' + filters: | + nrfconnect: + - '**/nrfconnect/**' + - '**/Zephyr/**' + - '**/zephyr/**' + tests: + - '**/tests/**' + shell: + - 'examples/shell/nrfconnect/**' + pigweed-app: + - 'examples/pigweed-app/nrfconnect/**' - name: Set up environment for size reports if: ${{ !env.ACT }} env: @@ -72,8 +77,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Update nRF Connect SDK revision to the currently recommended. timeout-minutes: 10 run: scripts/run_in_build_env.sh "python3 scripts/setup/nrfconnect/update_ncs.py --update --shallow" diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 5d0416689392ac..6df1323a558835 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -38,10 +38,15 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -58,8 +63,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build example QPG6105 Lock App timeout-minutes: 5 run: | diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index e93ab46c79dde1..d81227c5075253 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -37,10 +37,15 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -50,12 +55,12 @@ jobs: - name: Build example Telink Lighting App run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'telink-*' build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9518adk80d lighting-app \ - out/telink-tlsr9518adk80d-light/zephyr/zephyr.elf \ - /tmp/bloat_reports/ + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'telink-*' build" + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + telink tlsr9518adk80d lighting-app \ + out/telink-tlsr9518adk80d-light/zephyr/zephyr.elf \ + /tmp/bloat_reports/ - name: Uploading Size Reports uses: actions/upload-artifact@v2 diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 4deeff73421a59..a09586a084b122 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -18,6 +18,10 @@ on: push: pull_request: +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + jobs: tizen: name: Tizen @@ -35,10 +39,14 @@ jobs: - "/tmp/output_binaries:/tmp/output_binaries" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Build example Tizen lighting app - run: - scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target-glob 'tizen-*' build" + run: scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target-glob 'tizen-*' build" diff --git a/.github/workflows/fixit_rotation.yaml b/.github/workflows/fixit_rotation.yaml index 4f97a83ff3c220..27a31a3f90f8ed 100644 --- a/.github/workflows/fixit_rotation.yaml +++ b/.github/workflows/fixit_rotation.yaml @@ -23,8 +23,14 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout + with: + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Pick fixit rotation order run: scripts/fixit_rotation.py - diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index 8dbdf79304658d..00c0064c1bdaac 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -39,10 +39,15 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Bootstrap timeout-minutes: 10 run: scripts/build/gn_bootstrap.sh @@ -52,22 +57,22 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build Android CHIPTool and CHIPTest (ARM) run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm-chip-*' build" + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm-chip-*' build" - name: Clean out build output run: rm -rf ./out - name: Build Android CHIPTool and CHIPTest (ARM64) run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm64-chip-*' build" + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm64-chip-*' build" - name: Run Android build rule tests run: | - ./scripts/run_in_build_env.sh \ - "ninja -C out/android-arm64-chip-tool build/chip/java/tests:java_build_test.tests" + ./scripts/run_in_build_env.sh \ + "ninja -C out/android-arm64-chip-tool build/chip/java/tests:java_build_test.tests" - name: Clean out build output run: rm -rf ./out # - name: Build Android Studio build (arm64 only) diff --git a/.github/workflows/full-mbed.yaml b/.github/workflows/full-mbed.yaml index 45b154eeb2e93a..06353d98a764a5 100644 --- a/.github/workflows/full-mbed.yaml +++ b/.github/workflows/full-mbed.yaml @@ -40,10 +40,15 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -61,8 +66,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build lock-app example timeout-minutes: 20 diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index 4ed07b842002b5..9e70e2db45ccaa 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -36,14 +36,18 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - run: apt-get update - run: apt-get install --fix-missing llvm-10 clang-10 - - name: - Try to ensure the objdir-clone dir exists + - name: Try to ensure the objdir-clone dir exists run: | mkdir objdir-clone || true - name: Bootstrap @@ -55,8 +59,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build all-clusters-app timeout-minutes: 20 run: | @@ -70,8 +74,7 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ !env.ACT }} with: - name: - objdir-linux + name: objdir-linux path: objdir-clone/ # objdirs are big; don't hold on to them too long. retention-days: 5 @@ -83,10 +86,15 @@ jobs: if: github.actor != 'restyled-io[bot]' steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Environment run: brew install openssl pkg-config llvm - name: Try to ensure the objdir-clone dir exists @@ -109,8 +117,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build all-clusters-app timeout-minutes: 20 run: | @@ -124,8 +132,7 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ !env.ACT }} with: - name: - crash-darwin + name: crash-darwin path: objdir-clone/ # objdirs are big; don't hold on to them too long. retention-days: 5 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e88b220f82f97f..22cabf05256347 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,40 +23,47 @@ concurrency: cancel-in-progress: true jobs: - code-lints: - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - steps: - - uses: actions/checkout@v2 - - name: Check broken links - # On-push disabled until the job can run fully green - # At that point the step should be enabled. - if: github.event_name == 'workflow_dispatch' - uses: gaurav-nelson/github-action-markdown-link-check@v1 - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. And we wasnt to exclude this file, - # to avoid our grep regexp matching itself. - - name: Check for incorrect error use in VerifyOrExit - if: always() - run: | - git grep -n "VerifyOrExit(.*, [A-Za-z]*_ERROR" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 - - # git grep exits with 0 if it finds a match, but we want - # to fail (exit nonzero) on match. And we wasnt to exclude this file, - # to avoid our grep regexp matching itself. - - name: Check for use of PRI*8, which are not supported on some libcs. - if: always() - run: | - git grep -n "PRI.8" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0 - - # Comments like '{{! ... }}' should be used in zap files - - name: Do not allow TODO in generated files - if: always() - run: | - git grep -n 'TODO:' -- ./zzz_generated './*/zap-generated/*' && exit 1 || exit 0 - - - name: Check for disallowed include files - if: always() - run: scripts/tools/check_includes.sh + code-lints: + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + steps: + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout + with: + action: actions/checkout@v3 + with: | + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 + - name: Check broken links + # On-push disabled until the job can run fully green + # At that point the step should be enabled. + if: github.event_name == 'workflow_dispatch' + uses: gaurav-nelson/github-action-markdown-link-check@v1 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we wasnt to exclude this file, + # to avoid our grep regexp matching itself. + - name: Check for incorrect error use in VerifyOrExit + if: always() + run: | + git grep -n "VerifyOrExit(.*, [A-Za-z]*_ERROR" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 + + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we wasnt to exclude this file, + # to avoid our grep regexp matching itself. + - name: Check for use of PRI*8, which are not supported on some libcs. + if: always() + run: | + git grep -n "PRI.8" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0 + + # Comments like '{{! ... }}' should be used in zap files + - name: Do not allow TODO in generated files + if: always() + run: | + git grep -n 'TODO:' -- ./zzz_generated './*/zap-generated/*' && exit 1 || exit 0 + + - name: Check for disallowed include files + if: always() + run: scripts/tools/check_includes.sh diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 4db30996e37e8c..ac1a11fd9216a2 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -39,10 +39,15 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Bootstrap timeout-minutes: 25 run: scripts/build/gn_bootstrap.sh @@ -52,8 +57,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build ESP32 QEMU test images timeout-minutes: 20 run: | diff --git a/.github/workflows/rebase.yaml b/.github/workflows/rebase.yaml index 53fa7fc535597d..4763b50e663d4b 100644 --- a/.github/workflows/rebase.yaml +++ b/.github/workflows/rebase.yaml @@ -1,19 +1,23 @@ name: Automatic Rebase on: - issue_comment: - types: [created] + issue_comment: + types: [created] jobs: - rebase: - name: Rebase - if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') - runs-on: ubuntu-latest - steps: - - name: Checkout the latest code - uses: actions/checkout@v2 - with: - token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} - fetch-depth: 0 # otherwise, you will fail to push refs to dest repo - - name: Automatic Rebase - uses: cirrus-actions/rebase@1.4 - env: - GITHUB_TOKEN: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} + rebase: + name: Rebase + if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') + runs-on: ubuntu-latest + steps: + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout + with: + action: actions/checkout@v3 + with: | + fetch-depth: 0 + token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} + attempt_limit: 3 + attempt_delay: 2000 + - name: Automatic Rebase + uses: cirrus-actions/rebase@1.4 + env: + GITHUB_TOKEN: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 8e2db6c48d00b0..2784be1e92667b 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,10 +32,15 @@ jobs: image: connectedhomeip/chip-build-esp32:0.5.56 steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 ref: "${{ github.event.inputs.releaseTag }}" - name: Bootstrap timeout-minutes: 25 @@ -46,8 +51,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build run: scripts/examples/esp_example.sh all-clusters-app @@ -72,10 +77,15 @@ jobs: container: image: connectedhomeip/chip-build-efr32:0.5.56 steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 ref: "${{ github.event.inputs.releaseTag }}" - name: Bootstrap timeout-minutes: 25 @@ -86,11 +96,10 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build example EFR32 Lock App - run: - scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ + run: scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ out/lock_app_debug $EFR32_BOARD - name: Upload artifact diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 08fed13359ec78..d3cfac36604c0f 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -39,10 +39,15 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Bootstrap timeout-minutes: 10 run: scripts/build/gn_bootstrap.sh @@ -52,13 +57,13 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build Android CHIPTool and CHIPTest (ARM64) run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target android-arm64-chip-tool build" + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --no-log-timestamps --target android-arm64-chip-tool build" - name: Run Android build rule tests run: | - ./scripts/run_in_build_env.sh \ - "ninja -C out/android-arm64-chip-tool build/chip/java/tests:java_build_test.tests" + ./scripts/run_in_build_env.sh \ + "ninja -C out/android-arm64-chip-tool build/chip/java/tests:java_build_test.tests" diff --git a/.github/workflows/smoketest-mbed.yaml b/.github/workflows/smoketest-mbed.yaml index cf2c3861d6134b..70f359e0f1a869 100644 --- a/.github/workflows/smoketest-mbed.yaml +++ b/.github/workflows/smoketest-mbed.yaml @@ -35,10 +35,15 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Set up environment for size reports if: ${{ !env.ACT }} @@ -56,8 +61,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Build lock-app example timeout-minutes: 20 diff --git a/.github/workflows/spell.yml b/.github/workflows/spell.yml index e2d07a49ac00a8..2d12cd74176756 100644 --- a/.github/workflows/spell.yml +++ b/.github/workflows/spell.yml @@ -17,23 +17,38 @@ name: Run misspell on: push: paths: - - '**.md' - - '!.github/*' + - "**.md" + - "!.github/*" pull_request: paths: - - '**.md' - - '!.github/*' + - "**.md" + - "!.github/*" jobs: check-reviewdog: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout + with: + action: actions/checkout@v3 + with: | + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - uses: reviewdog/action-misspell@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} check-spellcheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout + with: + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - uses: igsekor/pyspelling-any@v0.0.2 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 95d93f3d7c1d56..1d1c02e8dadea0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -20,8 +20,7 @@ on: workflow_dispatch: concurrency: - group: - ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == + 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 @@ -45,17 +44,20 @@ jobs: container: image: connectedhomeip/chip-build:0.5.56 - options: - --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 + options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true - - name: - Try to ensure the directories for core dumping exist and we + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 + - name: Try to ensure the directories for core dumping exist and we can write them. run: | mkdir /tmp/cores || true @@ -68,8 +70,7 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ always() }} && ${{ !env.ACT }} with: - name: - bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} + name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} path: | .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log @@ -99,8 +100,7 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ failure() }} && ${{ !env.ACT }} with: - name: - crash-core-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} + name: crash-core-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} path: /tmp/cores/ # Cores are big; don't hold on to them too long. retention-days: 5 @@ -108,8 +108,7 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ failure() }} && ${{ !env.ACT }} with: - name: - crash-objdir-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} + name: crash-objdir-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} path: objdir-clone/ # objdirs are big; don't hold on to them too long. retention-days: 5 @@ -130,10 +129,15 @@ jobs: runs-on: macos-latest steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Environment # coreutils for stdbuf run: brew install openssl pkg-config coreutils @@ -159,8 +163,7 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ always() }} && ${{ !env.ACT }} with: - name: - bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} path: | .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log @@ -189,8 +192,7 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ failure() }} && ${{ !env.ACT }} with: - name: - crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + name: crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} path: /cores/ # Cores are big; don't hold on to them too long. retention-days: 5 @@ -198,15 +200,13 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ failure() }} && ${{ !env.ACT }} with: - name: - crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + name: crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} path: ~/Library/Logs/DiagnosticReports/ - name: Uploading objdir for debugging uses: actions/upload-artifact@v2 if: ${{ failure() }} && ${{ !env.ACT }} with: - name: - crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + name: crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} path: objdir-clone/ # objdirs are big; don't hold on to them too long. retention-days: 5 diff --git a/.github/workflows/todos.yaml b/.github/workflows/todos.yaml index 6b67a319d98305..d18cb08c293971 100644 --- a/.github/workflows/todos.yaml +++ b/.github/workflows/todos.yaml @@ -1,38 +1,44 @@ name: Create issues from To-Dos on: - workflow_dispatch: - inputs: - importAll: - default: 'false' - required: false - type: boolean - description: Enable, if you want to import all TODOs. Runs on checked out branch! Only use if you're sure what you are doing. + workflow_dispatch: + inputs: + importAll: + default: "false" + required: false + type: boolean + description: Enable, if you want to import all TODOs. Runs on checked out branch! Only use if you're sure what you are doing. # push: Will move this to a cadence # branches: # - master permissions: - issues: write - repository-projects: read - contents: read + issues: write + repository-projects: read + contents: read jobs: - todos: - name: Scan for To-Dos - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Run Issue Bot - uses: derjuulsn/todo-issue@main - with: -# autoAssign: false - reopenClosed: false -# label: "todo" -# disabled until this works: https://github.com/DerJuulsn/todo-issue/issues/9 - keywords: "todo,fixme,bug,TODO,FIXME,BUG" - excludePattern: '^(node_modules/|third_party/|zzz_generated/|docs/|.vscode/)' - env: - GITHUB_TOKEN: ${{ secrets.MATTER_PAT }} + todos: + name: Scan for To-Dos + runs-on: ubuntu-latest + steps: + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout + with: + action: actions/checkout@v3 + with: | + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 + - name: Run Issue Bot + uses: derjuulsn/todo-issue@main + with: + # autoAssign: false + reopenClosed: false + # label: "todo" + # disabled until this works: https://github.com/DerJuulsn/todo-issue/issues/9 + keywords: "todo,fixme,bug,TODO,FIXME,BUG" + excludePattern: "^(node_modules/|third_party/|zzz_generated/|docs/|.vscode/)" + env: + GITHUB_TOKEN: ${{ secrets.MATTER_PAT }} diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 4624ae8c49968f..a15dbf43eb22d6 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -40,14 +40,18 @@ jobs: image: connectedhomeip/chip-build:0.5.56 volumes: - "/tmp/log_output:/tmp/test_logs" - options: - --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" + options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Bootstrap timeout-minutes: 10 run: | @@ -59,8 +63,8 @@ jobs: with: name: bootstrap-logs path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - name: Artifact suffix id: outsuffix uses: haya14busa/action-cond@v1.0.0 @@ -81,7 +85,7 @@ jobs: scripts/build/gn_gen.sh --args="$GN_ARGS" - name: Run Build - timeout-minutes: 30 + timeout-minutes: 30 run: scripts/run_in_build_env.sh "ninja -C out/$BUILD_TYPE" - name: Run Tests timeout-minutes: 30 diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 1334fb24aa57bc..323c2d2b463b97 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -35,33 +35,38 @@ jobs: if: github.actor != 'restyled-io[bot]' steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Setup ZAP timeout-minutes: 5 run: | - cd third_party/zap/repo/ - npm ci - npm run version-stamp - npm rebuild canvas --update-binary - npm run build-spa + cd third_party/zap/repo/ + npm ci + npm run version-stamp + npm rebuild canvas --update-binary + npm run build-spa - name: Generate all timeout-minutes: 5 run: scripts/tools/zap_regen_all.py - name: Add uncommitted changes run: git add . - name: Fix upstream - run: | - git remote set-url origin https://x-access-token:$COMMITTER_TOKEN@github.com/$GITHUB_REPOSITORY.git - git config --global user.email "$USER_EMAIL" - git config --global user.name "$USER_NAME" + run: | + git remote set-url origin https://x-access-token:$COMMITTER_TOKEN@github.com/$GITHUB_REPOSITORY.git + git config --global user.email "$USER_EMAIL" + git config --global user.name "$USER_NAME" env: - COMMITTER_TOKEN: ${{ secrets.MATTER_PAT }} - USER_EMAIL: ${{ secrets.MATTER_PAT_EMAIL }} - USER_NAME: ${{ secrets.MATTER_PAT_NAME }} - GITHUB_REPOSITORY: ${{ github.GITHUB_REPOSITORY }} + COMMITTER_TOKEN: ${{ secrets.MATTER_PAT }} + USER_EMAIL: ${{ secrets.MATTER_PAT_EMAIL }} + USER_NAME: ${{ secrets.MATTER_PAT_NAME }} + GITHUB_REPOSITORY: ${{ github.GITHUB_REPOSITORY }} - name: Commit run: git commit -a -m "Regenerating ZAP" - name: Push diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 58945861457273..3e867d3e82f7ff 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -36,27 +36,32 @@ jobs: if: github.actor != 'restyled-io[bot]' steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: Wandalen/wretry.action@v1.0.11 + name: Checkout with: - submodules: true + action: actions/checkout@v3 + with: | + submodules: true + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 - name: Setup ZAP timeout-minutes: 10 run: | - cd third_party/zap/repo/ - npm ci - npm run version-stamp - npm rebuild canvas --update-binary - npm run build-spa + cd third_party/zap/repo/ + npm ci + npm run version-stamp + npm rebuild canvas --update-binary + npm run build-spa - name: Generate all timeout-minutes: 30 run: scripts/tools/zap_regen_all.py - name: Check for uncommited changes run: | - git add . - # Show the full diff - git diff-index -p HEAD -- - # Also show just the files that are different, to make it easy - # to tell at a glance what might be going on. And throw in - # --exit-code to make this job fail if there is a difference. - git diff-index --exit-code HEAD -- + git add . + # Show the full diff + git diff-index -p HEAD -- + # Also show just the files that are different, to make it easy + # to tell at a glance what might be going on. And throw in + # --exit-code to make this job fail if there is a difference. + git diff-index --exit-code HEAD -- diff --git a/scripts/tools/memory/README-GitHub-CI.md b/scripts/tools/memory/README-GitHub-CI.md index d2171e26eb9050..e34af1f9f23566 100644 --- a/scripts/tools/memory/README-GitHub-CI.md +++ b/scripts/tools/memory/README-GitHub-CI.md @@ -47,7 +47,7 @@ single argument, a JSON dictionary of the `github` context. Typically run as: ``` steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: true