Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake for Linux #176

Merged
merged 95 commits into from
Nov 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
1e600d7
add CMake 4 Linux; clean up tests/jamfile relics
2bndy5 Jun 5, 2021
cfe3c5c
this builds locally
2bndy5 Jun 5, 2021
47da072
avoid duplicate workflows when PR is open
2bndy5 Jun 5, 2021
733177e
add CMake user preset json to ignore
2bndy5 Jun 7, 2021
2ac9a46
conform code fmt; limit CI triggers
2bndy5 Jun 12, 2021
4c87a28
missed a fmt inconsistency
2bndy5 Jun 12, 2021
01f2200
update CI scripts
2bndy5 Jun 12, 2021
3ad612a
[no ci] rename uploaded artifact
2bndy5 Jun 12, 2021
49827f1
default BUILD_TYPE to Release
2bndy5 Jun 12, 2021
dc9baae
Update CONTRIBUTING.md
2bndy5 Jun 12, 2021
58f116a
manually trigger CI workflows
2bndy5 Jun 12, 2021
634f7a5
gimme them badges
2bndy5 Jun 12, 2021
3cdb937
run new PlatformIO CI
2bndy5 Jun 13, 2021
6704178
PIO CI needs to know about dependencies
2bndy5 Jun 13, 2021
4dd3c19
force install deps in PIO workflow
2bndy5 Jun 13, 2021
9233555
pio lib install now installs deps from json
2bndy5 Jun 13, 2021
8466197
[library.json] update excludes feild
2bndy5 Jun 13, 2021
6eec391
polish library.json
2bndy5 Jun 13, 2021
f05ebda
exclude linux stuff from PIO & validate lib.json
2bndy5 Jun 13, 2021
ab81be6
[PIO CI] rename artifact
2bndy5 Jun 13, 2021
7986d7a
exclude more useless stuff from PIO pkg
2bndy5 Jun 13, 2021
795ae09
testing examples on qtpy (atsamd21)
2bndy5 Jun 14, 2021
74f446a
add if(!radio.begin()) to linux examples; fmt code
2bndy5 Jun 14, 2021
23ef6da
consolidate duplicate includes
2bndy5 Jun 17, 2021
2d6780e
use CMake CLI to change RF24Network_config macros
2bndy5 Jun 18, 2021
eb2a6ea
enhance docs
2bndy5 Jun 26, 2021
adfb1ad
trigger arduino CI
2bndy5 Jun 26, 2021
bcf5471
uniform examples
2bndy5 Jun 28, 2021
251255e
Use macro name instead of macro value
2bndy5 Jun 28, 2021
72533fe
solution for #179
2bndy5 Jun 29, 2021
9f2e62b
update some docs; use macro instead of def'd value
2bndy5 Jul 2, 2021
2658760
add note about MAIN_BUFFER_SIZE
2bndy5 Jul 2, 2021
d42fe5e
add to last commit for completeness
2bndy5 Jul 2, 2021
f01c4cd
remove useless line from docs code snippet
2bndy5 Jul 4, 2021
95b5e09
fix bad link in docs; uniform SERIAL_DEBUG* calls
2bndy5 Jul 10, 2021
2df98c8
fix warnings about %lu
2bndy5 Jul 17, 2021
3f48c4f
use %iu instead of %ui
2bndy5 Jul 17, 2021
9926e15
use just %u
2bndy5 Jul 17, 2021
58c69b3
[py wrapper] augment setup.py
2bndy5 Jul 22, 2021
790e441
py pkgs from apt are very out-of-date
2bndy5 Jul 22, 2021
bd01c62
let maxlen param be optional
2bndy5 Jul 24, 2021
1195151
+ temp.py for testing; adjust read/peek overloads
2bndy5 Jul 24, 2021
aaa78a9
working solution for #181
2bndy5 Jul 24, 2021
20977e0
add newer begin() to py wrapper
2bndy5 Jul 24, 2021
49e04db
remove useless boost.py overload macros
2bndy5 Jul 24, 2021
8892524
add comments about ATTiny defaults
2bndy5 Jul 24, 2021
ca156a1
explain NETWORK_ACK better
2bndy5 Jul 24, 2021
f301912
use MESH_SLOW_ADDR_RESPONSE to slow POLL responses
2bndy5 Jul 26, 2021
b7d052d
move SLOW_RESPONSE macro to Network lvl
2bndy5 Jul 26, 2021
763ed5a
revert SLOW_ADDR_POLL_RESPONSE
2bndy5 Jul 27, 2021
d6ecb50
introduce FLAG_FIRST_FRAG to avoid repetitive SPI calls
2bndy5 Jul 27, 2021
5b9b5e5
Revert "revert SLOW_ADDR_POLL_RESPONSE"
2bndy5 Jul 27, 2021
4ea2952
testing optimizational solutions on Linux
2bndy5 Jul 29, 2021
859f9c4
use message type instead of a new flag
2bndy5 Jul 29, 2021
d03d6ee
[no ci] remove doc artifact about new flag
2bndy5 Jul 29, 2021
86c0d3b
[docs] expand on use of frame_buffer
2bndy5 Jul 29, 2021
321ce84
ammend multicast* docs
2bndy5 Jul 29, 2021
33d26fe
update python examples
2bndy5 Jul 31, 2021
fde923a
resolves nRF24/RF24Mesh#197
2bndy5 Aug 5, 2021
1794450
resolves #185
2bndy5 Aug 5, 2021
5b8a9bf
examples don't use deprecated begin(channel, addr)
2bndy5 Aug 11, 2021
8b4dd69
relative CMakeLists.txt
2bndy5 Aug 11, 2021
ae8ec89
fix problem in last commit
2bndy5 Aug 11, 2021
936d564
satisfy #187
2bndy5 Aug 11, 2021
50b5be2
[CMake] distinguish project_option/warnings
2bndy5 Aug 11, 2021
149ebcd
allow pybind11 to build in source
2bndy5 Aug 11, 2021
553b1a5
satisfy #186
2bndy5 Aug 12, 2021
2921124
add PicoSDK CI workflow
2bndy5 Aug 13, 2021
5b6b2e0
working blindly with GH runner's FS
2bndy5 Aug 13, 2021
0762837
checkout RF24 lib's rp2xxx branch
2bndy5 Aug 13, 2021
279d9f2
LOL. checkout the actual RF24 repo
2bndy5 Aug 13, 2021
739d366
save the artifacts from proper path
2bndy5 Aug 13, 2021
13b6fb0
[no ci] gimme that badge
2bndy5 Aug 13, 2021
d275379
update root CMakeLists.txt
2bndy5 Aug 13, 2021
2a36d4b
introduce undefined macro USE_RF24_LIB_SRC
2bndy5 Aug 13, 2021
88645ac
further the utility of USE_RF24_LIB_SRC macro
2bndy5 Aug 15, 2021
6ff8bdd
[CMakeLists.txt] fix last commit
2bndy5 Aug 15, 2021
b221759
declare failures() if defined ENABLE_NET_STATS
2bndy5 Aug 15, 2021
3e0cee1
auto-publish new releases to PIO
2bndy5 Aug 23, 2021
d5e0e6b
use --non-interactive option in PIO CI
2bndy5 Sep 25, 2021
97d3679
linux CI uses RF24 master branch
2bndy5 Oct 24, 2021
7653422
typo in linux CI triggers' paths
2bndy5 Oct 24, 2021
110b22a
reviewed pico examples
2bndy5 Oct 24, 2021
9d92dbd
docs ready for RTD hosting
2bndy5 Oct 30, 2021
0df0abf
use URL blob for new img in docs main pg
2bndy5 Oct 30, 2021
f33bacf
fix url from last commit
2bndy5 Oct 30, 2021
dbaf785
sphinx docs conf.py gets lib ver from json
2bndy5 Oct 31, 2021
55e9032
more docs updates
2bndy5 Oct 31, 2021
0c41d05
more doc updates
2bndy5 Oct 31, 2021
2a29943
smal docs update
2bndy5 Nov 1, 2021
8acdf8e
fix formatting in an example
2bndy5 Nov 1, 2021
81b6ab9
gimme that RTD badge
2bndy5 Nov 1, 2021
2498529
[docs] fix multiline API signatures
2bndy5 Nov 3, 2021
6a01eba
max net lvl is 4 (not 3)
2bndy5 Nov 14, 2021
1b0fabe
Merge branch 'master' into CMake-4-Linux
TMRh20 Nov 14, 2021
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
3 changes: 2 additions & 1 deletion .github/workflows/build_arduino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Arduino CLI build

