-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
80 lines (69 loc) · 2.13 KB
/
justfile
File metadata and controls
80 lines (69 loc) · 2.13 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
[no-cd, no-exit-message]
@ run:
just build
build/zephyr/zephyr.exe
[no-cd, no-exit-message]
build:
#!/usr/bin/env sh
if [ -z `just find_nearest_prj` ]; then
echo "Couldn't find prj.conf in current or parent directory(s)"
exit 1
fi
west build -b native_sim -p auto -s `just find_nearest_prj`
[no-cd, no-exit-message]
@ clean:
echo "Deleting build dir..."
rm -R build
[no-exit-message]
@ test test_dir='.':
twister --clobber-output --coverage -T {{test_dir}} --platform native_sim
[no-cd, private, no-exit-message]
find_nearest_prj:
#!/usr/bin/env sh
current_dir=$(pwd)
while [ "$current_dir" != "/" ]; do
if [ -f "$current_dir/prj.conf" ]; then
echo "$current_dir"
exit 0
fi
current_dir=$(dirname "$current_dir")
echo ""
done
[no-exit-message]
list_image_tags registry image_name access_token:
#!/usr/bin/env sh
RESPONSE=$(curl -s -H "Authorization: Bearer $(echo {{access_token}} | base64)" https://{{registry}}/v2/{{image_name}}/tags/list)
if [ -z "$RESPONSE" ]; then
echo "Failed to retrieve tags from {{registry}}/{{image_name}}"
exit 1
fi
echo $RESPONSE | jq -r '.tags | join(" ")'
[no-exit-message]
install_module module_subdir +cmake_options="":
#!/usr/bin/env sh
cd $WEST_WORKSPACE/{{module_subdir}}
mkdir -p build
cmake {{cmake_options}} . -B build
cd build
sudo make install
[no-exit-message]
install_zephyr:
west init -l .
west update
[no-exit-message]
install_all:
just install_zephyr
just install_module magic_enum -DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF -DMAGIC_ENUM_OPT_BUILD_TESTS=OFF
just install_module expected -DEXPECTED_BUILD_TESTS=OFF -DMAGIC_ENUM_OPT_BUILD_TESTS=OFF
just install_module optional -DOPTIONAL_BUILD_TESTS=OFF
just install_module etl
[no-cd, no-exit-message]
samples_build:
#!/usr/bin/env sh
for subdir in samples/*/; do
if [ -d "$subdir" ]; then
echo "Running in: $subdir"
(cd "$subdir" && eval just build)
echo "----------------------------------------"
fi
done