Skip to content

Commit

Permalink
Merge pull request #350 from MissouriMRDT/topic/#342
Browse files Browse the repository at this point in the history
🦃 Development Dish Added to the Feast! 🍂

This branch has been added to the development platter, ready to simmer and spice up the codebase:

🍠 Stuffed with fresh features.
🥧 Baked in a warm oven of collaboration.
🧹 Swept up conflicts like fall leaves.
Let’s keep this cooking until it’s ready for the production table! 🍽️
Happy Devsgiving! 🎉
  • Loading branch information
ClayJay3 authored Nov 28, 2024
2 parents 6fb3ea8 + dc269c6 commit 60bbc38
Show file tree
Hide file tree
Showing 36 changed files with 1,934 additions and 163 deletions.
22 changes: 17 additions & 5 deletions .devcontainer/Dockerfile_Jammy
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ RUN apt update && apt install -y curl && \
# Install Required Ubuntu Packages
RUN apt-get update && apt-get install --no-install-recommends -y iputils-ping \
build-essential gdb wget less udev zstd sudo libgomp1 libswscale-dev \
cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev tzdata \
cmake git libgtk2.0-dev pkg-config libx264-dev libdrm-dev ssh \
libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev tzdata net-tools \
yasm libatlas-base-dev gfortran libpq-dev libavutil-dev libpostproc-dev \
yasm libatlas-base-dev gfortran libpq-dev libpostproc-dev \
libxine2-dev libglew-dev libtiff5-dev zlib1g-dev cowsay lolcat locales usbutils \
libeigen3-dev python3-dev python3-pip python3-numpy libx11-dev xauth libssl-dev \
libboost-all-dev valgrind doxygen graphviz htop nano fortune fortunes \
vim-common gasket-dkms
valgrind doxygen graphviz htop nano fortune fortunes \
vim-common gasket-dkms nlohmann-json3-dev gcovr lcov

# Nice to have
RUN apt-get update && apt-get install --no-install-recommends -y bat \
Expand Down Expand Up @@ -115,6 +115,18 @@ RUN wget -q https://github.com/MissouriMRDT/Autonomy_Packages/raw/main/geolib/am
dpkg -i geolib_${GEOLIB_VERSION}_amd64.deb && \
rm geolib_${GEOLIB_VERSION}_amd64.deb

# Install FFMPEG
ARG FFMPEG_VERSION="7.1"
RUN wget -q https://github.com/MissouriMRDT/Autonomy_Packages/raw/main/ffmpeg/amd64/ffmpeg_${FFMPEG_VERSION}_amd64.deb && \
dpkg -i ffmpeg_${FFMPEG_VERSION}_amd64.deb && \
rm ffmpeg_${FFMPEG_VERSION}_amd64.deb

# Install Libdatachannel
ARG LIBDATACHANNEL_VERSION="0.22"
RUN wget -q https://github.com/MissouriMRDT/Autonomy_Packages/raw/main/libdatachannel/amd64/libdatachannel_${LIBDATACHANNEL_VERSION}_amd64.deb && \
dpkg -i libdatachannel_${LIBDATACHANNEL_VERSION}_amd64.deb && \
rm libdatachannel_${LIBDATACHANNEL_VERSION}_amd64.deb

# Install Tensorflow.
ARG TENSORFLOW_VERSION="2.15.0"
RUN wget -q https://github.com/MissouriMRDT/Autonomy_Packages/raw/main/tensorflow/amd64/tensorflow_${TENSORFLOW_VERSION}_amd64.deb && \
Expand Down Expand Up @@ -143,7 +155,7 @@ ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