on:
pull_request:
types: [opened, reopened]
paths:
- ".github/workflows/build_arduino.yml"
- "examples/**"
Expand Down Expand Up @@ -51,7 +52,7 @@ jobs:
- "arduino:avr:ethernet"
- "arduino:avr:fio"
- "arduino:avr:bt"
# - "arduino:avr:LilyPad" # board not found
# - "arduino:avr:LilyPad" # board not found
- "arduino:avr:LilyPadUSB"
- "arduino:avr:pro"
- "arduino:avr:atmegang"
Expand Down
130 changes: 130 additions & 0 deletions .github/workflows/build_platformIO.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: PlatformIO build

on:
pull_request:
types: [opened, reopened]
paths:
- ".github/workflows/build_platformIO.yml"
- "library.json"
- "examples/**"
- "!examples/*.zip"
push:
paths:
- ".github/workflows/build_platformIO.yml"
- "library.json"
- "examples/**"
- "!examples/*.zip"
release:
types: [published, edited]

jobs:
validate_lib_json:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: get latest release version number
id: latest_ver
run: echo "::set-output name=release::$(awk -F "=" '/version/ {print $2}' library.properties)"

- name: Set up Python
uses: actions/setup-python@v2

- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio

- name: package lib
run: pio package pack -o PlatformIO-RF24Network-${{ steps.latest_ver.outputs.release }}.tar.gz

