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
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ updates:
directory: "/"
schedule:
interval: "weekly"
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()
205 changes: 107 additions & 98 deletions .github/workflows/build_arduino.yml
Original file line number Diff line number Diff line change
@@ -1,98 +1,107 @@
name: Arduino CLI build

on:
pull_request:
branches: [master, v1.x]
paths:
- ".github/workflows/build_arduino.yml"
- "examples/**"

push:
branches: [master, v1.x]
paths:
- ".github/workflows/build_arduino.yml"
- "examples/**"

jobs:
build:
uses: nRF24/.github/.github/workflows/build_arduino.yaml@main
with:
sketch-paths: |
- examples/helloworld_rx
- examples/helloworld_rx_advanced
- examples/helloworld_tx_advanced
- examples/helloworld_tx
- examples/Network_Priority_RX
- examples/Network_Priority_TX
# - examples/Network_Ping
# - examples/Network_Ping_Sleep
libraries: |
- source-url: https://github.com/nRF24/RF24.git
- source-path: ./
- name: nrf_to_nrf
fqbn: ${{ matrix.fqbn }}
enable-deltas-report: ${{ matrix.enable-deltas-report }}
platforms: |
- name: arduino:avr
- name: arduino:megaavr
- name: arduino:samd
- name: arduino:mbed
# - name: arduino:sam
strategy:
fail-fast: false
matrix:
fqbn:
- "arduino:avr:yun"
- "arduino:avr:uno"
- "arduino:avr:diecimila"
- "arduino:avr:mega"
- "arduino:avr:megaADK"
- "arduino:avr:leonardo"
- "arduino:avr:micro"
- "arduino:avr:esplora"
- "arduino:avr:mini"
- "arduino:avr:ethernet"
- "arduino:avr:fio"
- "arduino:avr:bt"
# - "arduino:avr:LilyPad" # board not found
- "arduino:avr:LilyPadUSB"
- "arduino:avr:pro"
- "arduino:avr:atmegang"
- "arduino:avr:robotControl"
# - "arduino:avr:gemma" # does not support SPI
- "arduino:avr:circuitplay32u4cat"
- "arduino:avr:yunmini"
- "arduino:avr:chiwawa"
- "arduino:avr:one"
- "arduino:avr:unowifi"
- "arduino:mbed:nano33ble"
- "arduino:samd:mkr1000"
- "arduino:samd:mkrwifi1010"
- "arduino:samd:nano_33_iot"
- "arduino:samd:mkrfox1200"
- "arduino:samd:mkrwan1300"
- "arduino:samd:mkrwan1310"
- "arduino:samd:mkrgsm1400"
- "arduino:samd:mkrnb1500"
- "arduino:samd:mkrvidor4000"
- "arduino:samd:adafruit_circuitplayground_m0"
- "arduino:samd:mzero_pro_bl"
- "arduino:samd:mzero_bl"
- "arduino:samd:tian"
- "arduino:megaavr:uno2018"
# - "arduino:megaavr:nano4809" # board not found
# By default, don't generate size deltas data.
enable-deltas-report:
- false
# Generate size deltas data for this board
include:
- fqbn: arduino:avr:nano
enable-deltas-report: true
- fqbn: arduino:samd:mkrzero
enable-deltas-report: true

# When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report
report:
needs: [build]
if: github.event_name == 'pull_request'
uses: nRF24/.github/.github/workflows/arduino_size_deltas.yaml@main
name: Arduino

on:
pull_request:
branches: [master, v1.x]
paths:
- ".github/workflows/build_arduino.yml"
- "examples/**"

