1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-05 18:30:28 +01:00

Merge branch 'dev' into separate-ota-backend

This commit is contained in:
Keith Burzinski 2024-05-06 17:04:52 -05:00 committed by GitHub
commit e23caabb08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 35 additions and 30 deletions

View File

@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:

View File

@ -40,7 +40,7 @@ jobs:
arch: [amd64, armv7, aarch64]
build_type: ["ha-addon", "docker", "lint"]
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.5
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:

View File

@ -34,7 +34,7 @@ jobs:
cache-key: ${{ steps.cache-key.outputs.key }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Generate cache-key
id: cache-key
run: echo key="${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }}" >> $GITHUB_OUTPUT
@ -66,7 +66,7 @@ jobs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Restore Python
uses: ./.github/actions/restore-python
with:
@ -87,7 +87,7 @@ jobs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Restore Python
uses: ./.github/actions/restore-python
with:
@ -108,7 +108,7 @@ jobs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Restore Python
uses: ./.github/actions/restore-python
with:
@ -129,7 +129,7 @@ jobs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Restore Python
uses: ./.github/actions/restore-python
with:
@ -150,7 +150,7 @@ jobs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Restore Python
uses: ./.github/actions/restore-python
with:
@ -199,7 +199,7 @@ jobs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Restore Python
uses: ./.github/actions/restore-python
with:
@ -229,7 +229,7 @@ jobs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Restore Python
uses: ./.github/actions/restore-python
with:
@ -254,7 +254,7 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Find all YAML test files
id: set-matrix
run: echo "matrix=$(ls tests/test*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
@ -271,7 +271,7 @@ jobs:
file: ${{ fromJson(needs.compile-tests-list.outputs.matrix) }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Restore Python
uses: ./.github/actions/restore-python
with:
@ -303,7 +303,7 @@ jobs:
file: ${{ fromJson(needs.compile-tests-list.outputs.matrix) }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Restore Python
uses: ./.github/actions/restore-python
with:
@ -358,7 +358,7 @@ jobs:
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Restore Python
uses: ./.github/actions/restore-python
with:
@ -402,7 +402,7 @@ jobs:
count: ${{ steps.list-components.outputs.count }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
with:
# Fetch enough history so `git merge-base refs/remotes/origin/dev HEAD` works.
fetch-depth: 500
@ -450,7 +450,7 @@ jobs:
run: sudo apt-get install libsodium-dev
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Restore Python
uses: ./.github/actions/restore-python
with:
@ -476,7 +476,7 @@ jobs:
matrix: ${{ steps.split.outputs.components }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Split components into 20 groups
id: split
run: |
@ -504,7 +504,7 @@ jobs:
run: sudo apt-get install libsodium-dev
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Restore Python
uses: ./.github/actions/restore-python
with:

View File

@ -19,7 +19,7 @@ jobs:
tag: ${{ steps.tag.outputs.tag }}
branch_build: ${{ steps.tag.outputs.branch_build }}
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.5
- name: Get tag
id: tag
# yamllint disable rule:line-length
@ -51,7 +51,7 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.5
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
@ -81,7 +81,7 @@ jobs:
- linux/arm/v7
- linux/arm64
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.5
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
@ -159,7 +159,7 @@ jobs:
- ghcr
- dockerhub
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.1.5
- name: Download digests
uses: actions/download-artifact@v3.0.2
with:

View File

@ -13,10 +13,10 @@ jobs:
if: github.repository == 'esphome/esphome'
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Checkout Home Assistant
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
with:
repository: home-assistant/core
path: lib/home-assistant

View File

@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.5
- name: Run yamllint
uses: frenck/action-yamllint@v1.5.0
with:

View File

@ -24,7 +24,7 @@ template<int... S> struct gens<0, S...> { using type = seq<S...>; }; // NOLINT
template<typename T, typename... X> class TemplatableValue {
public:
TemplatableValue() : type_(EMPTY) {}
TemplatableValue() : type_(NONE) {}
template<typename F, enable_if_t<!is_invocable<F, X...>::value, int> = 0>
TemplatableValue(F value) : type_(VALUE), value_(value) {}
@ -32,13 +32,13 @@ template<typename T, typename... X> class TemplatableValue {
template<typename F, enable_if_t<is_invocable<F, X...>::value, int> = 0>
TemplatableValue(F f) : type_(LAMBDA), f_(f) {}
bool has_value() { return this->type_ != EMPTY; }
bool has_value() { return this->type_ != NONE; }
T value(X... x) {
if (this->type_ == LAMBDA) {
return this->f_(x...);
}
// return value also when empty
// return value also when none
return this->value_;
}
@ -58,7 +58,7 @@ template<typename T, typename... X> class TemplatableValue {
protected:
enum {
EMPTY,
NONE,
VALUE,
LAMBDA,
} type_;

View File

@ -266,7 +266,12 @@ def main():
if args.fix and failed_files:
print("Applying fixes ...")
try:
subprocess.call(["clang-apply-replacements-14", tmpdir])
try:
subprocess.call(["clang-apply-replacements-14", tmpdir])
except FileNotFoundError:
subprocess.call(["clang-apply-replacements", tmpdir])
except FileNotFoundError:
print("Error please install clang-apply-replacements-14 or clang-apply-replacements.\n", file=sys.stderr)
except:
print("Error applying fixes.\n", file=sys.stderr)
raise