-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
172 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- integration | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
ci: | ||
name: CI | ||
runs-on: ubuntu-latest | ||
container: | ||
image: umrover1/ros:latest | ||
# GitHub is silly and requires us to be running as root for their checkout action | ||
# Our docker container exports the user mrover, so we have to specific this explicitly | ||
options: --user root | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
lfs: "true" | ||
# This makes sure that $GITHUB_WORKSPACE is the catkin workspace path | ||
path: "src/mrover" | ||
- name: Style Check | ||
run: . /home/mrover/ros2_ws/src/mrover/venv/bin/activate && cd $GITHUB_WORKSPACE/src/mrover/ && ./style.sh | ||
- name: Build | ||
if: github.event.pull_request.draft == false && github.event.pull_request.base.ref != 'refs/heads/master' | ||
run: . /opt/ros/humble/setup.sh && . /home/mrover/ros2_ws/src/mrover/venv/bin/activate && ./build.sh | ||
# - name: Test | ||
# if: github.event.pull_request.draft == false | ||
# run: . /opt/ros/noetic/setup.sh && . /home/mrover/ros2_ws/src/mrover/venv/bin/activate && . $GITHUB_WORKSPACE/devel/setup.sh && catkin test && rostest mrover integration.test --text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,22 @@ | ||
# ROS2 build directories | ||
/build/ | ||
/install/ | ||
/log/ | ||
|
||
__pycache__/ | ||
# Common IDE's, ideally this should be in global gitignore per user | ||
.vscode/ | ||
.idea/ | ||
|
||
# clangd cache | ||
.cache/ | ||
|
||
# IMGUI window layout | ||
imgui.ini | ||
|
||
# Python Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
.mypy_cache/ | ||
*.egg-info/ | ||
venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM ubuntu:jammy | ||
|
||
# DEBIAN_FRONTEND=noninteractive prevents apt from asking for user input | ||
# software-properties-common is needed for apt-add-repository | ||
# sudo is needed for ansible since it escalates from a normal user to root | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update -y && apt-get install software-properties-common sudo -y | ||
RUN apt-add-repository ppa:ansible/ansible -y && apt-get install -y git git-lfs ansible | ||
|
||
RUN useradd --create-home --groups sudo --shell /bin/zsh mrover | ||
# Give mrover user sudo access with no password | ||
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | ||
|
||
USER mrover | ||
RUN mkdir -p /home/mrover/ros2_ws/src/mrover | ||
WORKDIR /home/mrover/ros2_ws/src/mrover | ||
# Defines the APT packages that need to be installed | ||
# rosdep is called from Ansible to install them | ||
ADD --chown=mrover:mrover ./package.xml . | ||
# Defines the Python packages that need to be installed | ||
# pip is called from Ansible to install them | ||
ADD --chown=mrover:mrover ./pyproject.toml . | ||
ADD --chown=mrover:mrover ./README.md . | ||
# Copy over all Ansible files | ||
ADD --chown=mrover:mrover ./ansible ./ansible | ||
ADD --chown=mrover:mrover ./ansible.sh . | ||
ADD --chown=mrover:mrover ./pkg ./pkg | ||
RUN ./ansible.sh ci.yml | ||
|
||
USER root | ||
RUN apt-get purge ansible -y && apt-get autoremove -y | ||
# Remove apt cache to free up space in the image | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
USER mrover | ||
ENTRYPOINT [ "/bin/bash" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters