-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nrf noup] Build application in sdk-nrf-toolchain docker image
Add an action which builds and tests application using ncs-docker image.
- Loading branch information
1 parent
876361f
commit e8aeb7a
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build and test app in NCS docker container | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build-and-test-in-docker: | ||
runs-on: ubuntu-22.04 | ||
container: ghcr.io/nrfconnect/sdk-nrf-toolchain:v2.6.99 | ||
defaults: | ||
run: | ||
# Bash shell is needed to set toolchain related environment variables in docker container | ||
# It is a workaround for GitHub Actions limitation https://github.com/actions/runner/issues/1964 | ||
shell: bash | ||
steps: | ||
- name: Checkout repository with example application | ||
uses: actions/checkout@v4 | ||
with: | ||
path: example-application | ||
|
||
- name: Prepare west project | ||
run: | | ||
west init -l example-application | ||
west update -o=--depth=1 -n | ||
- name: Build firmware | ||
working-directory: example-application | ||
run: | | ||
west twister -T app -v --inline-logs --integration | ||
- name: Store hex files | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: built-applications | ||
path: example-application/twister-out/**/zephyr/zephyr.hex | ||
|
||
- name: Twister Tests | ||
working-directory: example-application | ||
run: | | ||
west twister -T tests -v --inline-logs --integration |