Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
slav-at-attachix committed Jul 18, 2024
2 parents e3846d1 + d140eef commit 3482a02
Show file tree
Hide file tree
Showing 969 changed files with 15,906 additions and 13,426 deletions.
70 changes: 45 additions & 25 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,28 +1,48 @@
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*'
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
User: slavey
Checks:
-*
bugprone-*
-bugprone-macro-parentheses
-bugprone-reserved-identifier
-bugprone-easily-swappable-parameters
clang-analyzer-*
performance-*
portability-*
cppcoreguidelines-*
-cppcoreguidelines-avoid-c-arrays
-cppcoreguidelines-avoid-do-while
-cppcoreguidelines-pro-bounds-array-to-pointer-decay
-cppcoreguidelines-macro-usage
-cppcoreguidelines-pro-type-reinterpret-cast
-cppcoreguidelines-pro-type-static-cast-downcast
-cppcoreguidelines-pro-type-vararg
-cppcoreguidelines-pro-bounds-pointer-arithmetic
-cppcoreguidelines-pro-bounds-constant-array-index
-cppcoreguidelines-pro-type-union-access
-cppcoreguidelines-avoid-const-or-ref-data-members
-cppcoreguidelines-non-private-member-variables-in-classes
HeaderFilterRegex: '.*'
CheckOptions:
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: cppcoreguidelines-pro-type-static-cast-downcast.StrictMode
value: false
- key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors
value: true
...

55 changes: 55 additions & 0 deletions .github/workflows/cache-clean.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Cache clean

on:
workflow_dispatch:
inputs:
clean_opt:
description: 'Level of cleaning required'
type: choice
default: push-requests
options:
- pull-requests
- ccache
- idf-tools
- ccache+idf

jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
echo "Fetching list of cache keys"
case $CLEAN_OPT in
pull-requests)
filter="-v develop"
;;
ccache)
filter="ccache"
;;
idf-tools)
filter="idf"
;;
ccache+idf)
filter="ccache\|idf"
;;
*)
echo "Unknown option '$CLEAN_OPT'"
exit 1
;;
esac
cacheKeys=$(gh actions-cache list -R $REPO -L 100 | grep $filter | cut -f 1 )
echo "Deleting caches..."
set +e
for cacheKey in $cacheKeys; do
gh actions-cache delete "$cacheKey" -R "$REPO" --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
CLEAN_OPT: ${{ inputs.clean_opt }}
102 changes: 79 additions & 23 deletions .github/workflows/ci-esp32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Continuous Integration (CI) for Esp32

on:
push:


workflow_dispatch:

pull_request:
branches: [ develop ]

Expand All @@ -11,61 +13,115 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
variant: [esp32, esp32s2, esp32c3, esp32s3, esp32c2]
idf_version: ["4.3", "4.4", "5.0"]
exclude:
- variant: esp32s3
idf_version: "4.3"
- variant: esp32c2
idf_version: ["4.4", "5.0", "5.2"]
include:
- os: ubuntu-latest
variant: esp32
idf_version: "4.3"
exclude:
- variant: esp32c2
idf_version: "4.4"
- os: macos-latest
idf_version: "4.4"
- os: macos-latest
idf_version: "5.0"
- os: windows-latest
idf_version: "5.0"

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ toJson(matrix) }}
cancel-in-progress: true

runs-on: ${{ matrix.os }}

env:
CI_BUILD_DIR: ${{ github.workspace }}
SMING_HOME: ${{ github.workspace }}/Sming
SMING_ARCH: Esp32
SMING_SOC: ${{ matrix.variant }}
INSTALL_IDF_VER: ${{ matrix.idf_version }}
IDF_SKIP_CHECK_SUBMODULES: 1
ENABLE_CCACHE: 1
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_MAXSIZE: 500M

steps:
- name: Fix autocrlf setting
run: |
git config --global --add core.autocrlf input
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.idf_version == '4.3' && '3.8' || '3.12' }}

- name: Configure environment
shell: pwsh
- name: Fix permissions
if: matrix.os != 'windows-latest'
run: |
"CI_BUILD_DIR=" + (Resolve-Path ".").path >> $env:GITHUB_ENV
"SMING_HOME=" + (Resolve-Path "Sming").path >> $env:GITHUB_ENV
sudo chown $USER /opt
- name: Install build tools for Ubuntu
if: ${{ matrix.os == 'ubuntu-20.04' }}
- name: Cache ESP-IDF and build tools
uses: actions/cache@v4
with:
path: |
/opt/esp-idf-${{ matrix.idf_version }}
/opt/esp32
key: ${{ matrix.os }}-idf-${{ matrix.idf_version }}

- name: Install build tools for Ubuntu / MacOS
if: matrix.os != 'windows-latest'
run: |
Tools/ci/install.sh
- name: Install build tools for Windows
if: ${{ matrix.os == 'windows-latest' }}
- name: Install build tools for Windows
if: matrix.os == 'windows-latest'
run: |
. Tools/ci/setenv.ps1
Tools/ci/install.cmd
. Tools/ci/setenv.ps1
Tools/ci/install.cmd
- name: Build and test for ${{matrix.variant}} with IDF v${{matrix.idf_version}} on Ubuntu
if: ${{ matrix.os == 'ubuntu-20.04' }}
- name: Restore Compiler Cache
id: ccache
uses: actions/cache/restore@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ matrix.os }}-ccache-${{ matrix.variant }}-${{ matrix.idf_version }}

- name: Build and test for ${{matrix.variant}} with IDF v${{matrix.idf_version}} on Ubuntu / MacOS
if: matrix.os != 'windows-latest'
run: |
source $SMING_HOME/../Tools/export.sh
ccache -z
. Tools/export.sh
Tools/ci/build.sh
- name: Build and test for ${{matrix.variant}} with IDF v${{matrix.idf_version}} on Windows
if: ${{ matrix.os == 'windows-latest' }}
if: matrix.os == 'windows-latest'
run: |
ccache -z
. Tools/ci/setenv.ps1
Tools/ci/build.cmd
- name: Compiler Cache stats
run: |
ccache --evict-older-than 14400s
ccache -sv
- name: Delete Previous Compiler Cache
if: github.ref_name == github.event.repository.default_branch && steps.ccache.outputs.cache-hit
continue-on-error: true
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete "${{ steps.ccache.outputs.cache-primary-key }}" --branch ${{ github.ref_name }} --confirm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Save Compiler Cache
if: github.ref_name == github.event.repository.default_branch || !steps.ccache.outputs.cache-hit
uses: actions/cache/save@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ steps.ccache.outputs.cache-primary-key }}
Loading

0 comments on commit 3482a02

Please sign in to comment.