-
Notifications
You must be signed in to change notification settings - Fork 34
86 lines (70 loc) · 2.75 KB
/
publish-docker.yaml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Publish Docker
on:
push:
branches:
- saga
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
build:
strategy:
# Don't overwhelm the toolchain server
max-parallel: 1
matrix:
include:
- sdk_nrf_branch: v2.7-branch
toolchain_version: v2.7.0
native_board: native_sim
- sdk_nrf_branch: v2.6-branch
toolchain_version: v2.6.0
native_board: native_sim
- sdk_nrf_branch: v2.5-branch
toolchain_version: v2.5.0
native_board: native_sim
- sdk_nrf_branch: v2.4-branch
toolchain_version: v2.4.1
native_board: native_posix
- sdk_nrf_branch: v2.3-branch
toolchain_version: v2.3.0
native_board: native_posix
- sdk_nrf_branch: v2.2-branch
toolchain_version: v2.2.0
native_board: native_posix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build image
run: |
docker build -t nordicplayground/nrfconnect-sdk:${{ matrix.sdk_nrf_branch }} \
--build-arg sdk_nrf_branch=${{ matrix.sdk_nrf_branch }} \
--build-arg toolchain_version=${{ matrix.toolchain_version }} \
.
- name: Build asset_tracker_v2 application
run: |
docker run --rm \
-v ${PWD}:/workdir/project \
-w /workdir/nrf/applications/asset_tracker_v2 \
nordicplayground/nrfconnect-sdk:${{ matrix.sdk_nrf_branch }} \
west build -b nrf9160dk_nrf9160_ns --build-dir /workdir/project/build -- -DEXTRA_CFLAGS="-Werror -Wno-dev"
- name: Ensure nrfjprog works
run: |
docker run --rm nordicplayground/nrfconnect-sdk:${{ matrix.sdk_nrf_branch }} nrfjprog -v
- name: Ensure clang-format works
run: |
docker run --rm nordicplayground/nrfconnect-sdk:${{ matrix.sdk_nrf_branch }} clang-format --version
- name: Ensure native build works
run: |
docker run --rm nordicplayground/nrfconnect-sdk:${{ matrix.sdk_nrf_branch }} west build -b ${{ matrix.native_board }} zephyr/samples/hello_world
- name: Ensure zephyr twister unit tests works
run: |
docker run --rm nordicplayground/nrfconnect-sdk:${{ matrix.sdk_nrf_branch }} ./zephyr/scripts/twister -p ${{ matrix.native_board }} -T zephyr/samples/subsys/testsuite/integration
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: nordicplayground
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish image
run: |
docker images
docker push nordicplayground/nrfconnect-sdk:${{ matrix.sdk_nrf_branch }}