Skip to content

Commit

Permalink
Set auto_envvar_prefix for click apps to CHIP
Browse files Browse the repository at this point in the history
This change will allow setting default values for e.g. build_examples.py
script with environment variables. Simple use case might be to enable
ccache for all targets and disable timestamp logs with:

export CHIP_NO_LOG_TIMESTAMPS=true
export CHIP_PW_COMMAND_LAUNCHER=ccache
  • Loading branch information
arkq committed Nov 30, 2022
1 parent 4a8f8eb commit 5180b4a
Show file tree
Hide file tree
Showing 35 changed files with 208 additions and 113 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:

build_linux_gcc_debug:
name: Build on Linux (gcc_debug)
timeout-minutes: 85
Expand Down Expand Up @@ -125,6 +129,7 @@ jobs:
# path: out/
# # objdirs are big; don't hold on to them too long.
# retention-days: 5

build_linux:
name: Build on Linux (fake, gcc_release, clang, simulated)
timeout-minutes: 150
Expand Down Expand Up @@ -219,7 +224,6 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"./scripts/run-clang-tidy-on-compile-commands.py \
--no-log-timestamps \
--compile-database out/sanitizers/compile_commands.json \
--file-exclude-regex '/(repo|zzz_generated|lwip/standalone)/' \
check \
Expand All @@ -228,7 +232,7 @@ jobs:
timeout-minutes: 60
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --no-log-timestamps \
"./scripts/build/build_examples.py \
--target linux-x64-all-clusters-ipv6only-clang \
--target linux-x64-chip-tool-ipv6only-clang \
--target linux-x64-minmdns-ipv6only-clang \
Expand All @@ -239,7 +243,7 @@ jobs:
timeout-minutes: 15
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --no-log-timestamps --target linux-fake-tests build"
"./scripts/build/build_examples.py --target linux-fake-tests build"
- name: Uploading core files
uses: actions/upload-artifact@v3
if: ${{ failure() && !env.ACT }}
Expand Down Expand Up @@ -279,6 +283,7 @@ jobs:
# - name: Perform CodeQL Analysis
# if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }}
# uses: github/codeql-action/analyze@v1

build_linux_python_lib:
name: Build on Linux (python_lib)
timeout-minutes: 60
Expand Down Expand Up @@ -414,7 +419,6 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"./scripts/run-clang-tidy-on-compile-commands.py \
--no-log-timestamps \
--compile-database out/default/compile_commands.json \
check \
"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/darwin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ concurrency:
'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
test_suites_chip_tool_darwin:
name: Test Suites - Darwin
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/examples-ameba.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
ameba:
name: Ameba
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/examples-bouffalolab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
bl602:
name: BL602
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/examples-cc13x2x7_26x2x7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
cc26x2x7:
name: cc26x2x7
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
efr32:
name: EFR32
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
esp32:
name: ESP32
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/examples-infineon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
infineon:
name: Infineon examples building
Expand Down Expand Up @@ -69,7 +72,7 @@ jobs:
run: |
scripts/run_in_build_env.sh \
"scripts/build/build_examples.py \
--enable-flashbundle --no-log-timestamps \
--enable-flashbundle \
--target infineon-psoc6-lock \
build \
--copy-artifacts-to out/artifacts \
Expand All @@ -83,7 +86,7 @@ jobs:
run: |
scripts/run_in_build_env.sh \
"scripts/build/build_examples.py \
--enable-flashbundle --no-log-timestamps \
--enable-flashbundle \
--target infineon-psoc6-all-clusters \
build \
--copy-artifacts-to out/artifacts \
Expand All @@ -97,7 +100,7 @@ jobs:
run: |
scripts/run_in_build_env.sh \
"scripts/build/build_examples.py \
--enable-flashbundle --no-log-timestamps \
--enable-flashbundle \
--target infineon-psoc6-all-clusters-minimal \
build \
--copy-artifacts-to out/artifacts \
Expand All @@ -111,7 +114,7 @@ jobs:
run: |
scripts/run_in_build_env.sh \
"scripts/build/build_examples.py \
--enable-flashbundle --no-log-timestamps \
--enable-flashbundle \
--target infineon-psoc6-light \
build \
--copy-artifacts-to out/artifacts \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/examples-k32w.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
k32w:
name: K32W
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/examples-linux-arm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
arm_crosscompile:
name: Linux ARM Cross compile
Expand Down Expand Up @@ -64,11 +67,13 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build Some samples
timeout-minutes: 45
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-arm64-chip-cert \
--target linux-arm64-all-clusters-clang \
--target linux-arm64-chip-tool-ipv6only-clang \
--target linux-arm64-lock-clang \
Expand Down
48 changes: 23 additions & 25 deletions .github/workflows/examples-linux-imx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
imx:
name: Linux i.MX Build
Expand All @@ -45,53 +48,48 @@ jobs:
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform linux

- name: Build App
- name: Bootstrap
run: scripts/build/gn_bootstrap.sh

- name: Build lighting-app
timeout-minutes: 30
run: |
./scripts/examples/imxlinux_example.sh \
examples/lighting-app/linux/ examples/lighting-app/linux/out/aarch64
- name: Clean out build output
run: rm -rf ./out
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target imx-lighting-app \
build"
- name: Build chip-tool
timeout-minutes: 30
run: |
./scripts/examples/imxlinux_example.sh \
examples/chip-tool examples/chip-tool/out/aarch64
- name: Clean out build output
run: rm -rf ./out
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target imx-chip-tool \
build"
- name: Build thermostat
timeout-minutes: 30
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target imx-thermostat build \
"
- name: Clean out build output
run: rm -rf ./out
--target imx-thermostat \
build"
- name: Build all-cluster
timeout-minutes: 30
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target imx-all-clusters-app build \
"
- name: Clean out build output
run: rm -rf ./out
--target imx-all-clusters-app \
build"
- name: Build all-cluster-minimal
timeout-minutes: 30
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target imx-all-clusters-minimal-app build \
"
- name: Clean out build output
run: rm -rf ./out
--target imx-all-clusters-minimal-app \
build"
- name: Build ota-provider-app
timeout-minutes: 30
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target imx-ota-provider-app build
"
- name: Clean out build output
run: rm -rf ./out
--target imx-ota-provider-app \
build"
Loading

0 comments on commit 5180b4a

Please sign in to comment.