Skip to content

Commit cd57d57

Browse files
committed
First version
First commit from the private repo
0 parents  commit cd57d57

File tree

1,009 files changed

+481491
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,009 files changed

+481491
-0
lines changed

.github/Docker_readme.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Build docker image
2+
3+
Having a docker image for CICD is always a good way to secure the product development. Let's build a docker image.
4+
5+
## Readme
6+
7+
Please check the documentation in the main [README](../README.md) file.

.github/build-docker-image.sh

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/bin/sh
2+
3+
display_help() {
4+
echo "Usage: $0 -i image_name -v version -r registry -a architecture " >&2
5+
echo
6+
echo " -i image_name Specify the image name, for example: devs_xg24_aoa_poc"
7+
echo " -v version Specify the version of docker image, for example: 1.0.0"
8+
echo " -r registry Specify the Docker registry to push the image to (optional) example: lx0017637.silabs.com:5000"
9+
echo " If internal registry is used, SonarQube will be included."
10+
echo " -a architecture Specify the architecture, for example: x86_64 or aarch64"
11+
echo
12+
exit 1
13+
}
14+
15+
image_name=""
16+
version="1.0.0"
17+
registry="none"
18+
architecture="x86_64"
19+
run_sonarqube_scanner="false"
20+
21+
# Process the options
22+
while getopts ":h:i:v:r:a:" opt; do
23+
case $opt in
24+
h) display_help
25+
exit;;
26+
i) image_name="$OPTARG";;
27+
v) version="$OPTARG";;
28+
r) registry="$OPTARG";;
29+
a) architecture="$OPTARG";;
30+
\?) echo "Invalid option -$OPTARG" >&2
31+
display_help
32+
exit 1;;
33+
:) echo "Option -$OPTARG requires an argument." >&2
34+
display_help
35+
exit 1;;
36+
esac
37+
done
38+
39+
if [ "$registry" = "lx0017637.silabs.com:5000" ] ; then
40+
echo "Internal silabs build with: $registry"
41+
run_sonarqube_scanner="true"
42+
fi
43+
44+
# Build the Docker image
45+
echo "Building Docker image: $image_name:$version for architecture: $architecture "
46+
docker build --build-arg ARCH="$architecture" --build-arg SONARQUBE="$run_sonarqube_scanner" -t "$image_name:$version" -f Dockerfile .
47+
48+
if [ -n "$registry" ] && [ "$registry" != "none" ] ; then
49+
docker tag "$image_name:$version" "$registry/$image_name:$version"
50+
docker push "$registry/$image_name:$version"
51+
else
52+
echo "Docker registry not specified, skipping tagging and pushing."
53+
fi

.github/build-with-docker.sh

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/sh
2+
3+
display_help() {
4+
echo "Usage: $0 -i image_name -v version -r registry -a architecture -c clean" >&2
5+
echo
6+
echo " -i image_name Specify the image name, for example: devs_xg24_aoa_poc"
7+
echo " -v version Specify the version of docker image, for example: 1.0.0"
8+
echo " -r registry Specify the Docker registry to push the image to"
9+
echo " -a architecture Specify the architecture, for example: x86_64 or aarch64 (optional)"
10+
echo " -c clean Specify 'clean' to remove the built Docker image"
11+
echo
12+
exit 1
13+
}
14+
15+
image_name="devs_xg24_aoa_poc"
16+
version="1.0.0"
17+
registry="none"
18+
architecture="x86_64"
19+
clean="false"
20+
21+
while getopts ":hi:v:r:a:c" opt; do
22+
case ${opt} in
23+
h )
24+
display_help
25+
exit 1;;
26+
i )
27+
image_name=$OPTARG;;
28+
v )
29+
version=$OPTARG;;
30+
r )
31+
registry=$OPTARG;;
32+
a )
33+
architecture=$OPTARG;;
34+
c )
35+
clean="true";;
36+
\? )
37+
display_help
38+
exit 1 ;;
39+
: )
40+
echo "Invalid option: $OPTARG requires an argument" 1>&2
41+
display_help
42+
exit 1 ;;
43+
esac
44+
done
45+
shift $((OPTIND -1))
46+
47+
echo "<----- Docker based Weber Wasp project building script ----->"
48+
49+
echo "Calling the docker image builder script..."
50+
51+
# Call build-docker-image.sh with arguments
52+
sh ./.github/build-docker-image.sh -i $image_name -v $version -r $registry -a $architecture || { echo "Failed to build the Docker image"; exit 1; }
53+
54+
echo "<----- Running the docker based build environment ----->"
55+
# Run the docker image
56+
docker run -u root --rm -v $(pwd):/home/jenkins/devs_xg24_aoa_poc $image_name:$version /bin/sh -c "cd devs_xg24_aoa_poc && make all"
57+
58+
if [ "$clean" = "true" ]; then
59+
docker rmi $image_name:$version
60+
echo "Clean mode activated. Docker image $image_name:$version is removed."
61+
fi