# Enable Cowsay.
RUN echo 'if [ $(( RANDOM % 5 )) -eq 0 ]; then /workspaces/Autonomy_Software/data/Spinning_Donut/donut; else /usr/games/fortune | /usr/games/cowsay -f `ls /workspaces/Autonomy_Software/data/Cowsay_Cows/*.cow | shuf -n 1` | /usr/games/lolcat -f; fi' >> /root/.bashrc
RUN echo 'if [ $(( RANDOM % 10000 )) -eq 0 ]; then /workspaces/Autonomy_Software/data/Spinning_Donut/donut; else /usr/games/fortune | /usr/games/cowsay -f `ls /workspaces/Autonomy_Software/data/Cowsay_Cows/*.cow | shuf -n 1` | /usr/games/lolcat -f; fi' >> /root/.bashrc

# Clone Autonomy Software Repository
RUN git clone --recurse-submodules -j8 https://github.com/MissouriMRDT/Autonomy_Software.git
Expand Down
18 changes: 16 additions & 2 deletions .devcontainer/Dockerfile_JetPack
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ ENV LOGNAME root
# Set L4T Version
RUN echo "# R${L4T_MAJOR} (release), REVISION: ${L4T_MINOR}.${L4T_PATCH}" > /etc/nv_tegra_release

# Clean APT Cache
RUN rm /var/lib/dpkg/info/libc-bin.*
# Add APT Repo for PCIe drivers and Bazel.
RUN apt update && apt install -y curl && \
echo "deb https://packages.cloud.google.com/apt coral-edgetpu-stable main" | tee /etc/apt/sources.list.d/coral-edgetpu.list && \
Expand All @@ -30,14 +32,14 @@ RUN apt update && apt install -y curl && \
# Install Required Ubuntu Packages
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential gfortran cmake git gdb file tar libatlas-base-dev apt-transport-https iputils-ping \
libavcodec-dev libavformat-dev libswresample-dev libcanberra-gtk3-module zstd wget less \
libswresample-dev libcanberra-gtk3-module zstd wget less libx264-dev libdrm-dev \
libeigen3-dev libglew-dev libgstreamer-plugins-base1.0-dev udev net-tools \
libgstreamer-plugins-good1.0-dev libgstreamer1.0-dev libgtk-3-dev libjpeg-dev sudo usbutils \
libjpeg8-dev libjpeg-turbo8-dev liblapack-dev liblapacke-dev libopenblas-dev libpng-dev tzdata \
libpostproc-dev libswscale-dev libtbb-dev libtbb2 libtesseract-dev libtiff-dev libv4l-dev \
libxine2-dev libxvidcore-dev libx264-dev libgtkglext1 libgtkglext1-dev pkg-config qv4l2 \
v4l-utils zlib1g-dev python3-dev libboost-all-dev valgrind doxygen graphviz nano \
vim-common libedgetpu1-std gasket-dkms ca-certificates
vim-common libedgetpu1-std gasket-dkms ca-certificates nlohmann-json3-dev libavformat-dev

# Nice to have
RUN apt-get update && apt-get install --no-install-recommends -y bat \
Expand Down Expand Up @@ -104,6 +106,18 @@ RUN wget -q https://github.com/MissouriMRDT/Autonomy_Packages/raw/main/geolib/ar
dpkg -i geolib_${GEOLIB_VERSION}_arm64.deb && \
rm geolib_${GEOLIB_VERSION}_arm64.deb

# Install FFMPEG
ARG FFMPEG_VERSION="7.1"
RUN wget -q https://github.com/MissouriMRDT/Autonomy_Packages/raw/main/ffmpeg/arm64/ffmpeg_${FFMPEG_VERSION}_arm64.deb && \
dpkg -i ffmpeg_${FFMPEG_VERSION}_arm64.deb && \
rm ffmpeg_${FFMPEG_VERSION}_arm64.deb

# Install Libdatachannel
ARG LIBDATACHANNEL_VERSION="0.22"
RUN wget -q https://github.com/MissouriMRDT/Autonomy_Packages/raw/main/libdatachannel/arm64/libdatachannel_${LIBDATACHANNEL_VERSION}_arm64.deb && \
dpkg -i libdatachannel_${LIBDATACHANNEL_VERSION}_arm64.deb && \
rm libdatachannel_${LIBDATACHANNEL_VERSION}_arm64.deb