- name: Save artifact
uses: actions/upload-artifact@v2
with:
name: "PIO_pkg_RF24Network"
path: PlatformIO*.tar.gz

- name: Upload Release assets
if: github.event_name == 'release'
uses: csexton/release-asset-action@master
with:
pattern: "PlatformIO*.tar.gz"
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: upload package to PlatformIO Registry
if: github.event_name == 'release' && github.event_type != 'edited'
# PIO lib packages cannot be re-published under the same tag
env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
run: pio package publish --owner nrf24 --non-interactive

check_formatting:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check code formatting
uses: per1234/artistic-style-action@main
with:
options-file-path: ./examples/examples_formatter.conf
name-patterns: |
- '*.ino'
- '*.cpp'
- '*.hpp'
- '*.h'
target-paths: |
- examples

build:
needs: [check_formatting, validate_lib_json]
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
example:
- "examples/helloworld_rx/helloworld_rx.ino"
- "examples/helloworld_rx_advanced/helloworld_rx_advanced.ino"
- "examples/helloworld_tx/helloworld_tx.ino"
- "examples/helloworld_tx_advanced/helloworld_tx_advanced.ino"
- "examples/Network_Priority_RX/Network_Priority_RX.ino"
- "examples/Network_Priority_TX/Network_Priority_TX.ino"
board:
- "teensy31"
- "teensy35"
- "teensy36"
- "teensy40"
- "teensy41"
- "teensylc"

steps:
- uses: actions/checkout@v2
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
# "dependencies" field in JSON should automatically install RF24.
# Because we run this CI test against the local repo, the JSON seems neglected
- name: Install library dependencies
run: pio lib -g install nrf24/RF24
- name: Run PlatformIO
run: pio ci --lib="." --board=${{ matrix.board }}
env:
PLATFORMIO_CI_SRC: ${{ matrix.example }}
105 changes: 105 additions & 0 deletions .github/workflows/build_rp2xxx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Pico SDK build

on:
push:
paths:
- ".github/workflows/build_rp2xxx.yml"
- "*.h"
- "*.cpp"
- "CMakeLists.txt"
- "cmake/"
- "examples_pico/*"
pull_request:
types: [opened, reopened]
paths:
- ".github/workflows/build_rp2xxx.yml"
- "*.h"
- "*.cpp"
- "CMakeLists.txt"
- "cmake/**"
- "examples_pico/*"

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

