Skip to content

Commit

Permalink
Merge release/k900-xil branch into master (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
codygarver authored Jun 20, 2023
2 parents 537df8b + 63a7805 commit 4a23bac
Show file tree
Hide file tree
Showing 104 changed files with 2,353 additions and 1,318 deletions.
29 changes: 3 additions & 26 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
# Ignore VS Code project files for Docker build context
.vscode
# Ignore Dockerfiles for Docker build context
/intersection_model/Dockerfile
/message_services/Dockerfile
/scheduling_service/Dockerfile
/tsc_client_service/Dockerfile
/signal_opt_service/Dockerfile
**/Dockerfile
# Ignore any documentation for Docker build context
/docs
# Ignore any examples for Docker build context
Expand All @@ -20,28 +16,9 @@
# Ignore any testing scripts for Docker build context
/scripts
# Ignore all local build files for Docker build context
/kafka_clients/build
/scheduling_service/build
/message_services/build
/signal_opt_service/build
/intersection_model/build
/tsc_client_service/build
/scheduling_service/build
/streets_utils/streets_service_base/build
/streets_utils/streets_vehicle_list/build
/streets_utils/streets_vehicle_scheduler/build
/streets_utils/streets_api/intersection_client_api/build
/streets_utils/streets_api/intersection_server_api/build
/streets_utils/streets_signal_phase_and_timing/build
/streets_utils/streets_desired_phase_plan/build
/streets_utils/streets_signal_optimization/build
/streets_utils/streets_tsc_configuration/build
**/build/
# Ignore all local log files for Docker build context
/message_services/logs
/signal_opt_service/logs
/intersection_model/logs
/tsc_client_service/logs
/scheduling_service/logs
**/logs/
# Ignore local external cloned repos for Docker build context
/carma_lanelet2
/intersection_model/src/server/external/lib/pkgconfig/qhttpengine.pc
Expand Down
142 changes: 63 additions & 79 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
shell: bash
runs-on: ubuntu-latest-8-cores
container:
image: ubuntu:bionic-20210702
image: ubuntu:jammy-20230126
env:
DEBIAN_FRONTEND: noninteractive
INIT_ENV: "/home/carma-streets/.base-image/init-env.sh"
Expand All @@ -34,34 +34,25 @@ jobs:
run: mv $GITHUB_WORKSPACE/${{ github.event.repository.name }} /home/carma-streets
- name: Install dependencies
run: |
apt-get update
apt-get install -y cmake git build-essential libboost-all-dev curl unzip gcc-7 g++-7 autotools-dev automake jq qtbase5-dev qtbase5-dev-tools libqhttpengine-dev libssl-dev libpugixml-dev libgeographic-dev sqlite3 libsqlite3-dev python3-pip
pip3 install gcovr
mkdir /home/carma-streets/.base-image
touch /home/carma-streets/.base-image/init-env.sh
cd /home/carma-streets/build_scripts
./install_dependencies.sh
./install_test_dependencies.sh
mkdir -p /home/carma-streets/ext
- name: Install gtest
run: |
git clone --depth 1 https://github.com/google/googletest/ /home/carma-streets/ext/googletest
cd /home/carma-streets/ext/googletest/
cmake .
make -j
make install
./install_rest_server_dependencies.sh
- name: Install librdkafka
run: |
git clone --depth 1 https://github.com/edenhill/librdkafka /home/carma-streets/ext/librdkafka
cd /home/carma-streets/ext/
git clone --depth 1 https://github.com/confluentinc/librdkafka.git /home/carma-streets/ext/librdkafka
cd /home/carma-streets/ext/librdkafka/
./configure --prefix=/usr
make -j
make install
- name: Install spdlog
run: |
git clone --depth 1 https://github.com/gabime/spdlog.git /home/carma-streets/ext/spdlog
mkdir -p /home/carma-streets/ext/spdlog/build
cd /home/carma-streets/ext/spdlog/build
cmake ..
make -j
make install
cmake -H. -B_cmake_build
cmake --build _cmake_build
cmake --build _cmake_build --target install
- name: Install rapidjson
run: |
cd /home/carma-streets/ext/
git clone --depth 1 https://github.com/Tencent/rapidjson /home/carma-streets/ext/rapidjson
mkdir -p /home/carma-streets/ext/rapidjson/build
cd /home/carma-streets/ext/rapidjson/build
Expand All @@ -71,75 +62,67 @@ jobs:
- name: Install net-snmp
run: |
cd /home/carma-streets/ext/
apt-get install -y libperl-dev
apt-get install -y libperl-dev curl
curl -L -O http://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.1/net-snmp-5.9.1.tar.gz
tar -xvzf /home/carma-streets/ext/net-snmp-5.9.1.tar.gz
cd net-snmp-5.9.1/
./configure --with-default-snmp-version="1" --with-sys-contact="@@no.where" --with-sys-location="Unknown" --with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp"
make -j
make install
- name: Install qhttpengine
run: |
git clone --depth 1 https://github.com/etherealjoy/qhttpengine.git /home/carma-streets/ext/qhttpengine
mkdir -p /home/carma-streets/ext/qhttpengine/build
cd /home/carma-streets/ext/qhttpengine/build
cmake ..
make -j
make install
- name: Install PROJ for coordinate transformations
run: |
git clone --depth 1 https://github.com/OSGeo/PROJ.git /home/carma-streets/PROJ --branch 6.2.1
cd /home/carma-streets/PROJ
./autogen.sh
./configure
make -j
make install
- name: Download a cmake module for PROJ
run: |
cd /usr/share/cmake-3.10/Modules
curl -O https://raw.githubusercontent.com/mloskot/cmake-modules/master/modules/FindPROJ4.cmake
- name: Install ROS melodic
run: |
apt install -y lsb-release
sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc |apt-key add -
apt-get update
apt-get install -y ros-melodic-catkin
cd /opt/ros/melodic/
ls -a
mkdir -p /home/carma-streets/.base-image
echo "source /opt/ros/melodic/setup.bash" > "$INIT_ENV"
- name: Install carma_lanelet2
run: |
mkdir -p /home/carma-streets/carma_lanelet2/src
cd /home/carma-streets/carma_lanelet2/src
git init
echo "temp"
git remote add origin -f https://github.com/usdot-fhwa-stol/autoware.ai.git
git config core.sparsecheckout true
echo "common/hardcoded_params/*" >> .git/info/sparse-checkout
echo "common/lanelet2_extension/*" >> .git/info/sparse-checkout
echo "lanelet2/*" >> .git/info/sparse-checkout
echo "mrt_cmake_modules/*" >> .git/info/sparse-checkout
git pull --depth 1 origin refactor_lanelet2_extension
git checkout refactor_lanelet2_extension
rm -r lanelet2/lanelet2_python
rm -r lanelet2/lanelet2_examples
cd /home/carma-streets/carma_lanelet2
source /opt/ros/melodic/setup.bash
apt-get install -y libeigen3-dev python-rospkg
ROS_VERSION=1 LANELET2_EXTENSION_LOGGER_TYPE=1 catkin_make install
cd /home/carma-streets/carma_lanelet2/install/
ls -a
echo "source /home/carma-streets/carma_lanelet2/install/setup.bash" >> "$INIT_ENV"
# - name: Install PROJ for coordinate transformations
# run: |
# git clone --depth 1 https://github.com/OSGeo/PROJ.git /home/carma-streets/PROJ --branch 6.2.1
# cd /home/carma-streets/PROJ
# ./autogen.sh
# ./configure
# make -j
# make install
# - name: Download a cmake module for PROJ
# run: |
# cd /usr/share/cmake-3.10/Modules
# curl -O https://raw.githubusercontent.com/mloskot/cmake-modules/master/modules/FindPROJ4.cmake
# - name: Install ROS melodic
# run: |
# apt install -y lsb-release
# sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
# curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc |apt-key add -
# apt-get update
# apt-get install -y ros-melodic-catkin
# cd /opt/ros/melodic/
# ls -a
# mkdir -p /home/carma-streets/.base-image
# echo "source /opt/ros/melodic/setup.bash" > "$INIT_ENV"
# - name: Install carma_lanelet2
# run: |
# mkdir -p /home/carma-streets/carma_lanelet2/src
# cd /home/carma-streets/carma_lanelet2/src
# git init
# echo "temp"
# git remote add origin -f https://github.com/usdot-fhwa-stol/autoware.ai.git
# git config core.sparsecheckout true
# echo "common/hardcoded_params/*" >> .git/info/sparse-checkout
# echo "common/lanelet2_extension/*" >> .git/info/sparse-checkout
# echo "lanelet2/*" >> .git/info/sparse-checkout
# echo "mrt_cmake_modules/*" >> .git/info/sparse-checkout
# git pull --depth 1 origin refactor_lanelet2_extension
# git checkout refactor_lanelet2_extension
# rm -r lanelet2/lanelet2_python
# rm -r lanelet2/lanelet2_examples
# cd /home/carma-streets/carma_lanelet2
# source /opt/ros/melodic/setup.bash
# apt-get install -y libeigen3-dev python-rospkg
# ROS_VERSION=1 LANELET2_EXTENSION_LOGGER_TYPE=1 catkin_make install
# cd /home/carma-streets/carma_lanelet2/install/
# ls -a
# echo "source /home/carma-streets/carma_lanelet2/install/setup.bash" >> "$INIT_ENV"
- name: Install Sonar
run: |
SONAR_DIR=/opt/sonarqube
mkdir $SONAR_DIR
curl -o $SONAR_DIR/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux.zip
curl -o $SONAR_DIR/build-wrapper.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
curl -sL https://deb.nodesource.com/setup_16.x |bash -
apt-get install -y nodejs
apt-get install -y nodejs unzip
cd $SONAR_DIR
for ZIP in *.zip; do
unzip "$ZIP" -d .
Expand All @@ -157,6 +140,7 @@ jobs:
- name: Tests
run: |
cd /home/carma-streets/
ldconfig
./coverage.sh
- name: Archive test results
uses: actions/upload-artifact@v3
Expand Down
17 changes: 2 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
# Cache objects
packer_cache/
# build directories
message_services/build/
kafka_clients/build/
scheduling_service/build/
streets_utils/streets_service_base/build/
streets_utils/streets_vehicle_list/build/
streets_utils/streets_vehicle_scheduler/build/
streets_utils/streets_signal_phase_and_timing/build/
streets_utils/streets_api/intersection_client_api/build/
streets_utils/streets_api/intersection_server_api/build/
streets_utils/streets_desired_phase_plan/build/
streets_utils/streets_tsc_configuration/build/
streets_utils/streets_signal_optimization/build/
intersection_model/build
signal_opt_service/build/
tsc_client_service/build
**/build/
**/logs/
# Crash log
crash.log
.env
Expand Down
31 changes: 19 additions & 12 deletions .sonarqube/sonar-scanner.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ sonar.organization=usdot-fhwa-stol
sonar.cfamily.build-wrapper-output=/home/carma-streets/bw-output
sonar.cfamily.cache.enabled=false
sonar.coverageReportPaths= /home/carma-streets/kafka_clients/coverage/coverage.xml, \
/home/carma-streets/intersection_model/coverage/coverage.xml, \
/home/carma-streets/scheduling_service/coverage/coverage.xml, \
/home/carma-streets/signal_opt_service/coverage/coverage.xml, \
/home/carma-streets/message_services/coverage/coverage.xml, \
/home/carma-streets/streets_utils/streets_service_configuration/coverage/coverage.xml, \
/home/carma-streets/streets_utils/streets_service_base/coverage/coverage.xml, \
/home/carma-streets/streets_utils/streets_vehicle_list/coverage/coverage.xml, \
/home/carma-streets/streets_utils/streets_signal_phase_and_timing/coverage/coverage.xml, \
Expand All @@ -35,6 +34,9 @@ sonar.coverageReportPaths= /home/carma-streets/kafka_clients/coverage/coverage.x
/home/carma-streets/streets_utils/streets_desired_phase_plan/coverage/coverage.xml, \
/home/carma-streets/streets_utils/streets_signal_optimization/coverage/coverage.xml

# TODO : /home/carma-streets/intersection_model/coverage/coverage.xml, \
# TODO: /home/carma-streets/message_services/coverage/coverage.xml, \

#Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

Expand All @@ -59,9 +61,8 @@ sonar.projectVersion=1.0
# Modules starting with Java packages then C++ packages
sonar.modules=scheduling_service, \
kafka_clients, \
message_services, \
signal_opt_service, \
intersection_model, \
streets_service_configuration, \
streets_service_base, \
streets_vehicle_list, \
streets_signal_phase_and_timing, \
Expand All @@ -71,12 +72,15 @@ streets_vehicle_scheduler, \
streets_desired_phase_plan, \
streets_signal_optimization

# TODO message_services
# TODO intersection_model

kafka_clients.sonar.projectBaseDir=/home/carma-streets/kafka_clients/
scheduling_service.sonar.projectBaseDir=/home/carma-streets/scheduling_service
message_services.sonar.projectBaseDir=/home/carma-streets/message_services/
# message_services.sonar.projectBaseDir=/home/carma-streets/message_services/
signal_opt_service.sonar.projectBaseDir=/home/carma-streets/signal_opt_service/
intersection_model.sonar.projectBaseDir=/home/carma-streets/intersection_model/
# intersection_model.sonar.projectBaseDir=/home/carma-streets/intersection_model/
streets_service_configuration.sonar.projectBaseDir=/home/carma-streets/streets_utils/streets_service_configuration
streets_service_base.sonar.projectBaseDir=/home/carma-streets/streets_utils/streets_service_base
streets_vehicle_list.sonar.projectBaseDir=/home/carma-streets/streets_utils/streets_vehicle_list
tsc_client_service.sonar.projectBaseDir=/home/carma-streets/tsc_client_service
Expand All @@ -94,14 +98,16 @@ kafka_clients.sonar.sources =src/,include/
kafka_clients.sonar.exclusions =test/**
scheduling_service.sonar.sources =src/,include/
scheduling_service.sonar.exclusions =test/**
message_services.sonar.sources =src/,include/,lib/
message_services.sonar.exclusions =test/**
# message_services.sonar.sources =src/,include/,lib/
# message_services.sonar.exclusions =test/**
signal_opt_service.sonar.sources =src/,include/
signal_opt_service.sonar.exclusions =test/**
intersection_model.sonar.sources =src/,include/
intersection_model.sonar.exclusions =src/server/**,test/**
# intersection_model.sonar.sources =src/,include/
# intersection_model.sonar.exclusions =src/server/**,test/**
streets_service_base.sonar.sources =src/,include/
streets_service_base.sonar.exclusions =test/**
streets_service_configuration.sonar.sources =src/,include/
streets_service_configuration.sonar.exclusions =test/**
streets_vehicle_list.sonar.sources =src/,include/
streets_vehicle_list.sonar.exclusions =test/**
tsc_client_service.sonar.sources =src/,include/
Expand All @@ -122,9 +128,10 @@ streets_signal_optimization.sonar.exclusions =test/**
# Note: For C++ setting this field does not cause test analysis to occur. It only allows the test source code to be evaluated.
kafka_clients.sonar.tests=test/
scheduling_service.sonar.tests=test/
message_services.sonar.tests=test/
# message_services.sonar.tests=test/
signal_opt_service.sonar.tests=test/
intersection_model.sonar.tests=test/
# intersection_model.sonar.tests=test/
streets_service_configuration.sonar.tests=test/
streets_service_base.sonar.tests=test/
streets_vehicle_list.sonar.tests=test/
tsc_client_service.sonar.tests=test/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| CicleCI Build Status | Sonar Code Quality |
| CI Build Status | Sonar Code Quality |
|----------------------|---------------------|
|[![CircleCI](https://circleci.com/gh/usdot-fhwa-stol/carma-streets.svg?style=svg)](https://circleci.com/gh/usdot-fhwa-stol/carma-streets) | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=usdot-fhwa-stol_carma-streets&metric=alert_status)](https://sonarcloud.io/dashboard?id=usdot-fhwa-stol_carma-streets) |
|[![CI](https://github.com/usdot-fhwa-stol/carma-streets/actions/workflows/ci.yml/badge.svg)](https://github.com/usdot-fhwa-stol/carma-streets/actions/workflows/ci.yml) | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=usdot-fhwa-stol_carma-streets&metric=alert_status)](https://sonarcloud.io/dashboard?id=usdot-fhwa-stol_carma-streets) |
# DockerHub Release Builds
| Scheduling Service | Message Services | Intersection Model | Signal Opt Service | Tsc Service |
|-----|-----|-----|-----|-----|
Expand Down
7 changes: 4 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ COVERAGE_FLAGS="-g --coverage -fprofile-arcs -ftest-coverage"

# make install for these subdirectories
MAKE_INSTALL_DIRS=(
"streets_utils/streets_service_configuration"
"kafka_clients"
"streets_utils/streets_service_base"
"streets_utils/streets_vehicle_list"
"streets_utils/streets_tsc_configuration"
Expand All @@ -29,15 +31,14 @@ MAKE_INSTALL_DIRS=(
"streets_utils/streets_api/intersection_client_api"
"streets_utils/streets_vehicle_scheduler"
"streets_utils/streets_api/intersection_server_api"
"kafka_clients"
"streets_utils/streets_signal_optimization"
)

# only make for these subdirectories
MAKE_ONLY_DIRS=(
"scheduling_service"
"intersection_model"
"message_services"
# "intersection_model"
# "message_services"
"signal_opt_service"
"tsc_client_service"
)
Expand Down
Loading

0 comments on commit 4a23bac

Please sign in to comment.