Skip to content

Commit fd61e64

Browse files
codebotasaezper
authored andcommitted
Merge commit '6283228f474c1e85f126000ba07a4b6c3b2cd01e' into agpl_main
# Conflicts: # CMakeLists.txt # apps/examples/du/radio_factory.cpp # apps/examples/du/radio_factory.h # docs/srsRan_logo.png # include/srsran/gateways/baseband/baseband_gateway_buffer.h # include/srsran/rrc/drb_manager.h # lib/asn1/rrc_nr/tdd_cfg_helper.cpp # lib/cu_cp/helpers/f1ap_asn1_helpers.h # lib/f1ap/common/f1ap_packet_procedures_impl.h # lib/rrc/ue/drb_manager_impl.cpp # lib/rrc/ue/drb_manager_impl.h # lib/scheduler/support/rb_find_algorithm.h # lib/scheduler/ue_scheduling/ue_dci_builder.cpp # lib/scheduler/ue_scheduling/ue_dci_builder.h # lib/scheduler/ue_scheduling/ue_sch_pdu_builder.cpp # lib/scheduler/ue_scheduling/ue_sch_pdu_builder.h # tests/benchmarks/phy/upper/downlink_processor_benchmark.cpp # tests/unittests/e2/CMakeLists.txt # tests/unittests/phy/upper/channel_coding/ldpc/ldpc_rate_matcher_test_data.tar.gz # tests/unittests/phy/upper/channel_processors/pdcch_modulator_test_data.tar.gz # tests/unittests/phy/upper/channel_processors/pdcch_processor_test_data.tar.gz # tests/unittests/phy/upper/channel_processors/pdsch_processor_test_data.tar.gz # tests/unittests/phy/upper/channel_processors/pusch_processor_test_data.tar.gz # tests/unittests/phy/upper/signal_processors/dmrs_pdcch_processor_test_data.tar.gz # tests/unittests/rrc/drb_manager_test.cpp
2 parents 16cd388 + 6283228 commit fd61e64

File tree

977 files changed

+41118
-11802
lines changed

Some content is hidden

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

977 files changed

+41118
-11802
lines changed

.gitlab-ci.yml

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,30 @@
2525

2626
include:
2727
- project: softwareradiosystems/ci/tools
28-
ref: "5"
28+
ref: "6"
2929
file: .gitlab/ci-shared/setup/all.yml
3030
- project: softwareradiosystems/ci/tools
31-
ref: "5"
31+
ref: "6"
3232
file: .gitlab/ci-shared/features/all.yml
3333
- project: softwareradiosystems/ci/tools
34-
ref: "5"
34+
ref: "6"
3535
file: .gitlab/ci-shared/tools/python.yml
3636
- project: softwareradiosystems/ci/tools
37-
ref: "5"
37+
ref: "6"
3838
file: .gitlab/ci-shared/tools/test_reporter.yml
3939
- local: .gitlab/ci/build.yml
4040
- local: .gitlab/ci/trx.yml
4141
- local: .gitlab/ci/e2e.yml
42+
- local: .gitlab/ci/release.yml
4243

4344
stages:
4445
- ci
4546
- static
4647
- build and unit tests
4748
- e2e
4849
- documentation
50+
- private
51+
- public
4952

5053
variables:
5154
SLACK_CHANNEL_OK: "#ci_gnb"
@@ -122,39 +125,32 @@ full-code-format:
122125

123126
clang-tidy:
124127
extends: .codechecker
128+
resource_group: ${CI_JOB_NAME_SLUG}_${GITLAB_USER_LOGIN}
125129
variables:
126130
ANALYZER: clang-tidy
127131
ANALYZER_ARGS: --tidy-config .clang-tidy
128132

129133
cppcheck:
130134
extends: .codechecker
131135
rules:
132-
- if: $ON_MR
133-
when: manual
134-
allow_failure: true
135-
variables:
136-
ARTIFACT_EXTRA_PATH: "/index.html"
137136
- if: $CI_DESCRIPTION =~ /Nightly/
137+
interruptible: false
138138
variables:
139139
ANALYZER: cppcheck
140140
ANALYZER_ARGS: --cppcheck-max-template-recursion 10
141141

142142
clangsa:
143143
extends: .codechecker
144144
rules:
145-
- if: $ON_MR
146-
when: manual
147-
allow_failure: true
148-
variables:
149-
ARTIFACT_EXTRA_PATH: "/index.html"
150145
- if: $CI_DESCRIPTION =~ /Nightly/
151146
when: manual
152147
allow_failure: true
148+
interruptible: false
153149
variables:
154150
ANALYZER: clangsa
155151
ANALYZER_ARGS: --ctu
156152