jobs:
build:
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
board:
- "pico"
- "adafruit_feather_rp2040"
- "adafruit_itsybitsy_rp2040"
- "adafruit_qtpy_rp2040"
- "pimoroni_tiny2040" # examples require PicoSDK v1.2.0
- "sparkfun_micromod" # examples require PicoSDK v1.2.0
- "sparkfun_promicro" # examples require PicoSDK v1.2.0
- "sparkfun_thingplus" # examples require PicoSDK v1.2.0
# - "vgaboard" # examples require PicoSDK v1.2.0 (this can be enabled on request)
- "arduino_nano_rp2040_connect" # requires PicoSDK v1.2.0
- "pimoroni_picolipo_4mb" # requires PicoSDK v1.2.0
- "pimoroni_picolipo_16mb" # requires PicoSDK v1.2.0
- "pimoroni_pga2040" # requires PicoSDK v1.2.0
# - "pimoroni_keybow2040" # no SPI bus exposed
# - "pimoroni_picosystem" # SPI is reserved for LCD

steps:
- name: checkout RF24Network lib
uses: actions/checkout@v2
with:
path: RF24Network

- name: checkout RF24 lib
uses: actions/checkout@v2
with:
repository: nRF24/RF24
path: RF24
ref: rp2xxx

- name: Install toolchain
run: sudo apt update && sudo apt install gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential

- name: Clone pico-sdk
uses: actions/checkout@v2
with:
repository: raspberrypi/pico-sdk
# master branch is latest stable release
path: pico-sdk
clean: false
submodules: true

- name: Checkout pico-sdk submodules
working-directory: ${{ github.workspace }}/pico-sdk
run: git submodule update --init

- name: Create Build Environment
working-directory: ${{ github.workspace }}/RF24Network
env:
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
run: cmake -E make_directory ${{ github.workspace }}/RF24Network/build

- name: Configure CMake
working-directory: ${{ github.workspace }}/RF24Network/build
env:
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
run: cmake ../examples_pico -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPICO_BOARD=${{ matrix.board }}

- name: Build
working-directory: ${{ github.workspace }}/RF24Network/build
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE

- name: Save artifact
uses: actions/upload-artifact@v2
with:
name: examples_pico_${{ matrix.board }}
path: |
${{ github.workspace }}/RF24Network/build/*.uf2
${{ github.workspace }}/RF24Network/build/*.elf
# ${{ github.workspace }}/RF24Network/build/*.hex
# ${{ github.workspace }}/RF24Network/build/*.bin
93 changes: 60 additions & 33 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,71 @@
name: DoxyGen build
name: build Docs

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

jobs:
build-doxygen:
runs-on: ubuntu-latest

steps:
- name: get latest release version number
id: latest_ver
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: nRF24/RF24Network
- name: checkout
uses: actions/checkout@v2
- name: overwrite doxygen tags
run: |
touch doxygenAction
echo "PROJECT_NUMBER = ${{ steps.latest_ver.outputs.release }}" >> doxygenAction
echo "@INCLUDE = doxygenAction" >> Doxyfile
- name: build doxygen
uses: mattnotmitt/doxygen-action@v1
with:
working-directory: '.'
doxyfile-path: './Doxyfile'
- name: upload to github pages
if: ${{ github.event_name == 'release'}}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/html
- uses: actions/checkout@v2
- name: get latest release version number
id: latest_ver
run: echo "::set-output name=release::$(awk -F "=" '/version/ {print $2}' library.properties)"
- name: overwrite doxygen tags
run: |
touch doxygenAction
echo "PROJECT_NUMBER = ${{ steps.latest_ver.outputs.release }}" >> doxygenAction
echo "@INCLUDE = doxygenAction" >> Doxyfile
- name: build doxygen
uses: mattnotmitt/doxygen-action@v1
with:
working-directory: '.'
doxyfile-path: './Doxyfile'
- name: Save doxygen docs as artifact
uses: actions/upload-artifact@v2
with:
name: "RF24Network_doxygen_docs"
path: ${{ github.workspace }}/docs/html
- name: upload to github pages
if: ${{ github.event_name == 'release'}}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/html

# build pretty docs using doxygen XML output with Sphinx
- uses: actions/setup-python@v2
- name: Install sphinx deps
run: python -m pip install -r docs/sphinx/requirements.txt
- name: build docs with Sphinx
working-directory: docs
run: sphinx-build sphinx _build
- name: Save sphinx docs as artifact
uses: actions/upload-artifact@v2
with:
name: "RF24Network_sphinx_docs"
path: ${{ github.workspace }}/docs/_build
Loading