IRQ support using Linux kernel Character Device + Posix threads #826
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux build | |
on: | |
pull_request: | |
branches: [master] | |
paths: | |
- "*.h" | |
- "*.cpp" | |
- "CMakeLists.txt" | |
- "cmake/**" | |
- "library.properties" # CMake & 'configure' gets lib info from here | |
- "configure" | |
- "Makefile" | |
- "utility/CMakeLists.txt" | |
# - "utility/LittleWire/*"" # this is not tested (anymore) | |
- "utility/wiringPi/*" | |
- "utility/MRAAA/*" | |
- "utility/SPIDEV/*" | |
- "utility/pigpio" | |
- "examples_linux/**" | |
- "!examples_linux/*.py" | |
- "!examples_linux/*.md" | |
- "pyRF24/setup.py" | |
- "pyRF24/pyRF24.cpp" | |
- ".github/workflows/build_linux.yml" | |
push: | |
branches: [master] | |
paths: | |
- "*.h" | |
- "*.cpp" | |
- "CMakeLists.txt" | |
- "cmake/**" | |
- "library.properties" # CMake & 'configure' gets lib info from here | |
- "configure" | |
- "Makefile" | |
- "utility/CMakeLists.txt" | |
# - "utility/LittleWire/*"" # this is not tested (anymore) | |
- "utility/wiringPi/*" | |
- "utility/MRAAA/*" | |
- "utility/SPIDEV/*" | |
- "utility/pigpio" | |
- "examples_linux/**" | |
- "!examples_linux/*.py" | |
- "!examples_linux/*.md" | |
- "pyRF24/setup.py" | |
- "pyRF24/pyRF24.cpp" | |
- ".github/workflows/build_linux.yml" | |
release: | |
types: [created] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
####################### using Makefile ############################# | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
config-options: | |
- "--soc=BCM2835 --driver=RPi" | |
- "--soc=BCM2836 --driver=RPi" | |
- "--driver=SPIDEV" | |
- "--driver=MRAA" | |
- "--driver=pigpio" | |
# disable wiringPi due to needing cross-compiled deps (see comment below) | |
# - "--soc=BCM2835 --driver=wiringPi" | |
env: | |
CFLAGS: "-I /usr/local/include" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: provide toolchain | |
run: | | |
sudo apt-get update | |
sudo apt-get install binutils-arm-linux-gnueabi gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf | |
arm-linux-gnueabihf-gcc -v | |
arm-linux-gnueabihf-g++ -v | |
# NOTE: To cross-compile wiringPi, there needs to be cross-compiled `crypt` and `rt` libs | |
# Skip cross-compiling wiringPi to avoid this headache. | |
# - name: provide WiringPi | |
# if: ${{ matrix.config-options == '--soc=BCM2835 --driver=wiringPi' }} | |
# env: | |
# CC: /usr/bin/arm-linux-gnueabihf-gcc | |
# CFLAGS: "-I /usr/local/include -L /usr/local/lib -marm -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -lcrypt -lrt" | |
# run: | | |
# git clone https://github.com/WiringPi/WiringPi | |
# cd WiringPi | |
# ./build | |
- name: provide pigpio | |
if: ${{ matrix.config-options == '--driver=pigpio' }} | |
run: | | |
git clone https://github.com/joan2937/pigpio.git | |
cd pigpio | |
git fetch --tags | |
latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) | |
git checkout $latestTag | |
mkdir build | |
cd build | |
cmake .. -D CMAKE_INSTALL_PREFIX=/usr/arm-linux-gnueabihf \ | |
-D CMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/cmake/toolchains/armhf.cmake | |
make | |
sudo make install | |
- name: provide MRAA | |
if: ${{ matrix.config-options == '--driver=MRAA' }} | |
env: | |
CC: /usr/bin/arm-linux-gnueabihf-gcc | |
CXX: /usr/bin/arm-linux-gnueabihf-g++ | |
run: | | |
git clone https://github.com/intel-iot-devkit/mraa.git | |
cd mraa | |
mkdir build | |
cd build | |
cmake .. \ | |
-D BUILDSWIGNODE=OFF \ | |
-D BUILDARCH=arm \ | |
-D CMAKE_INSTALL_PREFIX=/usr/arm-linux-gnueabihf \ | |
-D CMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/cmake/toolchains/armhf.cmake | |
sudo make install | |
sudo bash -c 'echo "/usr/local/lib/arm-linux-gnueabihf" >> /etc/ld.so.conf' | |
sudo ldconfig | |
- name: library configure | |
run: ./configure ${{ matrix.config-options }} | |
- name: library make | |
run: make | |
- name: library make install | |
run: sudo make install | |
- name: make linux examples | |
run: | | |
cd examples_linux | |
make | |
file ./gettingstarted | |
####################### using CMake ################################ | |
using_cmake: | |
uses: nRF24/.github/.github/workflows/build_linux_cmake.yaml@main | |
with: | |
rf24-ref: ${{ github.sha }} | |
driver: ${{ matrix.driver }} | |
compiler: ${{ matrix.toolchain.compiler }} | |
usr-dir: ${{ matrix.toolchain.usr_dir }} | |
examples-path: examples_linux | |
deploy-release: ${{ github.event_name == 'release' && (matrix.toolchain.compiler == 'armhf' || matrix.toolchain.compiler == 'arm64') && (matrix.driver =='RPi' || matrix.driver =='SPIDEV') }} | |
py-wrapper-path: pyRF24 | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: | |
- compiler: "armhf" | |
usr_dir: "arm-linux-gnueabihf" | |
- compiler: "arm64" | |
usr_dir: "aarch64-linux-gnu" | |
# - compiler: "x86_64" | |
# usr_dir: "x86_64-linux-gnux32" | |
# - compiler: "i686" | |
# usr_dir: "i686-linux-gnu" | |
- compiler: "default" # github runner is hosted on a "amd64" | |
usr_dir: "local" # using this toolchain to test python wrapper | |
driver: | |
- "RPi" | |
- "SPIDEV" | |
- "MRAA" | |
- "pigpio" | |
exclude: | |
# MRAA is not compatible with i686 arch | |
- driver: "MRAA" | |
toolchain: | |
compiler: "i686" | |
usr_dir: "i686-linux-gnu" | |
- driver: "pigpio" | |
toolchain: | |
compiler: "default" | |
usr_dir: "local" | |
include: | |
# need to cross-compile wiringPi dependencies (libcrypt) | |
# only test default compiler with wiringPi | |
- driver: "wiringPi" | |
toolchain: | |
compiler: "default" # github runner is hosted on a "amd64" | |
usr_dir: "local" |