157-
coverity:
153+
.coverity_base:
158154
image: $CR_REGISTRY_URI/coverity_image/2022.6.0:1.0.0
159155
stage: static
160156
needs: []
@@ -163,8 +159,7 @@ coverity:
163159
KUBERNETES_MEMORY_REQUEST: 13Gi
164160
tags:
165161
- ${INFRASTRUCTURE_TAG}
166-
rules:
167-
- if: $CI_DESCRIPTION =~ /Weekly/
162+
interruptible: false
168163
script:
169164
- |
170165
mkdir -p build
@@ -174,12 +169,30 @@ coverity:
174169
tar czvf srsgnb.tgz cov-int
175170
ver=$(git rev-parse HEAD)
176171
177-
curl --form token=$COVERITY_TOKEN \
172+
curl --form token=$COV_TOKEN \
178173
179174
180175
--form version=$ver \
181-
--form description="srsGNB dev build" \
182-
https://scan.coverity.com/builds?project=srsRAN_5G
176+
--form description="srsRAN Project dev build" \
177+
https://scan.coverity.com/builds?project=${PROJECT_NAME}
178+
179+
coverity-dev:
180+
extends: .coverity_base
181+
rules:
182+
- if: $CI_DESCRIPTION =~ /Weekly/
183+
before_script:
184+
- export PROJECT_NAME="srsRAN_5G"
185+
- export DESCRIPTION="srsRAN Project dev build"
186+
- export COV_TOKEN="${COVERITY_TOKEN_DEV}"
187+
188+
coverity-agpl:
189+
extends: .coverity_base
190+
rules:
191+
- if: $CI_DESCRIPTION =~ /AGPL-COVERITY/
192+
before_script:
193+
- export PROJECT_NAME="srsRAN_5G_agpl"
194+
- export DESCRIPTION="srsRAN Project AGPL build"
195+
- export COV_TOKEN="${COVERITY_TOKEN_AGPL}"
183196

184197
e2e tests tox:
185198
stage: static
@@ -340,6 +353,7 @@ promote code:
340353
stage: .post
341354
rules:
342355
- if: $GRADUATION_BRANCH
356+
interruptible: false
343357
variables:
344358
GIT_STRATEGY: none
345359
image: alpine:3.16.0 # sh entrypoint
@@ -375,6 +389,7 @@ disable current schedule:
375389
rules:
376390
- if: $GRADUATION_BRANCH
377391
when: always
392+
interruptible: false
378393
variables:
379394
ENABLE: "false"
380395
BRANCH: $CI_COMMIT_REF_NAME
@@ -386,6 +401,7 @@ enable schedule on graduation branch:
386401
extends: .enable-schedule-by-branch
387402
rules:
388403
- if: $GRADUATION_BRANCH
404+
interruptible: false
389405
variables:
390406
ENABLE: "true"
391407
BRANCH: $GRADUATION_BRANCH

