-
Notifications
You must be signed in to change notification settings - Fork 38
62 lines (53 loc) · 1.85 KB
/
Copy pathbuild-using-docker.yml
File metadata and controls
62 lines (53 loc) · 1.85 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
61
62
name: Build and test app in NCS docker container
on:
pull_request:
push:
jobs:
set-image-tag:
runs-on: ubuntu-24.04
outputs:
IMAGE_TAG: ${{ steps.set-output.outputs.IMAGE_TAG }}
steps:
- name: Checkout repository with example application
uses: actions/checkout@v4
with:
path: example-application
- name: Prepare west project
run: |
python3 -m pip install west
west init -l example-application
west update -o=--depth=1 -n nrf
- name: Find toolchain bundle id
id: set-output
run: echo "IMAGE_TAG=$(./nrf/scripts/print_toolchain_checksum.sh)" >> $GITHUB_OUTPUT
build-and-test-in-docker:
needs: set-image-tag
runs-on: ubuntu-24.04
container: ghcr.io/nrfconnect/sdk-nrf-toolchain:${{ needs.set-image-tag.outputs.IMAGE_TAG }}
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