Skip to content

Commit

Permalink
Checkouts are constantly timing out, trying some retries (#15883)
Browse files Browse the repository at this point in the history
* Update build.yaml

* Trying passing in token

* Adding retries
  • Loading branch information
woody-apple authored Mar 4, 2022
1 parent 29eec86 commit 4f47a33
Show file tree
Hide file tree
Showing 36 changed files with 727 additions and 516 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/bloat_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
156 changes: 86 additions & 70 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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]'
Expand All @@ -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
Expand All @@ -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: |
Expand All @@ -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
Expand Down Expand Up @@ -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: |
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
48 changes: 26 additions & 22 deletions .github/workflows/cirque.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -27,36 +27,41 @@ jobs:
cirque:
name: Cirque
timeout-minutes: 60

env:
DOCKER_RUN_VERSION: 0.5.56
GITHUB_CACHE_PATH: /tmp/cirque-cache/

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
Expand All @@ -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
Expand Down Expand Up @@ -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/
Loading

0 comments on commit 4f47a33

Please sign in to comment.