Skip to content

Commit

Permalink
feat: add MQTT Light Bulb firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Feb 1, 2023
1 parent c0b541b commit 18eb14d
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 4 deletions.
69 changes: 67 additions & 2 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

- run: echo ${{ steps.version.outputs.nextRelease }}

build:
build-asset_tracker_v2:
runs-on: ubuntu-22.04

needs: [release-version, date-string]
Expand Down Expand Up @@ -215,14 +215,79 @@ jobs:
zephyr.elf
.config
build-mqtt-light-bulb:
runs-on: ubuntu-22.04

needs: [release-version, date-string]

steps:
- uses: actions/checkout@v3
with:
path: firmware
submodules: recursive

- name: Configure the AWS IoT broker hostname
working-directory: firmware
run: |
echo "CONFIG_MQTT_SAMPLE_TRANSPORT_BROKER_HOSTNAME=\"${{ env.BROKER_HOSTNAME }}\"" >> firmware.conf
echo "CONFIG_MQTT_HELPER_SEC_TAG=42" >> firmware.conf
- run: cat firmware.conf
working-directory: firmware

- name: Build
working-directory: firmware
run: |
docker run --rm \
-v ${PWD}:/workdir/project \
-v ${PWD}/mqtt-light-bulb:/workdir/nrf \
-w /workdir/nrf/samples/net/mqtt \
nordicplayground/nrfconnect-sdk:v2.2-branch \
west build \
-p always \
-b thingy91_nrf9160_ns \
--build-dir /workdir/project/build \
-- \
-DOVERLAY_CONFIG=/workdir/project/thingy_world.conf;/workdir/project/firmware.conf" \
-DEXTRA_CFLAGS="-Werror"
- run: cat firmware/firmware.conf
if: failure()

- run: cat firmware/build/zephyr/.config
if: failure()

- run: cat firmware/build/zephyr/zephyr.dts
if: failure()

- name: Copy firmware
run: |
cp firmware/build/zephyr/merged.hex ./
cp firmware/build/zephyr/app_signed.hex ./
cp firmware/build/zephyr/app_update.bin ./
cp firmware/build/zephyr/zephyr.elf ./
cp firmware/build/zephyr/.config ./
- uses: actions/upload-artifact@v3
if: always()
with:
name: thingy91.mqtt-light-bulb-${{ needs.date-string.outputs.dateAsString }}-${{ github.sha }}
path: |
merged.hex
app_signed.hex
app_update.bin
firmware.conf
zephyr.elf
.config
release:
name: Release
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/saga' && (github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' || github.event_name ==
'repository_dispatch')

needs: [build]
needs: [build-asset_tracker_v2, build-mqtt-light-bulb]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/synchronize-from-upstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Update from upstream
run: git submodule update --remote

- name: Get fork version
- name: Get forked version
working-directory: sdk-nrf
run: echo "UPSTREAM_REV=`git rev-parse HEAD | tr -d '\n'`" >> $GITHUB_ENV

Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
path = sdk-nrf
url = https://github.com/maxd-nordic/sdk-nrf.git
branch = atv2-ina3221
[submodule "mqtt-light-bulb"]
path = mqtt-light-bulb
url = https://github.com/maxd-nordic/sdk-nrf.git
branch = mqtt-light-bulb
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
![Build and Release](https://github.com/NordicPlayground/thingy-world-firmware-aws/workflows/Build%20and%20Release/badge.svg)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http:https://commitizen.github.io/cz-cli/)

Firmware for devices connecting to the [thingy.world cloud backend](https://github.com/NordicPlayground/thingy-rocks-cloud-aws-js) based on the `asset_tracker_v2` from the [nRF Connect SDK](https://github.com/nrfconnect/sdk-nrf) version 2.2.0.
Firmware for devices connecting to the [thingy.world cloud backend](https://github.com/NordicPlayground/thingy-rocks-cloud-aws-js) based on the `asset_tracker_v2` and `MQTT sample` from the [nRF Connect SDK](https://github.com/nrfconnect/sdk-nrf) version 2.3.0.
1 change: 1 addition & 0 deletions mqtt-light-bulb
Submodule mqtt-light-bulb added at d580cf
20 changes: 20 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,26 @@
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/nrf9160dk.debug.wifi-*/zephyr.elf",
"name": "thingy_world-nRF9160DK-debug.wifi-${nextRelease.gitTag}.elf",
"label": "Symbol file for nRF9160 DK with WiFi Shield firmware (debug)"
},
{
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/thingy91.mqtt-light-bulb-*/merged.hex",
"name": "thingy_world-Thingy91-mqtt-light-bulb-${nextRelease.gitTag}.hex",
"label": "Pre-build HEX file for Thingy:91 MQTT Light Bulb"
},
{
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/thingy91.mqtt-light-bulb-*/app_signed.hex",
"name": "thingy_world-Thingy91-mqtt-light-bulb-${nextRelease.gitTag}-signed.hex",
"label": "Pre-build HEX file for Thingy:91 MQTT Light Bulb"
},
{
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/thingy91.mqtt-light-bulb-*/app_update.bin",
"name": "thingy_world-Thingy91-mqtt-light-bulb-${nextRelease.gitTag}-app_upgrade.bin",
"label": "App upgrade file for Thingy:91 MQTT Light Bulb"
},
{
"path": "/home/runner/work/thingy-world-firmware-aws/thingy-world-firmware-aws/thingy91.mqtt-light-bulb-*/zephyr.elf",
"name": "thingy_world-Thingy91-mqtt-light-bulb-${nextRelease.gitTag}.elf",
"label": "Symbol file for Thingy:91 MQTT Light Bulb"
}
]
}
Expand Down

0 comments on commit 18eb14d

Please sign in to comment.