Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,2 +1,33 @@
Checks: "*"
Checks: >
*,
-altera-unroll-loops,
-bugprone-branch-clone,
-bugprone-easily-swappable-parameters,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-vararg,
-fuchsia-default-arguments-calls,
-fuchsia-default-arguments-declarations,
-fuchsia-statically-constructed-objects,
-google-runtime-int,
-hicpp-avoid-c-arrays,
-hicpp-vararg,
-llvm-header-guard,
-llvmlibc-callee-namespace,
-llvmlibc-implementation-in-namespace,
-misc-use-internal-linkage,
-modernize-avoid-c-arrays,
-modernize-use-trailing-return-type,
-portability-avoid-pragma-once,
-readability-convert-member-functions-to-static,
-readability-magic-numbers
CheckOptions:
- key: cppcoreguidelines-macro-usage.CheckCapsOnly
value: true
- key: misc-include-cleaner.MissingIncludes
value: false
- key: readability-identifier-length.IgnoredVariableNames
value: ^(rx|tx)$
FormatStyle: file
12 changes: 12 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
avr:
- changed-files:
- any-glob-to-any-file:
- include/avr/**/*
- src/avr/**/*

bug:
- head-branch:
- ^fix/
Expand All @@ -13,3 +19,9 @@ documentation:
enhancement:
- head-branch:
- ^feat/

esp:
- changed-files:
- any-glob-to-any-file:
- include/esp/**/*
- src/esp/**/*
11 changes: 10 additions & 1 deletion .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
Expand All @@ -38,6 +40,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Clang format
uses: cpp-linter/cpp-linter-action@cab1143a2c149bc41e85b070a9de81716974c18f # v2.21.0
Expand Down Expand Up @@ -70,6 +74,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Set up Cache for PlatformIO
continue-on-error: true
Expand Down Expand Up @@ -122,11 +128,14 @@ jobs:
tidy-checks: ""

- name: Summary
env:
clang-threshold: 64
run: |
echo "Status: ${{ steps.tidy.outputs.checks-failed }} checks failed."
echo "Status: ${{ steps.tidy.outputs.checks-failed }} checks failed, threshold for success is ${{ env.clang-threshold }}."
echo "Clang report:"
if [ -n "${{ github.event.pull_request.number }}" ]; then
echo "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}?pr=${{ github.event.pull_request.number }}"
else
echo "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
fi
exit $(( ${{ steps.tidy.outputs.checks-failed }} > ${{ env.clang-threshold }} ))
2 changes: 2 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: PlatformIO Dependency Updater
uses: VIPnytt/platformio-dependency-updater@151e4688a6696cc129b69b33de262f4be58b7904 # v1.0.2
70 changes: 70 additions & 0 deletions .github/workflows/ikea-bekant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: IKEA Bekant

on:
merge_group:
types:
- checks_requested

pull_request:
branches:
- main

workflow_dispatch:

permissions:
contents: read

jobs:
context:
name: Context
runs-on: ubuntu-latest
outputs:
pio-environments: ${{ steps.platformio.outputs.environments }}

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Comment thread
coderabbitai[bot] marked this conversation as resolved.
with:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
python-version: 3.11
version: latest-known

- name: PlatformIO environments
id: platformio
run: echo "environments=$(uv run pio project config --json-output | jq -c '[.[] | .[0] | select(startswith("env:")) | sub("^env:"; "")]')" >> "$GITHUB_OUTPUT"

build:
name: Build
needs: context
runs-on: ubuntu-latest

strategy:
matrix:
environment: ${{ fromJSON(needs.context.outputs.pio-environments) }}

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Set up Cache for PlatformIO
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
key: platformio-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('platformio.ini') }}
path: .platformio/.cache

- name: Set up uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
python-version: 3.11
version: latest-known

- name: PlatformIO build
env:
PIO_ENVIRONMENT: ${{ matrix.environment }}
run: uv run pio run -e "$PIO_ENVIRONMENT"
4 changes: 3 additions & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Labeler
on:
pull_request_target:
branches:
- master
- main

permissions:
contents: read
Expand All @@ -19,6 +19,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Labeler
uses: actions/labeler@bf12e9b00b37c5c0ca2b87b79b2daf7891dbda13 # v7.0.0
56 changes: 4 additions & 52 deletions .github/workflows/platformio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,75 +3,27 @@ name: PlatformIO
on:
pull_request:
branches:
- master
- main

push:
branches:
- master
- main

workflow_dispatch:

permissions:
contents: read

jobs:
context:
name: Context
runs-on: ubuntu-latest
outputs:
pio-environments: ${{ steps.platformio.outputs.environments }}

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
python-version: 3.11
version: latest-known

- name: PlatformIO environments
id: platformio
run: echo "environments=$(uv run pio project config --json-output | jq -c '[.[] | .[0] | select(startswith("env:")) | sub("^env:"; "")]')" >> "$GITHUB_OUTPUT"

build:
name: Build
needs: context
runs-on: ubuntu-latest

strategy:
matrix:
environment: ${{ fromJSON(needs.context.outputs.pio-environments) }}

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Cache for PlatformIO
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
key: platformio-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('platformio.ini') }}
path: .platformio/.cache

- name: Set up uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
python-version: 3.11
version: latest-known

- name: PlatformIO build
env:
PIO_ENVIRONMENT: ${{ matrix.environment }}
run: uv run pio run -e "$PIO_ENVIRONMENT"

lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/uv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: uv

on:
pull_request:
branches:
- main

workflow_dispatch:

permissions:
contents: read

jobs:
uv-lock:
name: uv.lock consistency
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Comment thread
JanPetterMG marked this conversation as resolved.
with:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
python-version: 3.11
version: latest-known

- name: uv lock check
run: uv lock --check