.github/uncrustify.cfg

+184
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
# uncrustify.cfg version 1.0.0
2+
# SPDX-FileCopyrightText: Silicon Laboratories Inc. https://www.silabs.com
3+
# SPDX-License-Identifier: Zlib
4+
5+
tok_split_gte=false
6+
utf8_byte=false
7+
utf8_force=true
8+
indent_cmt_with_tabs=false
9+
indent_align_string=true
10+
indent_braces=false
11+
indent_braces_no_func=false
12+
indent_braces_no_class=false
13+
indent_braces_no_struct=false
14+
indent_brace_parent=false
15+
indent_namespace=false
16+
indent_extern=false
17+
indent_class=true
18+
indent_class_colon=false
19+
indent_else_if=false
20+
indent_var_def_cont=false
21+
indent_func_call_param=false
22+
indent_func_def_param=false
23+
indent_func_proto_param=false
24+
indent_func_class_param=false
25+
indent_func_ctor_var_param=false
26+
indent_template_param=false
27+
indent_func_param_double=false
28+
indent_relative_single_line_comments=false
29+
indent_col1_comment=false
30+
indent_access_spec_body=false
31+
indent_paren_nl=false
32+
indent_comma_paren=false
33+
indent_bool_paren=false
34+
indent_first_bool_expr=false
35+
indent_square_nl=false
36+
indent_preserve_sql=false
37+
indent_align_assign=true
38+
sp_balance_nested_parens=false
39+
align_keep_tabs=false
40+
align_with_tabs=false
41+
align_on_tabstop=false
42+
align_number_left=false
43+
align_func_params=false
44+
align_same_func_call_params=false
45+
align_var_def_colon=false
46+
align_var_def_attribute=false
47+
align_var_def_inline=false
48+
align_right_cmt_mix=false
49+
align_on_operator=false
50+
align_mix_var_proto=false
51+
align_single_line_func=false
52+
align_single_line_brace=false
53+
align_nl_cont=true
54+
align_left_shift=true
55+
align_oc_decl_colon=false
56+
nl_collapse_empty_body=false
57+
nl_assign_leave_one_liners=false
58+
nl_class_leave_one_liners=false
59+
nl_enum_leave_one_liners=false
60+
nl_getset_leave_one_liners=false
61+
nl_func_leave_one_liners=false
62+
nl_if_leave_one_liners=false
63+
nl_multi_line_cond=false
64+
nl_multi_line_define=false
65+
nl_before_case=false
66+
nl_after_case=false
67+
nl_after_return=false
68+
nl_after_semicolon=false
69+
nl_after_brace_open=false
70+
nl_after_brace_open_cmt=false
71+
nl_after_vbrace_open=false
72+
nl_after_vbrace_open_empty=false
73+
nl_after_brace_close=false
74+
nl_after_vbrace_close=false
75+
nl_define_macro=false
76+
nl_squeeze_ifdef=false
77+
nl_ds_struct_enum_cmt=false
78+
nl_ds_struct_enum_close_brace=false
79+
nl_create_if_one_liner=false
80+
nl_create_for_one_liner=false
81+
nl_create_while_one_liner=false
82+
ls_for_split_full=false
83+
ls_func_split_full=true
84+
nl_after_multiline_comment=false
85+
eat_blanks_after_open_brace=true
86+
eat_blanks_before_close_brace=true
87+
mod_full_brace_if_chain=false
88+
mod_pawn_semicolon=false
89+
mod_full_paren_if_bool=false
90+
mod_remove_extra_semicolon=false
91+
mod_sort_import=false
92+
mod_sort_using=false
93+
mod_sort_include=false
94+
mod_move_case_break=false
95+
mod_remove_empty_return=false
96+
cmt_indent_multi=true
97+
cmt_c_group=false
98+
cmt_c_nl_start=false
99+
cmt_c_nl_end=false
100+
cmt_cpp_group=false
101+
cmt_cpp_nl_start=false
102+
cmt_cpp_nl_end=false
103+
cmt_cpp_to_c=false
104+
cmt_star_cont=false
105+
cmt_multi_check_last=true
106+
cmt_insert_before_preproc=false
107+
pp_indent=ignore
108+
pp_if_indent_code=false
109+
input_tab_size=2
110+
indent_columns=2
111+
indent_label=0
112+
align_pp_define_span=0
113+
nl_start_of_file=remove
114+
nl_end_of_file_min=1
115+
code_width=0
116+
nl_max=2
117+
nl_comment_func_def=1
118+
cmt_width=0
119+
utf8_bom=remove
120+
indent_with_tabs=0
121+
sp_before_assign=add
122+
sp_after_assign=add
123+
sp_bool=add
124+
sp_compare=add
125+
sp_inside_paren=remove
126+
sp_before_sparen=force
127+
sp_paren_paren=ignore
128+
sp_inside_sparen=ignore
129+
sp_after_sparen=force
130+
sp_before_square=remove
131+
sp_before_squares=remove
132+
sp_inside_square=remove
133+
sp_after_comma=force
134+
sp_before_comma=remove
135+
sp_paren_comma=remove
136+
sp_inside_braces=add
137+
sp_inside_braces_empty=remove
138+
sp_func_def_paren=remove
139+
sp_inside_fparen=remove
140+
sp_func_call_paren=remove
141+
sp_func_call_paren_empty=remove
142+
sp_else_brace=force
143+
sp_brace_else=force
144+
sp_sign=remove
145+
sp_incdec=remove
146+
sp_cmt_cpp_start=ignore
147+
sp_endif_cmt=force
148+
nl_end_of_file=add
149+
nl_enum_brace=remove
150+
nl_struct_brace=remove
151+
nl_union_brace=remove
152+
nl_for_brace=remove
153+
nl_brace_finally=remove
154+
nl_while_brace=remove
155+
nl_do_brace=remove
156+
nl_brace_while=remove
157+
nl_switch_brace=remove
158+
nl_if_brace=remove
159+
nl_brace_else=remove
160+
nl_elseif_brace=remove
161+
nl_else_brace=remove
162+
nl_fdef_brace=add
163+
mod_full_brace_do=force
164+
mod_full_brace_if=force
165+
mod_full_brace_while=ignore
166+
mod_full_brace_for=force
167+
mod_full_brace_function=force
168+
sp_cmt_cpp_doxygen=true
169+
cmt_sp_after_star_cont=3
170+
align_keep_extra_space=True
171+
align_var_def_star_style=1
172+
align_var_def_amp_style=1
173+
sp_after_type=ignore
174+
pos_arith=lead
175+
pos_bool=lead
176+
pos_compare=lead
177+
pos_conditional=lead
178+
pos_comma=trail
179+
sp_arith=add
180+
sp_assign=add
181+
sp_pp_concat=ignore
182+
# Indent the 'case' label from the 'switch' header (coding standard §4.4.3)
183+
# Note: Must come *after* the declaration of 'indent_columns'!
184+
indent_switch_case=indent_columns

