Skip to content

Commit

Permalink
add GPLv2 license; this builds locally
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Jun 5, 2021
1 parent 7387ea1 commit a90920a
Show file tree
Hide file tree
Showing 7 changed files with 365 additions and 37 deletions.
42 changes: 10 additions & 32 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
usr_dir: "local"

steps:
- uses: actions/checkout@v1
- name: install rpmbuild
run: sudo apt-get install rpm

Expand Down Expand Up @@ -66,15 +65,7 @@ jobs:
repository: nRF24/RF24
ref: rp2xxx

- name: checkout RF24Network
uses: actions/checkout@v2
with:
repository: nRF24/RF24Network
ref: CMake-4-Linux

- name: build & install RF24
if: ${{ matrix.toolchain.compiler == 'default' }}
working-directory: ${{ github.workspace }}/RF24
run: |
mkdir build
cd build
Expand All @@ -83,9 +74,13 @@ jobs:
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchains/${{ matrix.toolchain.compiler }}.cmake
sudo make install
- name: checkout RF24Network
uses: actions/checkout@v2
with:
repository: nRF24/RF24Network
ref: CMake-4-Linux

- name: build & install RF24Network
if: ${{ matrix.toolchain.compiler == 'default' }}
working-directory: ${{ github.workspace }}/RF24RF24Network
run: |
mkdir build
cd build
Expand All @@ -94,13 +89,16 @@ jobs:
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchains/${{ matrix.toolchain.compiler }}.cmake
sudo make install
- name: checkout RF24Mesh repo
uses: actions/checkout@v2

- name: create CMake build environment
run: cmake -E make_directory ${{ github.workspace }}/build

- name: configure lib
if: ${{ matrix.toolchain.compiler == 'default' }}
working-directory: ${{ github.workspace }}/build
run: cmake .. -D CMAKE_BUILD_TYPE=$BUILD_TYPE -D RF24_DRIVER=${{ matrix.driver }}
run: cmake .. -D CMAKE_BUILD_TYPE=$BUILD_TYPE

- name: configure lib (with toolchain compilers)
if: ${{ matrix.toolchain.compiler != 'default' }}
Expand Down Expand Up @@ -152,23 +150,3 @@ jobs:
run: |
cmake --build .
file ./RF24Mesh_Example
# Apparently we need python3 for ARM installed (or at least the Python-C API for arm)
- name: provide python wrapper prerequisites
if: ${{ matrix.toolchain.compiler == 'default' }}
# python3-rpi.gpio is only required for physical hardware
run: sudo apt-get install python3-dev libboost-python-dev python3-setuptools

- name: create alias symlink to libboost_python3*.so
if: ${{ matrix.toolchain.compiler == 'default' }}
run: sudo ln -s $(ls /usr/lib/$(ls /usr/lib/gcc | tail -1)/libboost_python3*.so | tail -1) /usr/lib/$(ls /usr/lib/gcc | tail -1)/libboost_python3.so

- name: build python wrapper
if: ${{ matrix.toolchain.compiler == 'default' }}
working-directory: ${{ github.workspace }}/pyRF24Mesh
run: python3 setup.py build

- name: install python wrapper
if: ${{ matrix.toolchain.compiler == 'default' }}
working-directory: ${{ github.workspace }}/pyRF24Mesh
run: sudo python3 setup.py install
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@

# ignore docs folder
docs/html/
docs/xml/
docs/xml/

# ignore build folders
build/
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ include(cmake/GetLibInfo.cmake) # sets the variable LibTargetName
# setup CPack options
include(cmake/CPackInfo.cmake)

find_library(RF24 rf24 REQUIRED)
message(STATUS "using RF24 library: ${RF24}")

find_library(RF24Network rf24network REQUIRED)
message(STATUS "using RF24Network library: ${RF24Network}")

###########################
# create target for bulding the RF24Log lib
###########################
Expand All @@ -60,6 +66,8 @@ target_include_directories(${LibTargetName} PUBLIC
target_link_libraries(${LibTargetName} INTERFACE
project_options
project_warnings
SHARED ${RF24}
SHARED ${RF24Network}
)

set_target_properties(
Expand Down
Loading

0 comments on commit a90920a

Please sign in to comment.