-
Notifications
You must be signed in to change notification settings - Fork 28
60 lines (49 loc) · 2.21 KB
/
Copy pathbuild.yml
File metadata and controls
60 lines (49 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build and test app in toolchain bundle environment
on:
pull_request:
jobs:
build-and-test-in-toolchain-bundle:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository with Serial Modem
uses: actions/checkout@v4
with:
path: serial_modem
- name: Prepare west project
run: |
python3 -m pip install west
west init -l serial_modem
west update -o=--depth=1 -n
- name: Install nrfutil and toolchain manager
run: |
wget -q https://files.nordicsemi.com/artifactory/swtools/external/nrfutil/executables/x86_64-unknown-linux-gnu/nrfutil
chmod +x nrfutil
./nrfutil install toolchain-manager
- name: Find proper toolchain bundle
id: set-tb-id
run: echo "TOOLCHAIN_BUNDLE_NAME=ncs-toolchain-x86_64-linux-$(./nrf/scripts/print_toolchain_checksum.sh).tar.gz" >> $GITHUB_OUTPUT
- name: Restore toolchain bundle from cache
id: restore-cached-tb
uses: actions/cache/restore@v4
with:
path: ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
key: ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
- name: Download toolchain bundle if not cached
if: steps.restore-cached-tb.outputs.cache-hit != 'true'
run: wget https://files.nordicsemi.com/artifactory/NCS/external/bundles/v3/${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
- name: Save toolchain bundle to cache
if: steps.restore-cached-tb.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
key: ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
- name: Install proper toolchain bundle
run: ./nrfutil toolchain-manager install --toolchain-bundle ${{steps.set-tb-id.outputs.TOOLCHAIN_BUNDLE_NAME}}
- name: Build firmware
run: |
./nrfutil toolchain-manager launch --chdir serial_modem -- west twister -T app -v --inline-logs --build-only
# - name: Store hex files
# uses: actions/upload-artifact@v4
# with:
# name: built-applications
# path: serial_modem/twister-out/**/zephyr/zephyr.hex