Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build-using-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Build and test app in NCS docker container
on:
pull_request:
push:
branches:
- main
- 'v*-branch'

jobs:
set-image-tag:
Expand Down
40 changes: 10 additions & 30 deletions .github/workflows/build-using-toolchain-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Build and test app in toolchain bundle environment
on:
pull_request:
push:
branches:
- main
- 'v*-branch'

jobs:
build-and-test-in-toolchain-bundle:
Expand All @@ -19,40 +22,17 @@ jobs:
west init -l example-application
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
- name: Setup ncs toolchain
id: setup-toolchain
uses: nrfconnect/action-ncs-toolchain-setup@main
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}}
nrf-path: nrf

- name: Build firmware
run: |
./nrfutil toolchain-manager launch --chdir example-application -- west twister -T app -v --inline-logs --integration
./nrfutil sdk-manager toolchain launch \
--toolchain-bundle-id ${{steps.setup-toolchain.outputs.toolchain-bundle-id}} \
--chdir example-application -- west twister -T app -v --inline-logs --integration

- name: Store hex files
uses: actions/upload-artifact@v4
Expand Down