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
30 changes: 30 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.py text eol=lf
*.rst text eol=lf
*.sh text eol=lf
*.h text eol=lf
*.cpp text eol=lf
*.c text eol=lf
.yaml text eol=lf
*.yml text eol=lf
*.md text eol=lf
*.txt text eol=lf
*.json text eol=lf
*.properties text eol=lf
LICENSE text eol=lf
nurfile text eol=lf
.gitignore text eol=lf
.gitattributes text eol=lf
.clang-format text eol=lf
.clang-tidy text eol=lf
Makefile text eol=lf
*.svg text eol=lf
*.ino text eol=lf
*.dot text eol=lf
*.cmake text eol=lf
*.css text eol=lf
Doxyfile text eol=lf
8 changes: 7 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ updates:
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
cooldown:
default-days: 5
groups:
actions:
patterns:
- "*"
6 changes: 5 additions & 1 deletion .github/doxygen.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Running this locally will alter the Doxyfile.
Such changes SHOULD NOT be pushed to the remote.
"""

from pathlib import Path
import json

Expand All @@ -17,9 +18,12 @@ def overwrite_doxygen_value():
properties = json.loads(PROPERTIES.read_text(encoding="utf-8"))
assert "version" in properties
config = CONFIG.read_text(encoding="utf-8")
TMP.write_text("PROJECT_NUMBER = {}\n".format(properties["version"]), encoding="utf-8")
TMP.write_text(
"PROJECT_NUMBER = {}\n".format(properties["version"]), encoding="utf-8"
)
config += f"\n@INCLUDE = {str(TMP)}\n"
CONFIG.write_text(config, encoding="utf-8")


if __name__ == "__main__":
overwrite_doxygen_value()
12 changes: 10 additions & 2 deletions .github/workflows/build_arduino.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Arduino CLI build
name: Arduino

on:
pull_request:
Expand All @@ -15,8 +15,13 @@ on:
- ".github/workflows/build_arduino.yml"
- "examples/**"

jobs:
permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
build:
uses: nRF24/.github/.github/workflows/build_arduino.yaml@main
with:
Expand Down Expand Up @@ -97,5 +102,8 @@ jobs:
# When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report
report:
needs: [build]
permissions:
# needed to post/update comment on PR threads
pull-requests: write
if: github.event_name == 'pull_request'
uses: nRF24/.github/.github/workflows/arduino_size_deltas.yaml@main
27 changes: 18 additions & 9 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux build
name: Linux

on:
pull_request:
Expand Down Expand Up @@ -27,23 +27,22 @@ on:
- "!**Makefile" # old build system is not tested in this workflow
- "pyRF24Mesh/*"
- ".github/workflows/build_linux.yml"
release:
types: [created]
tags: ["*"]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
permissions: {}

jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

using_cmake:
jobs:
build:
uses: nRF24/.github/.github/workflows/build_linux_cmake.yaml@main
with:
rf24mesh-ref: ${{ github.sha }}
compiler: ${{ matrix.toolchain.compiler }}
usr-dir: ${{ matrix.toolchain.usr_dir }}
examples-path: examples_RPi
deploy-release: ${{ github.event_name == 'release' && (matrix.toolchain.compiler == 'armhf' || matrix.toolchain.compiler == 'arm64') }}
py-wrapper-path: pyRF24Mesh
strategy:
fail-fast: false
Expand All @@ -59,3 +58,13 @@ jobs:
# usr_dir: "i686-linux-gnu"
- compiler: "default" # github runner is hosted on a "amd64"
usr_dir: "local"

deploy:
name: deploy release assets
needs: [build]
permissions:
# needed for uploading release assets
contents: write
if: startsWith(github.ref, 'refs/tags/')
uses: nRF24/.github/.github/workflows/deploy_cpack_artifacts.yaml@main
secrets: inherit
27 changes: 20 additions & 7 deletions .github/workflows/build_platformIO.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PlatformIO build
name: PlatformIO

on:
pull_request:
Expand All @@ -17,15 +17,18 @@ on:
- "examples/**"
- "!examples/old_backups/**"
- "!examples/rf24_ATTiny/**"
release:
types: [published, edited]
tags: ["*"]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
validate_lib_json:
uses: nRF24/.github/.github/workflows/validate_deploy_platformio.yaml@main
secrets: inherit
with:
deploy-release: ${{ github.event_name == 'release' }}
name: validate library.json
uses: nRF24/.github/.github/workflows/vaildate_platformio.yaml@main

build:
needs: [validate_lib_json]
Expand All @@ -51,3 +54,13 @@ jobs:
- "teensy40"
- "teensy41"
- "teensylc"

deploy:
name: deploy release asset
if: startsWith(github.ref, 'refs/tags/')
needs: [validate_lib_json, build]
permissions:
# needed for uploading release assets
contents: write
uses: nRF24/.github/.github/workflows/deploy_platformio_artifact.yaml@main
secrets: inherit
9 changes: 7 additions & 2 deletions .github/workflows/build_rp2xxx.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pico SDK build
name: Pico SDK

on:
push:
Expand All @@ -20,8 +20,13 @@ on:
- "cmake/**"
- "examples_pico/*"

jobs:
permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
build:
uses: nRF24/.github/.github/workflows/build_pico_sdk.yaml@main
with:
Expand Down
31 changes: 21 additions & 10 deletions .github/workflows/clang_format.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
name: check code formatting
name: Code format

on:
push:
branches: [master, v1.x]
pull_request:
branches: [master, v1.x]
push:
branches: [master, v1.x]
pull_request:
branches: [master, v1.x]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
check_formatting:
uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main
with:
ignore: examples/old_backups|utility/RPi/bcm2835.h|utility/RPi/bcm2835.c
extensions: ino,c,cpp,h
check:
uses: nRF24/.github/.github/workflows/cpp_lint.yaml@main
permissions:
# needed to detect changed files
contents: read
# needed to post review suggestions on PRs
pull-requests: write
with:
ignore: examples/old_backups|utility/RPi/bcm2835.h|utility/RPi/bcm2835.c
extensions: ino,c,cpp,h
94 changes: 54 additions & 40 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,54 @@
name: build Docs

on:
pull_request:
branches: [master, v1.x]
paths:
- "*.h"
- "docs/**"
- "!docs/README.md"
- "*.md"
- "examples**.cpp"
- "examples**.ino"
- "images/**"
- ".github/workflows/doxygen.yml"
- "Doxyfile"
- "library.properties" # get lib version from here
push:
branches: [master, v1.x]
paths:
- "*.h"
- "docs/**"
- "!docs/README.md"
- "*.md"
- "examples**.cpp"
- "examples**.ino"
- "images/**"
- ".github/workflows/doxygen.yml"
- "Doxyfile"
- "library.properties" # get lib version from here
release:
types: [published, edited]
workflow_dispatch:

jobs:
build-docs:
uses: nRF24/.github/.github/workflows/build_docs.yaml@main
with:
doxygen-version: '1.13.2'
deploy-gh-pages: ${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master') }}
secrets: inherit
name: Docs

on:
pull_request:
branches: [master, v1.x]
paths:
- "*.h"
- "docs/**"
- "!docs/README.md"
- "*.md"
- "examples**.cpp"
- "examples**.ino"
- "images/**"
- ".github/workflows/doxygen.yml"
- "Doxyfile"
- "library.properties" # get lib version from here
push:
branches: [master, v1.x]
paths:
- "*.h"
- "docs/**"
- "!docs/README.md"
- "*.md"
- "examples**.cpp"
- "examples**.ino"
- "images/**"
- ".github/workflows/doxygen.yml"
- "Doxyfile"
- "library.properties" # get lib version from here
tags: ["*"]
workflow_dispatch:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}

jobs:
build:
uses: nRF24/.github/.github/workflows/build_docs.yaml@main
with:
doxygen-version: '1.15.0'

deploy:
needs: [build]
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
permissions:
# to authenticate the gh-pages environment
id-token: write
# to upload to GitHub Pages
pages: write
uses: nRF24/.github/.github/workflows/deploy_docs.yaml@main
secrets: inherit
15 changes: 7 additions & 8 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@
version: 2

build:
os: "ubuntu-22.04"
apt_packages:
- libclang1-12
- libclang-cpp12
os: "ubuntu-24.04"
# apt_packages:
# - libclang1-12
# - libclang-cpp12
tools:
python: "3"
commands:
# Install doxygen from source distributions (conda forge does not keep up-to-date doxygen releases)
- >
DOXYGEN_VERSION="1.13.2" &&
DOXYGEN_VERSION="1.15.0" &&
RELEASE_TITLE=$(echo ${DOXYGEN_VERSION} | tr '.' '_') &&
mkdir .doxygen && cd .doxygen &&
echo $(pwd) &&
echo "https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz" &&
curl -L https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz > doxygen.tar.gz &&
curl -L "https://github.com/doxygen/doxygen/releases/download/Release_${RELEASE_TITLE}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz" --output doxygen.tar.gz &&
gunzip doxygen.tar.gz &&
tar xf doxygen.tar &&
mv doxygen-$DOXYGEN_VERSION/bin/doxygen ./
Expand Down