push:
branches: [master, v1.x]
paths:
- ".github/workflows/build_arduino.yml"
- "examples/**"

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:
sketch-paths: |
- examples/helloworld_rx
- examples/helloworld_rx_advanced
- examples/helloworld_tx_advanced
- examples/helloworld_tx
- examples/Network_Priority_RX
- examples/Network_Priority_TX
# - examples/Network_Ping
# - examples/Network_Ping_Sleep
libraries: |
- source-url: https://github.com/nRF24/RF24.git
- source-path: ./
- name: nrf_to_nrf
fqbn: ${{ matrix.fqbn }}
enable-deltas-report: ${{ matrix.enable-deltas-report }}
platforms: |
- name: arduino:avr
- name: arduino:megaavr
- name: arduino:samd
- name: arduino:mbed
# - name: arduino:sam
strategy:
fail-fast: false
matrix:
fqbn:
- "arduino:avr:yun"
- "arduino:avr:uno"
- "arduino:avr:diecimila"
- "arduino:avr:mega"
- "arduino:avr:megaADK"
- "arduino:avr:leonardo"
- "arduino:avr:micro"
- "arduino:avr:esplora"
- "arduino:avr:mini"
- "arduino:avr:ethernet"
- "arduino:avr:fio"
- "arduino:avr:bt"
# - "arduino:avr:LilyPad" # board not found
- "arduino:avr:LilyPadUSB"
- "arduino:avr:pro"
- "arduino:avr:atmegang"
- "arduino:avr:robotControl"
# - "arduino:avr:gemma" # does not support SPI
- "arduino:avr:circuitplay32u4cat"
- "arduino:avr:yunmini"
- "arduino:avr:chiwawa"
- "arduino:avr:one"
- "arduino:avr:unowifi"
- "arduino:mbed:nano33ble"
- "arduino:samd:mkr1000"
- "arduino:samd:mkrwifi1010"
- "arduino:samd:nano_33_iot"
- "arduino:samd:mkrfox1200"
- "arduino:samd:mkrwan1300"
- "arduino:samd:mkrwan1310"
- "arduino:samd:mkrgsm1400"
- "arduino:samd:mkrnb1500"
- "arduino:samd:mkrvidor4000"
- "arduino:samd:adafruit_circuitplayground_m0"
- "arduino:samd:mzero_pro_bl"
- "arduino:samd:mzero_bl"
- "arduino:samd:tian"
- "arduino:megaavr:uno2018"
# - "arduino:megaavr:nano4809" # board not found
# By default, don't generate size deltas data.
enable-deltas-report:
- false
# Generate size deltas data for this board
include:
- fqbn: arduino:avr:nano
enable-deltas-report: true
- fqbn: arduino:samd:mkrzero
enable-deltas-report: true

# 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
24 changes: 19 additions & 5 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,18 +27,22 @@ on:
- "**pyRF24Network/setup.py"
- "**pyRF24Network/*.cpp"
- ".github/workflows/linux_build.yml"
release:
types: [created]
tags: ["*"]

permissions: {}

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

jobs:
using_cmake:
build:
uses: nRF24/.github/.github/workflows/build_linux_cmake.yaml@main
with:
rf24network-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: RPi/pyRF24Network
strategy:
fail-fast: false
Expand All @@ -54,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
56 changes: 31 additions & 25 deletions .github/workflows/build_nrf_to_nrf.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
name: nRF52840 build

on:
pull_request:
branches: [master]
push:
branches: [master]

jobs:
build:
uses: nRF24/.github/.github/workflows/build_platformio.yaml@main
with:
example-path: ${{ matrix.example }}
board-id: ${{ matrix.board }}
lib-deps: -l https://github.com/TMRh20/nrf_to_nrf.git
strategy:
fail-fast: false
matrix:
example:
- "examples/nrf_to_nrf/helloworld_rx/helloworld_rx.ino"
- "examples/nrf_to_nrf/helloworld_tx/helloworld_tx.ino"
- "examples/nrf_to_nrf/helloworld_rxEncryption/helloworld_rxEncryption.ino"
- "examples/nrf_to_nrf/helloworld_txEncryption/helloworld_txEncryption.ino"
board:
- "adafruit_feather_nrf52840"
name: nRF52840

on:
pull_request:
branches: [master]
push:
branches: [master]

permissions: {}

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

jobs:
build:
uses: nRF24/.github/.github/workflows/build_platformio.yaml@main
with:
example-path: ${{ matrix.example }}
board-id: ${{ matrix.board }}
lib-deps: -l https://github.com/TMRh20/nrf_to_nrf.git
strategy:
fail-fast: false
matrix:
example:
- "examples/nrf_to_nrf/helloworld_rx/helloworld_rx.ino"
- "examples/nrf_to_nrf/helloworld_tx/helloworld_tx.ino"
- "examples/nrf_to_nrf/helloworld_rxEncryption/helloworld_rxEncryption.ino"
- "examples/nrf_to_nrf/helloworld_txEncryption/helloworld_txEncryption.ino"
board:
- "adafruit_feather_nrf52840"
Loading