Skip to content

Commit 6ea22fc

Browse files
committed
github: Initial build workflow
Initial version of build workflow running twister building for PRs. Jira: SLM-138 Signed-off-by: Tommi Rantanen <tommi.rantanen@nordicsemi.no>
1 parent 86f2e2e commit 6ea22fc

3 files changed

Lines changed: 68 additions & 9 deletions

File tree

.github/workflows/build.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- "doc/**"
7+
- "README.md"
8+
- ".github/workflows/*.yml"
9+
- "!.github/workflows/build.yml"
10+
schedule:
11+
# Run every day at 03:00 AM
12+
- cron: "00 3 * * *"
13+
14+
jobs:
15+
build-and-test-in-toolchain-bundle:
16+
runs-on: ubuntu-24.04
17+
steps:
18+
- name: Checkout Serial Modem repository
19+
uses: actions/checkout@v4
20+
with:
21+
path: serial_modem
22+
23+
- name: Prepare west project
24+
run: |
25+
python3 -m pip install west
26+
west init -l serial_modem
27+
west update -o=--depth=1 -n
28+
29+
- name: Install nrfutil and toolchain manager
30+
run: |
31+
wget -q https://files.nordicsemi.com/artifactory/swtools/external/nrfutil/executables/x86_64-unknown-linux-gnu/nrfutil
32+
chmod +x nrfutil
33+
./nrfutil install toolchain-manager
34+
35+
- name: Find proper toolchain bundle
36+
id: set-tb-id
37+
run: echo "TOOLCHAIN_BUNDLE_NAME=ncs-toolchain-x86_64-linux-$(./nrf/scripts/print_toolchain_checksum.sh).tar.gz" >> $GITHUB_OUTPUT
38+
39+
- name: Restore toolchain bundle from cache
40+
id: restore-cached-tb
41+
uses: actions/cache/restore@v4
42+
with:
43+
path: ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
44+
key: ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
45+
46+
- name: Download toolchain bundle if not cached
47+
if: steps.restore-cached-tb.outputs.cache-hit != 'true'
48+
run: wget https://files.nordicsemi.com/artifactory/NCS/external/bundles/v3/${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
49+
50+
- name: Save toolchain bundle to cache
51+
if: steps.restore-cached-tb.outputs.cache-hit != 'true'
52+
uses: actions/cache/save@v4
53+
with:
54+
path: ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
55+
key: ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
56+
57+
- name: Install proper toolchain bundle
58+
run: ./nrfutil toolchain-manager install --toolchain-bundle ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
59+
60+
- name: Build Serial Modem for PR
61+
if: github.event_name == 'pull_request'
62+
run: |
63+
./nrfutil toolchain-manager launch --chdir serial_modem -- west twister -T . -v --inline-logs --integration
64+
65+
- name: Build Serial Modem nightly
66+
if: github.event_name == 'schedule'
67+
run: |
68+
./nrfutil toolchain-manager launch --chdir serial_modem -- west twister -T . -v --inline-logs

app/sample.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ tests:
1313
- thingy91x/nrf9151/ns
1414
integration_platforms:
1515
- nrf9160dk/nrf9160/ns
16-
- nrf9161dk/nrf9161/ns
1716
- nrf9151dk/nrf9151/ns
18-
- nrf9131ek/nrf9131/ns
19-
- thingy91/nrf9160/ns
2017
- thingy91x/nrf9151/ns
2118
tags:
2219
- ci_build
@@ -299,10 +296,6 @@ tests:
299296
- thingy91x/nrf9151/ns
300297
integration_platforms:
301298
- nrf9151dk/nrf9151/ns
302-
- nrf9160dk/nrf9160/ns
303-
- nrf9161dk/nrf9161/ns
304-
- thingy91/nrf9160/ns
305-
- thingy91x/nrf9151/ns
306299
tags:
307300
- ci_build
308301
- sysbuild

samples/sm_host_shell/sample.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ tests:
1010
- nrf5340dk/nrf5340/cpuapp
1111
- nrf7002dk/nrf5340/cpuapp
1212
integration_platforms:
13-
- nrf52840dk/nrf52840
1413
- nrf5340dk/nrf5340/cpuapp
15-
- nrf7002dk/nrf5340/cpuapp
1614
tags:
1715
- ci_build
1816
- sysbuild

0 commit comments

Comments
 (0)