-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtasks.py
62 lines (57 loc) · 1.51 KB
/
tasks.py
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
"""
Invoke tasks for the 01_kconfig demo.
This file exists mainly for simplyfing the CI configuration.
"""
from invoke import task
def __runall__(c, msg, cmds):
print(f"###\n###\n###\n### {msg}\n###")
[c.run(cmd) for cmd in cmds] # pylint: disable=expression-not-assigned
@task
def ci(c):
__runall__(
c,
"Plain west build",
[
"rm -rf build",
"west build --board nrf52840dk_nrf52840",
],
)
__runall__(
c,
"west release build",
[
"rm -rf build",
"west build --board nrf52840dk_nrf52840 -- "
+ "-DCONF_FILE=prj_release.conf",
],
)
__runall__(
c,
"west extra build",
[
"rm -rf build",
"west build --board nrf52840dk_nrf52840 -- "
+ '-DEXTRA_CONF_FILE="extra0.conf;extra1.conf"',
],
)
__runall__(
c,
"west extra release build",
[
"rm -rf build",
"west build --board nrf52840dk_nrf52840 -- "
+ '-DCONF_FILE="prj_release.conf" '
+ '-DEXTRA_CONF_FILE="extra1.conf;extra0.conf"',
],
)
__runall__(
c,
"west hardenconfig",
[
"rm -rf build",
"west build --board nrf52840dk_nrf52840 --pristine -t hardenconfig",
"west build --board nrf52840dk_nrf52840 --pristine -t hardenconfig -- "
+ "-DCONF_FILE=prj_release.conf",
],
)
c.run("rm -rf build")