2024-01-21 02:08:41 +00:00
|
|
|
# https://open5gs.org/open5gs/docs/guide/02-building-open5gs-from-sources/
|
2023-12-15 10:26:33 +00:00
|
|
|
variables:
|
|
|
|
GITLAB_SHARED_RUNNER: rubik
|
|
|
|
|
|
|
|
build-job:
|
|
|
|
tags:
|
|
|
|
- $GITLAB_SHARED_RUNNER
|
|
|
|
stage: build
|
|
|
|
script:
|
2023-12-15 10:31:31 +00:00
|
|
|
- echo "Hello, $GITLAB_USER_LOGIN! The runner with name rubik works fine, without any problems"
|
2023-12-15 10:26:33 +00:00
|
|
|
|
2024-01-21 02:08:41 +00:00
|
|
|
# Import the public key used by the package management system.
|
|
|
|
- apt update
|
|
|
|
|
|
|
|
#- cat /etc/os-release
|
|
|
|
- apt install gnupg
|
|
|
|
- curl -fsSL https://pgp.mongodb.com/server-7.0.asc | gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor
|
|
|
|
|
|
|
|
- touch /etc/apt/sources.list.d/mongodb-org-7.0.list # Create a /etc/apt/sources.list.d/mongodb-org-7.0.list file for MongoDB.
|
|
|
|
# On Debian (Bookworm)
|
|
|
|
- echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list
|
|
|
|
|
|
|
|
# Install the MongoDB packages
|
|
|
|
- apt update
|
|
|
|
- apt install -y mongodb-org
|
|
|
|
- apt install systemctl
|
|
|
|
- systemctl start mongod # (if '/usr/bin/mongod' is not running)
|
|
|
|
- systemctl enable mongod # (ensure to automatically start it on system boot)
|
|
|
|
|
|
|
|
# Install ip
|
|
|
|
- apt install -y iproute2
|
|
|
|
# fix RTNETLINK answers: Permission denied
|
|
|
|
- echo "net.ipv6.conf.all.disable_ipv6 = 0" | tee -a /etc/sysctl.conf
|
|
|
|
- echo "net.ipv6.conf.default.disable_ipv6 = 0" | tee -a /etc/sysctl.conf
|
|
|
|
- echo "net.ipv6.conf.lo.disable_ipv6 = 0" | tee -a /etc/sysctl.conf
|
|
|
|
- sysctl -p
|
|
|
|
|
|
|
|
# Create the TUN device with the interface name ogstun.
|
|
|
|
- ip tuntap add name ogstun mode tun
|
|
|
|
- ip addr add 10.45.0.1/16 dev ogstun
|
|
|
|
- ip addr add 2001:db8:cafe::1/48 dev ogstun
|
|
|
|
- ip link set ogstun up
|
|
|
|
|
|
|
|
# Install the dependencies for building the source code.
|
|
|
|
- apt install -y python3-pip python3-setuptools python3-wheel ninja-build build-essential flex bison git cmake libsctp-dev libgnutls28-dev libgcrypt-dev libssl-dev libidn11-dev libmongoc-dev libbson-dev libyaml-dev libnghttp2-dev libmicrohttpd-dev libcurl4-gnutls-dev libnghttp2-dev libtins-dev libtalloc-dev meson
|
|
|
|
|
|
|
|
# To compile with meson:
|
|
|
|
- cd $CI_PROJECT_DIR
|
|
|
|
- meson build --prefix=`pwd`/install
|
|
|
|
|
|
|
|
- ninja -C build
|
|
|
|
- ./build/tests/attach/attach ## EPC Only
|
|
|
|
- ./build/tests/registration/registration ## 5G Core Only
|
|
|
|
- cd build
|
|
|
|
- meson test -v
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- $CI_PROJECT_DIR/
|
|
|
|
|
2023-12-15 10:26:33 +00:00
|
|
|
test-job1:
|
|
|
|
tags:
|
|
|
|
- $GITLAB_SHARED_RUNNER
|
|
|
|
stage: test
|
|
|
|
script:
|
2023-12-15 10:31:31 +00:00
|
|
|
- echo "This job tests something. The runner with name rubik works fine, without any problems"
|
2023-12-15 10:26:33 +00:00
|
|
|
|
2024-01-21 02:08:41 +00:00
|
|
|
- cd $CI_PROJECT_DIR
|
|
|
|
# Check whether the compilation is correct.
|
|
|
|
- ./build/tests/attach/attach ## EPC Only
|
|
|
|
- ./build/tests/registration/registration ## 5G Core Only
|
|
|
|
- cd build
|
|
|
|
- meson test -v
|
|
|
|
|
2023-12-15 10:26:33 +00:00
|
|
|
job_small:
|
|
|
|
script:
|
2023-12-15 10:31:31 +00:00
|
|
|
- echo "this job runs on the default (small) Linux instance. This runner wors fine. Without any problems"
|