Skip to content

Commit

Permalink
feat: update to NCS 2.5
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilian Deubel <[email protected]>
  • Loading branch information
maxd-nordic committed Nov 23, 2023
1 parent efc2831 commit b7357da
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 25 deletions.
60 changes: 37 additions & 23 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:

build-asset_tracker_v2:
runs-on: ubuntu-22.04
container: ghcr.io/zephyrproject-rtos/ci:v0.26.2
env:
CMAKE_PREFIX_PATH: /opt/toolchains

needs: [release-version, date-string]

Expand Down Expand Up @@ -83,6 +86,18 @@ jobs:
path: firmware
submodules: recursive

- run: mv firmware/sdk-nrf firmware/nrf

- name: Initialize
working-directory: firmware/nrf
run: |
sudo apt-get update
sudo apt-get install -y ruby
pip3 install -r scripts/requirements-build.txt
west init -l .
west config manifest.group-filter +bsec
west update -o=--depth=1 -n
- name: Build for Thingy:91
if: contains(matrix.configuration, 'thingy91')
run: echo 'board=thingy91_nrf9160_ns' >> $GITHUB_ENV
Expand Down Expand Up @@ -138,6 +153,7 @@ jobs:
run: echo CONFIG_OVERLAY=overlay-low-power.conf >> $GITHUB_ENV

- name: enable debug build
working-directory: firmware
if: contains(matrix.configuration, 'debug')
run: |
echo CONFIG_OVERLAY=overlay-debug.conf >> $GITHUB_ENV
Expand All @@ -152,8 +168,7 @@ jobs:
- name: enable WiFi shield support
if: contains(matrix.configuration, 'wifi')
run: |
echo SHIELD_OVERLAY=overlay-nrf7002ek-wifi-scan-only.conf >> $GITHUB_ENV
echo EXTRA_ARGS="-DSHIELD=nrf7002_ek -DDTC_OVERLAY_FILE=nrf9160dk_with_nrf7002ek.overlay" >> $GITHUB_ENV
echo EXTRA_ARGS="-DSHIELD=nrf7002ek -DEXTRA_DTC_OVERLAY_FILE=nrf91xxdk_with_nrf7002ek.overlay -DEXTRA_CONF_FILE=overlay-nrf7002ek-wifi-scan-only.conf" >> $GITHUB_ENV
# WiFi cannot be combined with P-GPS support
- name: enable P-GPS
Expand All @@ -162,39 +177,38 @@ jobs:

- name: enable BSEC library to support Bosch BME680 Environmental sensor
if: contains(matrix.configuration, 'thingy91')
working-directory: firmware/sdk-nrf/ext
working-directory: firmware
run: |
wget -q ${{ secrets.BSEC_ARCHIVE_URL }} -O bsec.zip
unzip -q bsec.zip
ls BSEC_1.4.8.0_Generic_Release_updated_v3
echo BSEC_OVERLAY=/workdir/project/overlay-bsec.conf >> $GITHUB_ENV
echo BSEC_OVERLAY=overlay-bsec.conf >> $GITHUB_ENV
- run: cat firmware.conf
working-directory: firmware

- name: copy overlays
run: |
cp firmware/firmware.conf firmware/nrf/applications/asset_tracker_v2
cp firmware/overlay-bsec.conf firmware/nrf/applications/asset_tracker_v2
- name: Build
working-directory: firmware
working-directory: firmware/nrf/applications/asset_tracker_v2
# -Werror=no-unused-variable below is needed for BSEC to compile
run: |
docker run --rm \
-v ${PWD}:/workdir/project \
-v ${PWD}/sdk-nrf:/workdir/nrf \
-w /workdir/nrf/applications/asset_tracker_v2 \
nordicplayground/nrfconnect-sdk:v2.4-branch \
west build \
-p always \
-b ${{ env.board }} \
--build-dir /workdir/project/build \
-- \
${{ env.EXTRA_ARGS }} \
-DOVERLAY_CONFIG="${{ env.CONFIG_OVERLAY }};${{ env.PGPS_OVERLAY }};${{ env.AWS_OVERLAY }};${{ env.MEMFAULT_OVERLAY }};/workdir/project/firmware.conf;${{ env.SHIELD_OVERLAY }};${{ env.BSEC_OVERLAY }}" \
-DEXTRA_CFLAGS="-Werror -Wno-unused-variable"
west build \
-p always \
-b ${{ env.board }} \
-- \
${{ env.EXTRA_ARGS }} \
-DOVERLAY_CONFIG="${{ env.CONFIG_OVERLAY }};${{ env.PGPS_OVERLAY }};${{ env.AWS_OVERLAY }};${{ env.MEMFAULT_OVERLAY }};firmware.conf;${{ env.SHIELD_OVERLAY }};${{ env.BSEC_OVERLAY }}" \
-DEXTRA_CFLAGS="-Werror -Wno-unused-variable"
- run: mv firmware/nrf/applications/asset_tracker_v2/build firmware/build
if: always()

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

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

- name: Upload symbols file to Memfault
if: contains(matrix.configuration, 'memfault')
Expand Down
2 changes: 1 addition & 1 deletion overlay-bsec.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Disable native Zephyr driver
CONFIG_BME680=n
# Enable vendor driver
CONFIG_EXTERNAL_SENSORS_BME680_BSEC=y
CONFIG_BME68X_IAQ=y
2 changes: 1 addition & 1 deletion sdk-nrf
Submodule sdk-nrf updated 5132 files

0 comments on commit b7357da

Please sign in to comment.