Skip to content

Commit

Permalink
Moving to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
woody-apple committed Jun 26, 2023
1 parent e8f4431 commit f21b3aa
Show file tree
Hide file tree
Showing 40 changed files with 151 additions and 1,077 deletions.
17 changes: 17 additions & 0 deletions .github/actions/bootstrap-cache/action.yaml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions .github/actions/checkout/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Checkout
description: Checkout
runs:
using: "composite"
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
13 changes: 13 additions & 0 deletions .github/actions/upload-bootstrap-logs/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Upload bootstrap logs
description: Upload bootstrap logs
runs:
using: "composite"
steps:
- 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
9 changes: 1 addition & 8 deletions .github/workflows/bloat_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,7 @@ 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
- uses: ./.github/actions/checkout

- name: Report
run: |
Expand Down
134 changes: 13 additions & 121 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,7 @@ 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
- uses: ./.github/actions/checkout
- name: Checkout submodules
run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
- name: Try to ensure the directories for core dumping exist and we
Expand All @@ -73,29 +66,10 @@ jobs:
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
- 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/upload-bootstrap-logs

- name: Initialize CodeQL
if: ${{ inputs.run-codeql }}
Expand Down Expand Up @@ -218,34 +192,16 @@ jobs:
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
- 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/upload-bootstrap-logs
- 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
Expand Down Expand Up @@ -398,30 +354,11 @@ 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
- uses: ./.github/actions/checkout
- 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
- uses: ./.github/actions/bootstrap-cache
- name: Bootstrap
run: bash scripts/bootstrap.sh

Expand Down Expand Up @@ -463,29 +400,10 @@ jobs:
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
- 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/upload-bootstrap-logs

- name: Initialize CodeQL
if: ${{ inputs.run-codeql }}
Expand Down Expand Up @@ -583,40 +501,14 @@ 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
- uses: ./.github/actions/checkout
- 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
- 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/upload-bootstrap-logs

- name: Run Build Coverage
run: ./scripts/build_coverage.sh
69 changes: 6 additions & 63 deletions .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,10 @@ 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
- uses: ./.github/actions/checkout
- 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
- uses: ./.github/actions/bootstrap-cache
- name: Bootstrap
run: bash scripts/bootstrap.sh
- name: CI Examples Linux
Expand All @@ -79,29 +60,10 @@ 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
- uses: ./.github/actions/checkout
- 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
- uses: ./.github/actions/bootstrap-cache
- name: Bootstrap
run: bash scripts/bootstrap.sh
- name: CI Examples ESP32
Expand All @@ -119,29 +81,10 @@ 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
- uses: ./.github/actions/checkout
- 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
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
- uses: ./.github/actions/bootstrap-cache
- name: Bootstrap
run: bash scripts/bootstrap.sh
- name: CI Examples NRFConnect
Expand Down
23 changes: 2 additions & 21 deletions .github/workflows/cirque.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,30 +53,11 @@ 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
- uses: ./.github/actions/checkout
- 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
- uses: ./.github/actions/bootstrap-cache
- name: Bootstrap
run: |
integrations/docker/images/chip-build-cirque/run.sh \
Expand Down
Loading

0 comments on commit f21b3aa

Please sign in to comment.