.gitlab/ci/auto_merge.sh

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2021-2023 Software Radio Systems Limited
4+
#
5+
# By using this file, you agree to the terms and conditions set
6+
# forth in the LICENSE file which can be found at the top level of
7+
# the distribution.
8+
#
9+
10+
set -e
11+
12+
# Checks the git status and tries to `git rm` the files removed from
13+
# the source branch to the commit.
14+
rm_deleted_by_them() {
15+
delete_name="deleted by them:"
16+
delete_size_next=${#delete_name}+1
17+
lines=$(git status)
18+
while read -r line; do
19+
status=${line:0:${#delete_name}}
20+
21+
if [[ "$status" == "$delete_name" ]]; then
22+
path_name=${line:$delete_size_next:${#line}}
23+
git rm "$path_name"
24+
fi
25+
26+
done <<<"$lines"
27+
}
28+
29+
# Checks the git status and tries to `git rm` the files removed from
30+
# the target branch to the commit.
31+
rm_deleted_by_us() {
32+
delete_name="deleted by us:"
33+
delete_size_next=${#delete_name}+3
34+
lines=$(git status)
35+
while read -r line; do
36+
status=${line:0:${#delete_name}}
37+
38+
if [[ "$status" == "$delete_name" ]]; then
39+
path_name=${line:$delete_size_next:${#line}}
40+
git rm "$path_name"
41+
fi
42+
43+
done <<<"$lines"
44+
}
45+
46+
# Fixes the conflicts using theirs and adds them to the commit.
47+
fix_conflicts_using_theirs() {
48+
conflict_name="both modified:"
49+
conflict_size_next=${#conflict_name}+3
50+
lines=$(git status)
51+
while read -r line; do
52+
status=${line:0:${#conflict_name}}
53+
54+
if [[ "$status" == "$conflict_name" ]]; then
55+
path_name=${line:$conflict_size_next:${#line}}
56+
echo "Resolving using theirs $path_name"
57+
git checkout --theirs "$path_name"
58+
git add "$path_name"
59+
fi
60+
61+
done <<<"$lines"
62+
}
63+
64+
remove_lfs_files() {
65+
while read -r line; do
66+
git rm --cached "$line"
67+
done < <(git lfs ls-files | sed -r 's/^.{13}//')
68+
}
69+
70+
update_headers() {
71+
# for actual source and header files
72+
find . -type f \( -name "*.cpp" -o -name "*.h" -o -name "*.h.in" \) ! -path "*/external/*" ! -name "rfnoc_test.cc" -exec perl -0777 -pi -e "s{/\*.*?\*/}{/*
73+
*
74+
* Copyright 2021-$(date +%Y) Software Radio Systems Limited
75+
*
76+
* This file is part of srsRAN.
77+
*
78+
* srsRAN is free software: you can redistribute it and/or modify
79+
* it under the terms of the GNU Affero General Public License as
80+
* published by the Free Software Foundation, either version 3 of
81+
* the License, or (at your option) any later version.
82+
*
83+
* srsRAN is distributed in the hope that it will be useful,
84+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
85+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
86+
* GNU Affero General Public License for more details.
87+
*
88+
* A copy of the GNU Affero General Public License can be found in
89+
* the LICENSE file in the top-level directory of this distribution
90+
* and at http://www.gnu.org/licenses/.
91+
*
92+
*/}s" {} \;
93+
94+
# for CMake/YML files
95+
find . -type f -\( -name "CMakeLists.txt" -o -name "*.cmake" -o -name "*.yml" -o -name "*.sh" \) ! -path "*/configs/*" ! -path "*/.gitlab/*" ! -name "FindBackward.cmake" ! -name "FindRapidJSON.cmake" ! -name "CheckCSourceRuns.cmake" ! -name "CheckFunctionExistsMath.cmake" -exec perl -0777 -pi -e "s/#[^!][\s\S]*?(?=\n.*?=|\n\n)/#
96+
# Copyright 2021-$(date +%Y) Software Radio Systems Limited
97+
#
98+
# This file is part of srsRAN
99+
#
100+
# srsRAN is free software: you can redistribute it and\/or modify
101+
# it under the terms of the GNU Affero General Public License as
102+
# published by the Free Software Foundation, either version 3 of
103+
# the License, or (at your option) any later version.
104+
#
105+
# srsRAN is distributed in the hope that it will be useful,
106+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
107+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
108+
# GNU Affero General Public License for more details.
109+
#
110+
# A copy of the GNU Affero General Public License can be found in
111+
# the LICENSE file in the top-level directory of this distribution
112+
# and at http:\/\/www.gnu.org\/licenses\/.
113+
#/" {} \;
114+
}
115+
116+
main() {
117+
# Check number of args
118+
if (($# != 2)); then
119+
echo >&2 "Please call script with source branch and target branch as argument"
120+
echo >&2 "E.g. ./auto_merge.sh <source_branch> <target_branch>"
121+
exit 1
122+
fi
123+
124+
local source_branch=$1
125+
local target_branch=$2
126+
127+
# Checkout target branch
128+
git fetch -q origin "$target_branch"
129+
if ! git checkout -b "$target_branch" FETCH_HEAD; then
130+
echo "Error: Couldn't checkout ${target_branch}."
131+
exit 1
132+
fi
133+
134+
# Merge
135+
git fetch -q origin "$source_branch"
136+
if ! git merge "$source_branch"; then
137+
# Conflicts
138+
git status
139+
rm_deleted_by_us
140+
rm_deleted_by_them
141+
fix_conflicts_using_theirs
142+
git commit --no-edit
143+
fi
144+
145+
# Remove any remaining lfs files
146+
remove_lfs_files
147+
git commit -a --amend --no-edit
148+
149+
# Update headers
150+
update_headers
151+
git commit -a -m "Adding AGPL copyright to new files"
152+
153+
# Push
154+
git push origin "$target_branch"
155+
}
156+
157+
main "$@"

0 commit comments

Comments
 (0)