.github/workflows/cla_signature.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "CLA Assistant"
2+
on:
3+
issue_comment:
4+
types: [created]
5+
pull_request_target:
6+
types: [opened,closed,synchronize]
7+
workflow_dispatch:
8+
9+
10+
# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
11+
permissions:
12+
actions: write
13+
contents: read # this can be 'read' if the signatures are in remote repository
14+
pull-requests: write
15+
statuses: write
16+
17+
jobs:
18+
CLAAssistant:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: "CLA Assistant"
22+
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
23+
uses: contributor-assistant/github-action@v2.6.1
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
# the below token should have repo scope and must be manually added by you in the repository's secret
27+
# This token is required only if you have configured to store the signatures in a remote repository/organization
28+
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
29+
with:
30+
path-to-signatures: 'cla_signatures_db.json'
31+
path-to-document: 'cla.md'
32+
# branch should not be protected
33+
branch: 'main'
34+
allowlist: user1,bot*
35+
# the followings are the optional inputs - If the optional inputs are not given, then default values will be taken
36+
remote-organization-name: 'SiliconLabsWorkflows'
37+
remote-repository-name: 'private-central-cla'
38+
create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
39+
signed-commit-message: 'For example: $contributorName has signed the CLA in $owner/$repo#$pullRequestNo'
40+
#custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
41+
#custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
42+
#custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.'
43+
#lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
44+
#use-dco-flag: true - If you are using DCO instead of CLA

0 commit comments

Comments
 (0)