Skip to content

Commit e06c423

Browse files
committed
.github: workflows: test: install SEGGER J-Link in CI
Add a step to install J-Link before nrfutil, since `nrfutil device` 2.19.0 expects it at `/opt/SEGGER/JLink`. Also set `NRFUTIL_HOME` to a stable path so nrfutil installs consistently. Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
1 parent efbc7d3 commit e06c423

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#
99
# Prerequisites:
1010
# - Self-hosted Linux runner with USB access to the DK (container runs --privileged -v /dev:/dev)
11+
# - SEGGER J-Link is installed in the job container (see "Install SEGGER J-Link" step)
1112
# - nRF54L15 DK + nRF9151 Serial Modem wired and configured per applications/91m1/doc
1213
# - Self-signed CA certificate and private key stored in GitHub secrets
1314
# - nRF Cloud API key with permission to onboard/delete devices
@@ -82,6 +83,7 @@ jobs:
8283
include: ${{ fromJson(needs.plan.outputs.matrix) }}
8384
env:
8485
CMAKE_PREFIX_PATH: /opt/toolchains
86+
NRFUTIL_HOME: /usr/local/share/nrfutil
8587
NRF_CLOUD_API_KEY: ${{ secrets.NRF_CLOUD_API_KEY }}
8688
NRF_CLOUD_CA_CERT: ${{ secrets.NRF_CLOUD_CA_CERT }}
8789
NRF_CLOUD_CA_KEY: ${{ secrets.NRF_CLOUD_CA_KEY }}
@@ -110,6 +112,21 @@ jobs:
110112
- name: Initialize West workspace
111113
uses: ./serial-modem-host-applications/.github/actions/west-init
112114

115+
- name: Install SEGGER J-Link
116+
run: |
117+
set -eu
118+
apt-get update && apt-get install --no-install-recommends -y wget
119+
# nrfutil device 2.19.0 expects J-Link 9.24a at /opt/SEGGER/JLink.
120+
jlink_deb=JLink_Linux_V924a_x86_64.deb
121+
wget --post-data="accept_license_agreement=accepted&non_emb_ctr=confirmed" \
122+
-O "$jlink_deb" "https://www.segger.com/downloads/jlink/$jlink_deb"
123+
# The postinst script calls udevadm, which is unavailable in CI containers.
124+
dpkg --unpack "./$jlink_deb"
125+
rm -f /var/lib/dpkg/info/jlink.postinst
126+
apt-get install -f -y
127+
rm -f "$jlink_deb"
128+
test -f /opt/SEGGER/JLink/libjlinkarm.so
129+
113130
- name: Install nrfutil
114131
run: |
115132
set -eu
@@ -124,6 +141,8 @@ jobs:
124141
https://files.nordicsemi.com/artifactory/swtools/external/nrfutil/packages/nrfutil/nrfutil-x86_64-unknown-linux-gnu-8.1.1.tar.gz \
125142
-o "$work_dir/nrfutil-core.tar.gz"
126143
export NRFUTIL_BOOTSTRAP_TARBALL_PATH="$work_dir/nrfutil-core.tar.gz"
144+
export NRFUTIL_HOME=/usr/local/share/nrfutil
145+
mkdir -p "$NRFUTIL_HOME"
127146
nrfutil install device=2.19.0 --force
128147
129148
- name: Run hardware test

0 commit comments

Comments
 (0)