-
Notifications
You must be signed in to change notification settings - Fork 8
143 lines (135 loc) · 4.17 KB
/
build.yml
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: CI
on:
push:
branches:
- main
tags: 'REL-*'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: ["dotbot-v1", "dotbot-v2", "freebot-v1.0", "lh2-mini-mote", "nrf52833dk", "nrf52840dk", "nrf5340dk-app", "nrf5340dk-net", "sailbot-v1", "xgo-v1", "xgo-v2"]
config: ["Debug", "Release"]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build projects
run: BUILD_TARGET=${{ matrix.target }} BUILD_CONFIG=${{ matrix.config }} make docker
- name: Build for release and convert elf artifacts to hex
if: matrix.config == 'Release'
run: BUILD_TARGET=${{ matrix.target }} DOCKER_TARGETS="artifacts" BUILD_CONFIG=${{ matrix.config }} make docker
- name: Upload artifact
if: matrix.config == 'Release'
uses: actions/upload-artifact@v4
with:
name: artifacts-${{ matrix.target }}
path: artifacts/*
build-success:
# this is only run if all builds succeeded
needs: build
runs-on: ubuntu-latest
steps:
- name: build succeeded
run: exit 0
style:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Check style
run: make check-format
doc:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Doxygen
run: sudo apt-get install -y doxygen graphviz
- name: Install Sphinx
run: python -m pip install -r doc/sphinx/requirements.txt
- name: Build documentation
run: make doc
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build docker image
run: docker build -t dotbot .
release:
runs-on: ubuntu-latest
needs: [docker, doc, style, build-success]
if: >-
github.event_name == 'push' &&
startsWith(github.event.ref, 'refs/tags')
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Download DotBot v1 artifacts
uses: actions/download-artifact@v4
with:
name: artifacts-dotbot-v1
path: ./artifacts
- name: Download DotBot v2 artifacts
uses: actions/download-artifact@v4
with:
name: artifacts-dotbot-v2
path: ./artifacts
- name: Download Sailbot v1 artifacts
uses: actions/download-artifact@v4
with:
name: artifacts-sailbot-v1
path: ./artifacts
- name: Download nRF52833DK artifacts
uses: actions/download-artifact@v4
with:
name: artifacts-nrf52833dk
path: ./artifacts
- name: Download nRF52840DK artifacts
uses: actions/download-artifact@v4
with:
name: artifacts-nrf52840dk
path: ./artifacts
- name: Download nRF5340DK application artifacts
uses: actions/download-artifact@v4
with:
name: artifacts-nrf5340dk-app
path: ./artifacts
- name: Download nRF5340DK network artifacts
uses: actions/download-artifact@v4
with:
name: artifacts-nrf5340dk-net
path: ./artifacts
- name: Download Freebot artifacts
uses: actions/download-artifact@v4
with:
name: artifacts-freebot-v1.0
path: ./artifacts
- name: Download XGO v1 artifacts
uses: actions/download-artifact@v4
with:
name: artifacts-xgo-v1
path: ./artifacts
- name: Download XGO v2 artifacts
uses: actions/download-artifact@v4
with:
name: artifacts-xgo-v2
path: ./artifacts
- name: Download LH2 mini mote artifacts
uses: actions/download-artifact@v4
with:
name: artifacts-lh2-mini-mote
path: ./artifacts
- name: Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
artifacts: "artifacts/*"
token: ${{ secrets.RELEASE_TOKEN }}