# Install Tensorflow.
ARG TENSORFLOW_VERSION="2.15.0"
RUN wget -q https://github.com/MissouriMRDT/Autonomy_Packages/raw/main/tensorflow/arm64/tensorflow_${TENSORFLOW_VERSION}_arm64.deb && \
Expand Down
45 changes: 39 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@
"source=${localWorkspaceFolder}/data/calibrations/zed,target=/usr/local/zed/settings,type=bind,consistency=delegated",
"type=bind,readonly,source=/etc/localtime,target=/etc/localtime"
],
"image": "ghcr.io/missourimrdt/autonomy-jammy:latest",
"image": "ghcr.io/missourimrdt/autonomy-jammy:2024-11-27-23-04-01",
// "image": "ghcr.io/missourimrdt/autonomy-jetpack:latest",
// "build": {
// "dockerfile": "Dockerfile_Jammy"
// // "dockerfile": "Dockerfile_Jammy"
// // "dockerfile": "Dockerfile_JetPack"
// },
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postStartCommand": "git config --global --add safe.directory \"*\"",
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}",
"postCreateCommand": "echo 'Welcome to the Mars Rover Design Team, Autonomy Software Development Environment!'",
// Configure tool-specific properties.
"customizations": {
Expand All @@ -63,6 +63,7 @@
"gruntfuggly.todo-tree",
"streetsidesoftware.code-spell-checker",
"vscode-icons-team.vscode-icons",
"ryanluker.vscode-coverage-gutters"
],
"settings": {
// VSCode settings.
Expand Down Expand Up @@ -101,6 +102,22 @@
"/usr/local/cuda/include",
"/usr/local/include/quill",
"/usr/local/include/quill/**",
"/usr/local/include/rtc",
"/usr/local/include/rtc/**",
"/usr/local/include/libavcodec",
"/usr/local/include/libavcodec/**",
"/usr/local/include/libavformat",
"/usr/local/include/libavformat/**",
"/usr/local/include/libavutil",
"/usr/local/include/libavutil/**",
"/usr/local/include/libswscale",
"/usr/local/include/libswscale/**",
"/usr/local/include/libswresample",
"/usr/local/include/libswresample/**",
"/usr/local/include/libavfilter",
"/usr/local/include/libavfilter/**",
"/usr/local/include/libavdevice",
"/usr/local/include/libavdevice/**",
"/usr/local/include/gmock",
"/usr/local/include/gmock/**",
"/usr/local/include/gtest",
Expand All @@ -112,7 +129,9 @@
"/usr/local/include/edgetpu",
"/usr/local/include/edgetpu/**",
"/usr/include/torch",
"/usr/include/torch/**"
"/usr/include/torch/**",
"/usr/include/nlohmann",
"/usr/include/nlohmann/**"
],
"C_Cpp.default.defines": [
"__ROVECOMM_LIBRARY_MODE__=1"
Expand Down Expand Up @@ -282,8 +301,22 @@
},
"custom": true, // Enable the `custom` dictionary
"internal-terms": false // Disable the `internal-terms` dictionary
}
},
// Coverage Gutters Extension Settings.
"coverage-gutters.coverageFileNames": [
"lcov.info",
"cov.xml",
"coverage.xml",
"cobertura.xml",
"jacoco.xml",
"coverage.cobertura.xml",
"Coverage.xml",
"coverage.info"
],
"coverage-gutters.customizable.status-bar-toggler-watchCoverageAndVisibleEditors-enabled": true,
"coverage-gutters.showLineCoverage": true,
"coverage-gutters.showRulerCoverage": true
}
}
}
}
}
154 changes: 77 additions & 77 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,96 +1,96 @@
name: Code Coverage

on:
pull_request:
branches: ["development"]
pull_request:
branches: ["development"]

push:
branches: ["development"]
push:
branches: ["development"]

workflow_dispatch:
workflow_dispatch:

concurrency:
group: "coverage"
cancel-in-progress: false
group: "coverage"
cancel-in-progress: false

