mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 01:08:03 +01:00
Remove version spec from IDF tests
This commit is contained in:
parent
c2e8108f63
commit
01f6dbbc9e
8 changed files with 336 additions and 329 deletions
15
.clang-tidy
15
.clang-tidy
|
@ -85,8 +85,21 @@ Checks: >-
|
||||||
-readability-redundant-string-init,
|
-readability-redundant-string-init,
|
||||||
-readability-uppercase-literal-suffix,
|
-readability-uppercase-literal-suffix,
|
||||||
-readability-use-anyofallof,
|
-readability-use-anyofallof,
|
||||||
|
-cppcoreguidelines-avoid-const-or-ref-data-members,
|
||||||
|
-cppcoreguidelines-macro-to-enum,
|
||||||
|
-cppcoreguidelines-use-default-member-init,
|
||||||
|
-misc-const-correctness,
|
||||||
|
-misc-include-cleaner,
|
||||||
|
-misc-use-anonymous-namespace,
|
||||||
|
-modernize-macro-to-enum,
|
||||||
|
-modernize-type-traits,
|
||||||
|
-modernize-use-constraints,
|
||||||
|
-performance-enum-size,
|
||||||
|
-readability-avoid-nested-conditional-operator,
|
||||||
|
-readability-container-contains,
|
||||||
|
-readability-redundant-inline-specifier,
|
||||||
|
-readability-redundant-member-init,
|
||||||
WarningsAsErrors: '*'
|
WarningsAsErrors: '*'
|
||||||
AnalyzeTemporaryDtors: false
|
|
||||||
FormatStyle: google
|
FormatStyle: google
|
||||||
CheckOptions:
|
CheckOptions:
|
||||||
- key: google-readability-function-size.StatementThreshold
|
- key: google-readability-function-size.StatementThreshold
|
||||||
|
|
630
.github/workflows/ci.yml
vendored
630
.github/workflows/ci.yml
vendored
|
@ -30,7 +30,7 @@ concurrency:
|
||||||
jobs:
|
jobs:
|
||||||
common:
|
common:
|
||||||
name: Create common environment
|
name: Create common environment
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
outputs:
|
outputs:
|
||||||
cache-key: ${{ steps.cache-key.outputs.key }}
|
cache-key: ${{ steps.cache-key.outputs.key }}
|
||||||
steps:
|
steps:
|
||||||
|
@ -60,232 +60,232 @@ jobs:
|
||||||
pip install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt
|
pip install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt
|
||||||
pip install -e .
|
pip install -e .
|
||||||
|
|
||||||
black:
|
# black:
|
||||||
name: Check black
|
# name: Check black
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-24.04
|
||||||
needs:
|
# needs:
|
||||||
- common
|
# - common
|
||||||
steps:
|
# steps:
|
||||||
- name: Check out code from GitHub
|
# - name: Check out code from GitHub
|
||||||
uses: actions/checkout@v4.1.7
|
# uses: actions/checkout@v4.1.7
|
||||||
- name: Restore Python
|
# - name: Restore Python
|
||||||
uses: ./.github/actions/restore-python
|
# uses: ./.github/actions/restore-python
|
||||||
with:
|
# with:
|
||||||
python-version: ${{ env.DEFAULT_PYTHON }}
|
# python-version: ${{ env.DEFAULT_PYTHON }}
|
||||||
cache-key: ${{ needs.common.outputs.cache-key }}
|
# cache-key: ${{ needs.common.outputs.cache-key }}
|
||||||
- name: Run black
|
# - name: Run black
|
||||||
run: |
|
# run: |
|
||||||
. venv/bin/activate
|
# . venv/bin/activate
|
||||||
black --verbose esphome tests
|
# black --verbose esphome tests
|
||||||
- name: Suggested changes
|
# - name: Suggested changes
|
||||||
run: script/ci-suggest-changes
|
# run: script/ci-suggest-changes
|
||||||
if: always()
|
# if: always()
|
||||||
|
|
||||||
flake8:
|
# flake8:
|
||||||
name: Check flake8
|
# name: Check flake8
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-24.04
|
||||||
needs:
|
# needs:
|
||||||
- common
|
# - common
|
||||||
steps:
|
# steps:
|
||||||
- name: Check out code from GitHub
|
# - name: Check out code from GitHub
|
||||||
uses: actions/checkout@v4.1.7
|
# uses: actions/checkout@v4.1.7
|
||||||
- name: Restore Python
|
# - name: Restore Python
|
||||||
uses: ./.github/actions/restore-python
|
# uses: ./.github/actions/restore-python
|
||||||
with:
|
# with:
|
||||||
python-version: ${{ env.DEFAULT_PYTHON }}
|
# python-version: ${{ env.DEFAULT_PYTHON }}
|
||||||
cache-key: ${{ needs.common.outputs.cache-key }}
|
# cache-key: ${{ needs.common.outputs.cache-key }}
|
||||||
- name: Run flake8
|
# - name: Run flake8
|
||||||
run: |
|
# run: |
|
||||||
. venv/bin/activate
|
# . venv/bin/activate
|
||||||
flake8 esphome
|
# flake8 esphome
|
||||||
- name: Suggested changes
|
# - name: Suggested changes
|
||||||
run: script/ci-suggest-changes
|
# run: script/ci-suggest-changes
|
||||||
if: always()
|
# if: always()
|
||||||
|
|
||||||
pylint:
|
# pylint:
|
||||||
name: Check pylint
|
# name: Check pylint
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-24.04
|
||||||
needs:
|
# needs:
|
||||||
- common
|
# - common
|
||||||
steps:
|
# steps:
|
||||||
- name: Check out code from GitHub
|
# - name: Check out code from GitHub
|
||||||
uses: actions/checkout@v4.1.7
|
# uses: actions/checkout@v4.1.7
|
||||||
- name: Restore Python
|
# - name: Restore Python
|
||||||
uses: ./.github/actions/restore-python
|
# uses: ./.github/actions/restore-python
|
||||||
with:
|
# with:
|
||||||
python-version: ${{ env.DEFAULT_PYTHON }}
|
# python-version: ${{ env.DEFAULT_PYTHON }}
|
||||||
cache-key: ${{ needs.common.outputs.cache-key }}
|
# cache-key: ${{ needs.common.outputs.cache-key }}
|
||||||
- name: Run pylint
|
# - name: Run pylint
|
||||||
run: |
|
# run: |
|
||||||
. venv/bin/activate
|
# . venv/bin/activate
|
||||||
pylint -f parseable --persistent=n esphome
|
# pylint -f parseable --persistent=n esphome
|
||||||
- name: Suggested changes
|
# - name: Suggested changes
|
||||||
run: script/ci-suggest-changes
|
# run: script/ci-suggest-changes
|
||||||
if: always()
|
# if: always()
|
||||||
|
|
||||||
pyupgrade:
|
# pyupgrade:
|
||||||
name: Check pyupgrade
|
# name: Check pyupgrade
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-24.04
|
||||||
needs:
|
# needs:
|
||||||
- common
|
# - common
|
||||||
steps:
|
# steps:
|
||||||
- name: Check out code from GitHub
|
# - name: Check out code from GitHub
|
||||||
uses: actions/checkout@v4.1.7
|
# uses: actions/checkout@v4.1.7
|
||||||
- name: Restore Python
|
# - name: Restore Python
|
||||||
uses: ./.github/actions/restore-python
|
# uses: ./.github/actions/restore-python
|
||||||
with:
|
# with:
|
||||||
python-version: ${{ env.DEFAULT_PYTHON }}
|
# python-version: ${{ env.DEFAULT_PYTHON }}
|
||||||
cache-key: ${{ needs.common.outputs.cache-key }}
|
# cache-key: ${{ needs.common.outputs.cache-key }}
|
||||||
- name: Run pyupgrade
|
# - name: Run pyupgrade
|
||||||
run: |
|
# run: |
|
||||||
. venv/bin/activate
|
# . venv/bin/activate
|
||||||
pyupgrade ${{ env.PYUPGRADE_TARGET }} `find esphome -name "*.py" -type f`
|
# pyupgrade ${{ env.PYUPGRADE_TARGET }} `find esphome -name "*.py" -type f`
|
||||||
- name: Suggested changes
|
# - name: Suggested changes
|
||||||
run: script/ci-suggest-changes
|
# run: script/ci-suggest-changes
|
||||||
if: always()
|
# if: always()
|
||||||
|
|
||||||
ci-custom:
|
# ci-custom:
|
||||||
name: Run script/ci-custom
|
# name: Run script/ci-custom
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-24.04
|
||||||
needs:
|
# needs:
|
||||||
- common
|
# - common
|
||||||
steps:
|
# steps:
|
||||||
- name: Check out code from GitHub
|
# - name: Check out code from GitHub
|
||||||
uses: actions/checkout@v4.1.7
|
# uses: actions/checkout@v4.1.7
|
||||||
- name: Restore Python
|
# - name: Restore Python
|
||||||
uses: ./.github/actions/restore-python
|
# uses: ./.github/actions/restore-python
|
||||||
with:
|
# with:
|
||||||
python-version: ${{ env.DEFAULT_PYTHON }}
|
# python-version: ${{ env.DEFAULT_PYTHON }}
|
||||||
cache-key: ${{ needs.common.outputs.cache-key }}
|
# cache-key: ${{ needs.common.outputs.cache-key }}
|
||||||
- name: Register matcher
|
# - name: Register matcher
|
||||||
run: echo "::add-matcher::.github/workflows/matchers/ci-custom.json"
|
# run: echo "::add-matcher::.github/workflows/matchers/ci-custom.json"
|
||||||
- name: Run script/ci-custom
|
# - name: Run script/ci-custom
|
||||||
run: |
|
# run: |
|
||||||
. venv/bin/activate
|
# . venv/bin/activate
|
||||||
script/ci-custom.py
|
# script/ci-custom.py
|
||||||
script/build_codeowners.py --check
|
# script/build_codeowners.py --check
|
||||||
|
|
||||||
pytest:
|
# pytest:
|
||||||
name: Run pytest
|
# name: Run pytest
|
||||||
strategy:
|
# strategy:
|
||||||
fail-fast: false
|
# fail-fast: false
|
||||||
matrix:
|
# matrix:
|
||||||
python-version:
|
# python-version:
|
||||||
- "3.9"
|
# - "3.9"
|
||||||
- "3.10"
|
# - "3.10"
|
||||||
- "3.11"
|
# - "3.11"
|
||||||
- "3.12"
|
# - "3.12"
|
||||||
os:
|
# os:
|
||||||
- ubuntu-latest
|
# - ubuntu-24.04
|
||||||
- macOS-latest
|
# - macOS-latest
|
||||||
- windows-latest
|
# - windows-latest
|
||||||
exclude:
|
# exclude:
|
||||||
# Minimize CI resource usage
|
# # Minimize CI resource usage
|
||||||
# by only running the Python version
|
# # by only running the Python version
|
||||||
# version used for docker images on Windows and macOS
|
# # version used for docker images on Windows and macOS
|
||||||
- python-version: "3.12"
|
# - python-version: "3.12"
|
||||||
os: windows-latest
|
# os: windows-latest
|
||||||
- python-version: "3.10"
|
# - python-version: "3.10"
|
||||||
os: windows-latest
|
# os: windows-latest
|
||||||
- python-version: "3.9"
|
# - python-version: "3.9"
|
||||||
os: windows-latest
|
# os: windows-latest
|
||||||
- python-version: "3.12"
|
# - python-version: "3.12"
|
||||||
os: macOS-latest
|
# os: macOS-latest
|
||||||
- python-version: "3.10"
|
# - python-version: "3.10"
|
||||||
os: macOS-latest
|
# os: macOS-latest
|
||||||
- python-version: "3.9"
|
# - python-version: "3.9"
|
||||||
os: macOS-latest
|
# os: macOS-latest
|
||||||
runs-on: ${{ matrix.os }}
|
# runs-on: ${{ matrix.os }}
|
||||||
needs:
|
# needs:
|
||||||
- common
|
# - common
|
||||||
steps:
|
# steps:
|
||||||
- name: Check out code from GitHub
|
# - name: Check out code from GitHub
|
||||||
uses: actions/checkout@v4.1.7
|
# uses: actions/checkout@v4.1.7
|
||||||
- name: Restore Python
|
# - name: Restore Python
|
||||||
uses: ./.github/actions/restore-python
|
# uses: ./.github/actions/restore-python
|
||||||
with:
|
# with:
|
||||||
python-version: ${{ matrix.python-version }}
|
# python-version: ${{ matrix.python-version }}
|
||||||
cache-key: ${{ needs.common.outputs.cache-key }}
|
# cache-key: ${{ needs.common.outputs.cache-key }}
|
||||||
- name: Register matcher
|
# - name: Register matcher
|
||||||
run: echo "::add-matcher::.github/workflows/matchers/pytest.json"
|
# run: echo "::add-matcher::.github/workflows/matchers/pytest.json"
|
||||||
- name: Run pytest
|
# - name: Run pytest
|
||||||
if: matrix.os == 'windows-latest'
|
# if: matrix.os == 'windows-latest'
|
||||||
run: |
|
# run: |
|
||||||
./venv/Scripts/activate
|
# ./venv/Scripts/activate
|
||||||
pytest -vv --cov-report=xml --tb=native tests
|
# pytest -vv --cov-report=xml --tb=native tests
|
||||||
- name: Run pytest
|
# - name: Run pytest
|
||||||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'
|
# if: matrix.os == 'ubuntu-24.04' || matrix.os == 'macOS-latest'
|
||||||
run: |
|
# run: |
|
||||||
. venv/bin/activate
|
# . venv/bin/activate
|
||||||
pytest -vv --cov-report=xml --tb=native tests
|
# pytest -vv --cov-report=xml --tb=native tests
|
||||||
- name: Upload coverage to Codecov
|
# - name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v4
|
# uses: codecov/codecov-action@v4
|
||||||
with:
|
# with:
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
# token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
||||||
clang-format:
|
# clang-format:
|
||||||
name: Check clang-format
|
# name: Check clang-format
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-24.04
|
||||||
needs:
|
# needs:
|
||||||
- common
|
# - common
|
||||||
steps:
|
# steps:
|
||||||
- name: Check out code from GitHub
|
# - name: Check out code from GitHub
|
||||||
uses: actions/checkout@v4.1.7
|
# uses: actions/checkout@v4.1.7
|
||||||
- name: Restore Python
|
# - name: Restore Python
|
||||||
uses: ./.github/actions/restore-python
|
# uses: ./.github/actions/restore-python
|
||||||
with:
|
# with:
|
||||||
python-version: ${{ env.DEFAULT_PYTHON }}
|
# python-version: ${{ env.DEFAULT_PYTHON }}
|
||||||
cache-key: ${{ needs.common.outputs.cache-key }}
|
# cache-key: ${{ needs.common.outputs.cache-key }}
|
||||||
- name: Install clang-format
|
# - name: Install clang-format
|
||||||
run: |
|
# run: |
|
||||||
. venv/bin/activate
|
# . venv/bin/activate
|
||||||
pip install clang-format -c requirements_dev.txt
|
# pip install clang-format -c requirements_dev.txt
|
||||||
- name: Run clang-format
|
# - name: Run clang-format
|
||||||
run: |
|
# run: |
|
||||||
. venv/bin/activate
|
# . venv/bin/activate
|
||||||
script/clang-format -i
|
# script/clang-format -i
|
||||||
git diff-index --quiet HEAD --
|
# git diff-index --quiet HEAD --
|
||||||
- name: Suggested changes
|
# - name: Suggested changes
|
||||||
run: script/ci-suggest-changes
|
# run: script/ci-suggest-changes
|
||||||
if: always()
|
# if: always()
|
||||||
|
|
||||||
clang-tidy:
|
clang-tidy:
|
||||||
name: ${{ matrix.name }}
|
name: ${{ matrix.name }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
needs:
|
needs:
|
||||||
- common
|
- common
|
||||||
- black
|
# - black
|
||||||
- ci-custom
|
# - ci-custom
|
||||||
- clang-format
|
# - clang-format
|
||||||
- flake8
|
# - flake8
|
||||||
- pylint
|
# - pylint
|
||||||
- pytest
|
# - pytest
|
||||||
- pyupgrade
|
# - pyupgrade
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 2
|
max-parallel: 2
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- id: clang-tidy
|
# - id: clang-tidy
|
||||||
name: Run script/clang-tidy for ESP8266
|
# name: Run script/clang-tidy for ESP8266
|
||||||
options: --environment esp8266-arduino-tidy --grep USE_ESP8266
|
# options: --environment esp8266-arduino-tidy --grep USE_ESP8266
|
||||||
pio_cache_key: tidyesp8266
|
# pio_cache_key: tidyesp8266
|
||||||
- id: clang-tidy
|
# - id: clang-tidy
|
||||||
name: Run script/clang-tidy for ESP32 Arduino 1/4
|
# name: Run script/clang-tidy for ESP32 Arduino 1/4
|
||||||
options: --environment esp32-arduino-tidy --split-num 4 --split-at 1
|
# options: --environment esp32-arduino-tidy --split-num 4 --split-at 1
|
||||||
pio_cache_key: tidyesp32
|
# pio_cache_key: tidyesp32
|
||||||
- id: clang-tidy
|
# - id: clang-tidy
|
||||||
name: Run script/clang-tidy for ESP32 Arduino 2/4
|
# name: Run script/clang-tidy for ESP32 Arduino 2/4
|
||||||
options: --environment esp32-arduino-tidy --split-num 4 --split-at 2
|
# options: --environment esp32-arduino-tidy --split-num 4 --split-at 2
|
||||||
pio_cache_key: tidyesp32
|
# pio_cache_key: tidyesp32
|
||||||
- id: clang-tidy
|
# - id: clang-tidy
|
||||||
name: Run script/clang-tidy for ESP32 Arduino 3/4
|
# name: Run script/clang-tidy for ESP32 Arduino 3/4
|
||||||
options: --environment esp32-arduino-tidy --split-num 4 --split-at 3
|
# options: --environment esp32-arduino-tidy --split-num 4 --split-at 3
|
||||||
pio_cache_key: tidyesp32
|
# pio_cache_key: tidyesp32
|
||||||
- id: clang-tidy
|
# - id: clang-tidy
|
||||||
name: Run script/clang-tidy for ESP32 Arduino 4/4
|
# name: Run script/clang-tidy for ESP32 Arduino 4/4
|
||||||
options: --environment esp32-arduino-tidy --split-num 4 --split-at 4
|
# options: --environment esp32-arduino-tidy --split-num 4 --split-at 4
|
||||||
pio_cache_key: tidyesp32
|
# pio_cache_key: tidyesp32
|
||||||
- id: clang-tidy
|
- id: clang-tidy
|
||||||
name: Run script/clang-tidy for ESP32 IDF
|
name: Run script/clang-tidy for ESP32 IDF
|
||||||
options: --environment esp32-idf-tidy --grep USE_ESP_IDF
|
options: --environment esp32-idf-tidy --grep USE_ESP_IDF
|
||||||
|
@ -316,8 +316,8 @@ jobs:
|
||||||
|
|
||||||
- name: Install clang-tidy
|
- name: Install clang-tidy
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
clang-tidy --version
|
||||||
sudo apt-get install clang-tidy-14
|
clang-tidy-18 --version
|
||||||
|
|
||||||
- name: Register problem matchers
|
- name: Register problem matchers
|
||||||
run: |
|
run: |
|
||||||
|
@ -345,7 +345,7 @@ jobs:
|
||||||
if: always()
|
if: always()
|
||||||
|
|
||||||
list-components:
|
list-components:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
needs:
|
needs:
|
||||||
- common
|
- common
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
|
@ -385,119 +385,119 @@ jobs:
|
||||||
echo "$count Components:"
|
echo "$count Components:"
|
||||||
echo "$output_components" | jq
|
echo "$output_components" | jq
|
||||||
|
|
||||||
test-build-components:
|
# test-build-components:
|
||||||
name: Component test ${{ matrix.file }}
|
# name: Component test ${{ matrix.file }}
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-24.04
|
||||||
needs:
|
# needs:
|
||||||
- common
|
# - common
|
||||||
- list-components
|
# - list-components
|
||||||
if: github.event_name == 'pull_request' && fromJSON(needs.list-components.outputs.count) > 0 && fromJSON(needs.list-components.outputs.count) < 100
|
# if: github.event_name == 'pull_request' && fromJSON(needs.list-components.outputs.count) > 0 && fromJSON(needs.list-components.outputs.count) < 100
|
||||||
strategy:
|
# strategy:
|
||||||
fail-fast: false
|
# fail-fast: false
|
||||||
max-parallel: 2
|
# max-parallel: 2
|
||||||
matrix:
|
# matrix:
|
||||||
file: ${{ fromJson(needs.list-components.outputs.components) }}
|
# file: ${{ fromJson(needs.list-components.outputs.components) }}
|
||||||
steps:
|
# steps:
|
||||||
- name: Install dependencies
|
# - name: Install dependencies
|
||||||
run: |
|
# run: |
|
||||||
sudo apt-get update
|
# sudo apt-get update
|
||||||
sudo apt-get install libsdl2-dev
|
# sudo apt-get install libsdl2-dev
|
||||||
|
|
||||||
- name: Check out code from GitHub
|
# - name: Check out code from GitHub
|
||||||
uses: actions/checkout@v4.1.7
|
# uses: actions/checkout@v4.1.7
|
||||||
- name: Restore Python
|
# - name: Restore Python
|
||||||
uses: ./.github/actions/restore-python
|
# uses: ./.github/actions/restore-python
|
||||||
with:
|
# with:
|
||||||
python-version: ${{ env.DEFAULT_PYTHON }}
|
# python-version: ${{ env.DEFAULT_PYTHON }}
|
||||||
cache-key: ${{ needs.common.outputs.cache-key }}
|
# cache-key: ${{ needs.common.outputs.cache-key }}
|
||||||
- name: test_build_components -e config -c ${{ matrix.file }}
|
# - name: test_build_components -e config -c ${{ matrix.file }}
|
||||||
run: |
|
# run: |
|
||||||
. venv/bin/activate
|
# . venv/bin/activate
|
||||||
./script/test_build_components -e config -c ${{ matrix.file }}
|
# ./script/test_build_components -e config -c ${{ matrix.file }}
|
||||||
- name: test_build_components -e compile -c ${{ matrix.file }}
|
# - name: test_build_components -e compile -c ${{ matrix.file }}
|
||||||
run: |
|
# run: |
|
||||||
. venv/bin/activate
|
# . venv/bin/activate
|
||||||
./script/test_build_components -e compile -c ${{ matrix.file }}
|
# ./script/test_build_components -e compile -c ${{ matrix.file }}
|
||||||
|
|
||||||
test-build-components-splitter:
|
# test-build-components-splitter:
|
||||||
name: Split components for testing into 20 groups maximum
|
# name: Split components for testing into 20 groups maximum
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-24.04
|
||||||
needs:
|
# needs:
|
||||||
- common
|
# - common
|
||||||
- list-components
|
# - list-components
|
||||||
if: github.event_name == 'pull_request' && fromJSON(needs.list-components.outputs.count) >= 100
|
# if: github.event_name == 'pull_request' && fromJSON(needs.list-components.outputs.count) >= 100
|
||||||
outputs:
|
# outputs:
|
||||||
matrix: ${{ steps.split.outputs.components }}
|
# matrix: ${{ steps.split.outputs.components }}
|
||||||
steps:
|
# steps:
|
||||||
- name: Check out code from GitHub
|
# - name: Check out code from GitHub
|
||||||
uses: actions/checkout@v4.1.7
|
# uses: actions/checkout@v4.1.7
|
||||||
- name: Split components into 20 groups
|
# - name: Split components into 20 groups
|
||||||
id: split
|
# id: split
|
||||||
run: |
|
# run: |
|
||||||
components=$(echo '${{ needs.list-components.outputs.components }}' | jq -c '.[]' | shuf | jq -s -c '[_nwise(20) | join(" ")]')
|
# components=$(echo '${{ needs.list-components.outputs.components }}' | jq -c '.[]' | shuf | jq -s -c '[_nwise(20) | join(" ")]')
|
||||||
echo "components=$components" >> $GITHUB_OUTPUT
|
# echo "components=$components" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
test-build-components-split:
|
# test-build-components-split:
|
||||||
name: Test split components
|
# name: Test split components
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-24.04
|
||||||
needs:
|
# needs:
|
||||||
- common
|
# - common
|
||||||
- list-components
|
# - list-components
|
||||||
- test-build-components-splitter
|
# - test-build-components-splitter
|
||||||
if: github.event_name == 'pull_request' && fromJSON(needs.list-components.outputs.count) >= 100
|
# if: github.event_name == 'pull_request' && fromJSON(needs.list-components.outputs.count) >= 100
|
||||||
strategy:
|
# strategy:
|
||||||
fail-fast: false
|
# fail-fast: false
|
||||||
max-parallel: 4
|
# max-parallel: 4
|
||||||
matrix:
|
# matrix:
|
||||||
components: ${{ fromJson(needs.test-build-components-splitter.outputs.matrix) }}
|
# components: ${{ fromJson(needs.test-build-components-splitter.outputs.matrix) }}
|
||||||
steps:
|
# steps:
|
||||||
- name: List components
|
# - name: List components
|
||||||
run: echo ${{ matrix.components }}
|
# run: echo ${{ matrix.components }}
|
||||||
|
|
||||||
- name: Install dependencies
|
# - name: Install dependencies
|
||||||
run: |
|
# run: |
|
||||||
sudo apt-get update
|
# sudo apt-get update
|
||||||
sudo apt-get install libsdl2-dev
|
# sudo apt-get install libsdl2-dev
|
||||||
|
|
||||||
- name: Check out code from GitHub
|
# - name: Check out code from GitHub
|
||||||
uses: actions/checkout@v4.1.7
|
# uses: actions/checkout@v4.1.7
|
||||||
- name: Restore Python
|
# - name: Restore Python
|
||||||
uses: ./.github/actions/restore-python
|
# uses: ./.github/actions/restore-python
|
||||||
with:
|
# with:
|
||||||
python-version: ${{ env.DEFAULT_PYTHON }}
|
# python-version: ${{ env.DEFAULT_PYTHON }}
|
||||||
cache-key: ${{ needs.common.outputs.cache-key }}
|
# cache-key: ${{ needs.common.outputs.cache-key }}
|
||||||
- name: Validate config
|
# - name: Validate config
|
||||||
run: |
|
# run: |
|
||||||
. venv/bin/activate
|
# . venv/bin/activate
|
||||||
for component in ${{ matrix.components }}; do
|
# for component in ${{ matrix.components }}; do
|
||||||
./script/test_build_components -e config -c $component
|
# ./script/test_build_components -e config -c $component
|
||||||
done
|
# done
|
||||||
- name: Compile config
|
# - name: Compile config
|
||||||
run: |
|
# run: |
|
||||||
. venv/bin/activate
|
# . venv/bin/activate
|
||||||
mkdir build_cache
|
# mkdir build_cache
|
||||||
export PLATFORMIO_BUILD_CACHE_DIR=$PWD/build_cache
|
# export PLATFORMIO_BUILD_CACHE_DIR=$PWD/build_cache
|
||||||
for component in ${{ matrix.components }}; do
|
# for component in ${{ matrix.components }}; do
|
||||||
./script/test_build_components -e compile -c $component
|
# ./script/test_build_components -e compile -c $component
|
||||||
done
|
# done
|
||||||
|
|
||||||
ci-status:
|
ci-status:
|
||||||
name: CI Status
|
name: CI Status
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
needs:
|
needs:
|
||||||
- common
|
- common
|
||||||
- black
|
# - black
|
||||||
- ci-custom
|
# - ci-custom
|
||||||
- clang-format
|
# - clang-format
|
||||||
- flake8
|
# - flake8
|
||||||
- pylint
|
# - pylint
|
||||||
- pytest
|
# - pytest
|
||||||
- pyupgrade
|
# - pyupgrade
|
||||||
- clang-tidy
|
- clang-tidy
|
||||||
- list-components
|
- list-components
|
||||||
- test-build-components
|
# - test-build-components
|
||||||
- test-build-components-splitter
|
# - test-build-components-splitter
|
||||||
- test-build-components-split
|
# - test-build-components-split
|
||||||
if: always()
|
if: always()
|
||||||
steps:
|
steps:
|
||||||
- name: Success
|
- name: Success
|
||||||
|
|
|
@ -139,7 +139,7 @@ extra_scripts = post:esphome/components/esp32/post_build.py.script
|
||||||
extends = common:idf
|
extends = common:idf
|
||||||
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.06/platform-espressif32.zip
|
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.06/platform-espressif32.zip
|
||||||
platform_packages =
|
platform_packages =
|
||||||
pioarduino/framework-espidf@https://github.com/pioarduino/esp-idf/releases/download/v5.1.4.241024/esp-idf-v5.1.4.zip
|
pioarduino/framework-espidf@https://github.com/pioarduino/esp-idf/releases/download/v5.1.5/esp-idf-v5.1.5.zip
|
||||||
|
|
||||||
framework = espidf
|
framework = espidf
|
||||||
lib_deps =
|
lib_deps =
|
||||||
|
|
|
@ -101,9 +101,11 @@ def clang_options(idedata):
|
||||||
for directory in list(idedata["includes"]["build"]):
|
for directory in list(idedata["includes"]["build"]):
|
||||||
# skip our own directories, we add those later
|
# skip our own directories, we add those later
|
||||||
if (
|
if (
|
||||||
not directory.startswith(f"{root_path}/")
|
not directory.startswith(f"{root_path}")
|
||||||
or directory.startswith(f"{root_path}/.pio/")
|
or directory.startswith(f"{root_path}/.pio")
|
||||||
or directory.startswith(f"{root_path}/managed_components/")
|
or directory.startswith(f"{root_path}/.platformio")
|
||||||
|
or directory.startswith(f"{root_path}/.temp")
|
||||||
|
or directory.startswith(f"{root_path}/managed_components")
|
||||||
):
|
):
|
||||||
cmd.extend(["-isystem", directory])
|
cmd.extend(["-isystem", directory])
|
||||||
|
|
||||||
|
@ -235,7 +237,7 @@ def main():
|
||||||
|
|
||||||
failed_files = []
|
failed_files = []
|
||||||
try:
|
try:
|
||||||
executable = get_binary("clang-tidy", 14)
|
executable = get_binary("clang-tidy", 18)
|
||||||
task_queue = queue.Queue(args.jobs)
|
task_queue = queue.Queue(args.jobs)
|
||||||
lock = threading.Lock()
|
lock = threading.Lock()
|
||||||
for _ in range(args.jobs):
|
for _ in range(args.jobs):
|
||||||
|
|
|
@ -6,8 +6,6 @@ esp32:
|
||||||
board: lolin_c3_mini
|
board: lolin_c3_mini
|
||||||
framework:
|
framework:
|
||||||
type: esp-idf
|
type: esp-idf
|
||||||
version: 5.1.4
|
|
||||||
release: "241024"
|
|
||||||
|
|
||||||
logger:
|
logger:
|
||||||
level: VERY_VERBOSE
|
level: VERY_VERBOSE
|
||||||
|
|
|
@ -6,8 +6,6 @@ esp32:
|
||||||
board: nodemcu-32s
|
board: nodemcu-32s
|
||||||
framework:
|
framework:
|
||||||
type: esp-idf
|
type: esp-idf
|
||||||
version: 5.1.4
|
|
||||||
release: "241024"
|
|
||||||
|
|
||||||
logger:
|
logger:
|
||||||
level: VERY_VERBOSE
|
level: VERY_VERBOSE
|
||||||
|
|
|
@ -7,8 +7,6 @@ esp32:
|
||||||
variant: ESP32S2
|
variant: ESP32S2
|
||||||
framework:
|
framework:
|
||||||
type: esp-idf
|
type: esp-idf
|
||||||
version: 5.1.4
|
|
||||||
release: "241024"
|
|
||||||
|
|
||||||
logger:
|
logger:
|
||||||
level: VERY_VERBOSE
|
level: VERY_VERBOSE
|
||||||
|
|
|
@ -7,8 +7,6 @@ esp32:
|
||||||
variant: ESP32S3
|
variant: ESP32S3
|
||||||
framework:
|
framework:
|
||||||
type: esp-idf
|
type: esp-idf
|
||||||
version: 5.1.4
|
|
||||||
release: "241024"
|
|
||||||
|
|
||||||
logger:
|
logger:
|
||||||
level: VERY_VERBOSE
|
level: VERY_VERBOSE
|
||||||
|
|
Loading…
Reference in a new issue