enabled the save settings !command #34
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: IoT Node - LoRaWAN - Firmware build Action | |
on: | |
push: | |
branches: | |
- develop | |
workflow_dispatch: | |
branches: | |
env: | |
ARDUINO_RP2040_DIR: .arduino15/packages/rp2040/hardware/rp2040/4.3.1 | |
IOT_NODE_LORAWAN_APP_KEY: ${{ secrets.IOT_NODE_LORAWAN_APP_KEY }} | |
FLX_SPARKFUN_LORAWAN_APP_EUI: ${{ secrets.FLX_SPARKFUN_LORAWAN_APP_EUI }} | |
jobs: | |
build: | |
name: Build IoT Node - LoRaWAN Firmware | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo and submodules | |
uses: actions/checkout@v3 | |
with: | |
ref: develop | |
# checkout flux-sdk | |
- name: Checkout the flux-sdk | |
run: | | |
git clone --branch feature/rp2350-port https://github.com/sparkfun/flux-sdk.git | |
echo "FLUX_SDK_PATH=`pwd`/flux-sdk" >> $GITHUB_ENV | |
# Run cmake - this will build a custom SparkFun_Flux library we can use with | |
# the Arduino CLI | |
- name: Run CMake | |
run: | | |
echo $FLUX_SDK_PATH | |
mkdir -p build | |
cd build | |
cmake .. | |
cd .. | |
# Setup Arduino command line - install esp32 and all the libs flux needs | |
- name: Arduino - Install and setup the Arduino CLI | |
uses: arduino/setup-arduino-cli@v1 | |
- name: Arduino - Start config file | |
run: arduino-cli config init --additional-urls "https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json" | |
- name: Arduino - Update index | |
run: arduino-cli core update-index | |
# Install RP2040 - 4.0.3 (Nov, 2024) | |
- name: Arduino - Install rp2040 platform | |
run: arduino-cli core install rp2040:[email protected] | |
- name: Patch in our IOT Node boards | |
run: | | |
cd patch | |
cp boards.txt $HOME/$ARDUINO_RP2040_DIR/boards.txt | |
cp -R sparkfun_iotnode_lorawanrp2350 $HOME/$ARDUINO_RP2040_DIR/variants/ | |
cp sparkfun_iotnode_lorawan_rp2350.h $HOME/$ARDUINO_RP2040_DIR/pico-sdk/src/boards/include/boards/ | |
cd .. | |
# install the libraries Flux uses | |
- name: Install Flux dependant libraries | |
run: ./flux-sdk/install-libs.sh | |
# currently using a local copy of the library that removed some warning messages - source is here: | |
# arduino-cli lib install --git-url "https://github.com/felixgalindo/XBeeArduino.git" | |
- name: Install The XBee LoRaWAN library | |
run: | | |
arduino-cli config set library.enable_unsafe_install true | |
arduino-cli lib install --git-url "https://github.com/gigapod/XBeeArduino.git" | |
arduino-cli lib install FastLED | |
# Compile time - build the Firmware for the data logger. | |
# Note: | |
# - The use of a full path to flux - this is needed or the build fails (relative paths get merged). | |
# - ** Nov 25 - for build testing, using the pro micro board definition until new board added | |
- name: Compile DataLogger firmware binary | |
run: | |
arduino-cli compile --fqbn rp2040:rp2040:sparkfun_iotnode_lorawanrp2350 ./sfeIoTNodeLoRaWAN/sfeIoTNodeLoRaWAN.ino | |
--build-property "compiler.cpp.extra_flags=\"-DIOT_NODE_LORAWAN_APP_KEY=$IOT_NODE_LORAWAN_APP_KEY\" \"-DFLX_SPARKFUN_LORAWAN_APP_EUI=$FLX_SPARKFUN_LORAWAN_APP_EUI\" \"-DBUILD_NUMBER=$GITHUB_RUN_NUMBER\"" | |
--export-binaries --clean --library `pwd`/SparkFun_IoTNodeLoRaWAN | |
# Upload the build files - bootloader, paritions, firmware | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Upload Build | |
path: sfeIoTNodeLoRaWAN/build/rp2040.rp2040.sparkfun_iotnode_lorawanrp2350/sfeIoTNodeLoRaWAN.ino.uf2 | |