jobs:
analyze-code-coverage:
runs-on: [self-hosted, linux, X64]
analyze-code-coverage:
runs-on: [self-hosted, linux, X64]

steps:
- name: Setup Action Environment
if: always()
run: |
cd /opt
if [ ! -d "Autonomy_Software" ]; then git clone --recurse-submodules -j8 https://github.com/MissouriMRDT/Autonomy_Software.git; fi
steps:
- name: Setup Action Environment
if: always()
run: |
cd /opt
if [ ! -d "Autonomy_Software" ]; then git clone --recurse-submodules -j8 https://github.com/MissouriMRDT/Autonomy_Software.git; fi
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ github.event.pull_request.head.sha }}

- name: Fix Dubious Ownership
run: git config --global --add safe.directory /opt/Autonomy_Software
- name: Fix Dubious Ownership
run: git config --global --add safe.directory /opt/Autonomy_Software

- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- name: Update Branch
run: |
cd /opt/Autonomy_Software/
git fetch --force --recurse-submodules
branch=${{ steps.extract_branch.outputs.branch }}
echo ${{ github.event.pull_request.head.sha }}
git reset --hard ${{ github.event.pull_request.head.sha }}
git checkout ${{ github.event.pull_request.head.sha }}
# git pull --ff-only
git submodule update --force --recursive --init
git config --global --add safe.directory /opt/Autonomy_Software/external
- name: Update Branch
run: |
cd /opt/Autonomy_Software/
git fetch --force --recurse-submodules
branch=${{ steps.extract_branch.outputs.branch }}
echo ${{ github.event.pull_request.head.sha }}
git reset --hard ${{ github.event.pull_request.head.sha }}
git checkout ${{ github.event.pull_request.head.sha }}
# git pull --ff-only
git submodule update --force --recursive --init
git config --global --add safe.directory /opt/Autonomy_Software/external
- name: Configure and Build
run: |
cd /opt/Autonomy_Software/
if [ -d "build" ]; then rm -Rf build; fi
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS_MODE=ON -DBUILD_CODE_COVERAGE=ON -DBUILD_VERBOSE_MODE=ON
make -j8
- name: Configure and Build
run: |
cd /opt/Autonomy_Software/
if [ -d "build" ]; then rm -Rf build; fi
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS_MODE=ON -DBUILD_CODE_COVERAGE=ON -DBUILD_VERBOSE_MODE=ON
make -j8
- name: Test
run: |
cd /opt/Autonomy_Software/build
ctest --output-on-failure -T Test -T Coverage
ctest --output-on-failure --output-junit Test.xml
gcovr --root . --xml-pretty --output Coverage.xml
lcov -c -d . -o coverage.info
- name: Test
run: |
cd /opt/Autonomy_Software/build
ctest --output-on-failure -T Test -T Coverage
ctest --output-on-failure --output-junit Test.xml
gcovr --root .. --xml-pretty --output Coverage.xml
lcov -c -d . -o coverage.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
root_dir: /opt/Autonomy_Software
working-directory: /opt/Autonomy_Software
verbose: true
plugin: gcov
directory: /opt/Autonomy_Software/build
file: /opt/Autonomy_Software/build/Coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
root_dir: /opt/Autonomy_Software
working-directory: /opt/Autonomy_Software
verbose: true
plugin: gcov
directory: /opt/Autonomy_Software/build
file: /opt/Autonomy_Software/build/Coverage.xml

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
root_dir: /opt/Autonomy_Software
working-directory: /opt/Autonomy_Software/build
verbose: true
directory: /opt/Autonomy_Software/build/
file: Test.xml
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
root_dir: /opt/Autonomy_Software
working-directory: /opt/Autonomy_Software/build
verbose: true
directory: /opt/Autonomy_Software/build/
file: Test.xml

- name: Cleanup Action Environment
if: always()
run: |
cd /opt
rm -rf /opt/Autonomy_Software
- name: Cleanup Action Environment
if: always()
run: |
cd /opt
rm -rf /opt/Autonomy_Software
Loading

0 comments on commit 60bbc38

Please sign in to comment.