Skip to content

Commit

Permalink
Merge pull request #51 from sonia-auv/develop
Browse files Browse the repository at this point in the history
PFE release
  • Loading branch information
Kam0ss authored Nov 9, 2021
2 parents 5e8ee48 + 0301b0d commit c38eff4
Show file tree
Hide file tree
Showing 393 changed files with 14,696 additions and 23,251 deletions.
31 changes: 31 additions & 0 deletions .devcontainer/devcontainer-cpu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.128.0/containers/docker-existing-dockerfile
{
"name": "proc_image_processing_cpu",
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile.cuda' filename.
"dockerFile": "../../../Dockerfile",
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "bash"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-iot.vscode-ros"
],
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined",
"--rm",
"--network",
"host"
],
"mounts": [
"source=vscode-server-extension,target=/home/sonia/.vscode-server/extensions,type=volume"
],
"postAttachCommand": "bash -c 'source $ROS_WS_SETUP; roscore'",
"workspaceMount": "target=/home/sonia/ros_sonia_ws/src/proc_image_processing,type=volume",
"workspaceFolder": "/home/sonia/ros_sonia_ws/src/proc_image_processing"
}
32 changes: 32 additions & 0 deletions .devcontainer/devcontainer-gpu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.128.0/containers/docker-existing-dockerfile
{
"name": "proc_image_processing_gpu",
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile.cuda' filename.
"dockerFile": "../../../Dockerfile.cuda",
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "bash"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-iot.vscode-ros"
],
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined",
"--rm",
"--network",
"host",
"--gpus=all"
],
"mounts": [
"source=vscode-server-extension,target=/home/sonia/.vscode-server/extensions,type=volume"
],
"postAttachCommand": "bash -c 'source $ROS_WS_SETUP; roscore'",
"workspaceMount": "target=/home/sonia/ros_sonia_ws/src/proc_image_processing,type=volume",
"workspaceFolder": "/home/sonia/ros_sonia_ws/src/proc_image_processing"
}
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "proc_image_processing",
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile.cuda' filename.
"dockerFile": "../Dockerfile",
// Set *default* container specific settings.json values on container create.
"settings": {
Expand All @@ -25,6 +25,7 @@
"mounts": [
"source=vscode-server-extension,target=/home/sonia/.vscode-server/extensions,type=volume"
],
"postAttachCommand": "bash -c 'source $ROS_WS_SETUP; roscore'",
"workspaceMount": "target=/home/sonia/ros_sonia_ws/src/proc_image_processing,type=volume",
"workspaceFolder": "/home/sonia/ros_sonia_ws/src/proc_image_processing"
}
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
build
cmake-build-debug
.idea
.github
devel
docker-compose*
clion.env.vars
.env.example
.env
README.md
LICENSE
Dockerfile.sonarcloud
Dockerfile.clion
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
GITHUB_TOKEN=
SONAR_TOKEN=
BRANCH=master
CLION_SSH_PORT=2222
ROS_MASTER_URI=http://ros-master:11311
112 changes: 74 additions & 38 deletions .github/workflows/docker-image-perception-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,26 @@ jobs:
name: "Build ROS perception X86/64"
runs-on: ubuntu-latest
env:
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_common/sonia_common:x86-perception-latest"
BASE_IMAGE: "ghcr.io/sonia-auv/sonia_common/sonia_common:x86-perception-latest"
ARCH: x86
TARGET_TYPE: perception
TARGET_VERSION: develop
IMAGE_NAME: proc_image_processing
GITHUB_REMOTE_URL: docker.pkg.github.com/${{ github.repository }}
GITHUB_REMOTE_URL: ghcr.io/${{ github.repository }}
NODE_CONFIG_PATH: test/assets/config
steps:
- uses: actions/checkout@v2
- name: Login to Github Package Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build the docker image (perception based)
run: |
docker build . --tag build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} --build-arg BUILD_DATE=$(date '+%Y-%m-%d_%H:%M:%S') --build-arg VERSION=${GITHUB_REF##*/}-$(date ' +%Y-%m-%d_%H:%M:%S') --build-arg BASE_IMAGE=${BASE_IMAGE}
- name: Run Module Unit Test
run: |
docker run build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} catkin_make run_tests
docker run build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} catkin_make tests
docker run -e NODE_CONFIG_PATH=${NODE_CONFIG_PATH} build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} /bin/bash -c "catkin_make --use-ninja run_tests && catkin_test_results"
- name: Create Docker Image Tag
run: |
Expand All @@ -38,20 +39,23 @@ jobs:
docker push --all-tags ${GITHUB_REMOTE_URL}/${IMAGE_NAME}
build-ros-perception-arm64:
# TODO fix this typo (AMR -> ARM).
# CI is blocked when we try to fix this typo. Probably a settings in the repository that uses that typo as requirements...
name: "Build ROS perception AMR64"
runs-on: ubuntu-latest
env:
BASE_IMAGE: "docker.pkg.github.com/sonia-auv/sonia_common/sonia_common:arm64-perception-latest"
BASE_IMAGE: "ghcr.io/sonia-auv/sonia_common/sonia_common:arm64-perception-latest"
ARCH: arm64
TARGET_TYPE: perception
TARGET_VERSION: develop
IMAGE_NAME: proc_image_processing
GITHUB_REMOTE_URL: docker.pkg.github.com/${{ github.repository }}
GITHUB_REMOTE_URL: ghcr.io/${{ github.repository }}
NODE_CONFIG_PATH: test/assets/config
steps:
- uses: actions/checkout@v2
- name: Login to Github Package Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Enable Docker Daemon Experimental Features
run: |
sudo rm /etc/docker/daemon.json
Expand All @@ -69,11 +73,6 @@ jobs:
run: |
docker build . --tag build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} --build-arg BUILD_DATE=$(date '+%Y-%m-%d_%H:%M:%S') --build-arg VERSION=${GITHUB_REF##*/}-$(date ' +%Y-%m-%d_%H:%M:%S') --build-arg BASE_IMAGE=${BASE_IMAGE}
- name: Run Module Unit Test
run: |
docker run build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} catkin_make run_tests
docker run build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} catkin_make tests
- name: Create Docker Image Tag
run: |
docker tag build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} ${GITHUB_REMOTE_URL}/${IMAGE_NAME}:${ARCH}-${TARGET_TYPE}-${TARGET_VERSION}
Expand All @@ -82,32 +81,69 @@ jobs:
run: |
docker push --all-tags ${GITHUB_REMOTE_URL}/${IMAGE_NAME}
notify-success:
name: "Notify Slack - Success"
build-ros-perception-cuda-x86-64:
name: "Build ROS perception CUDA X86/64"
runs-on: ubuntu-latest
needs: [build-ros-perception-x86-64, build-ros-perception-arm64]
if: success()
env:
BASE_IMAGE: "ghcr.io/sonia-auv/sonia_common/sonia_common_cuda:x86-perception-latest"
ARCH: x86
TARGET_TYPE: perception
TARGET_VERSION: develop
IMAGE_NAME: proc_image_processing_cuda
GITHUB_REMOTE_URL: ghcr.io/${{ github.repository }}
steps:
- name: Notify Slack Success
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: github-ci-notifications
status: SUCCESS
color: good

notify-fail:
name: "Notify Slack - Failure"
- uses: actions/checkout@v2
- name: Login to Github Package Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build the docker image (perception based)
run: |
docker build . --tag build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} --build-arg BUILD_DATE=$(date '+%Y-%m-%d_%H:%M:%S') --build-arg VERSION=${GITHUB_REF##*/}-$(date ' +%Y-%m-%d_%H:%M:%S') --build-arg BASE_IMAGE=${BASE_IMAGE}
- name: Create Docker Image Tag
run: |
docker tag build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} ${GITHUB_REMOTE_URL}/${IMAGE_NAME}:${ARCH}-${TARGET_TYPE}-${TARGET_VERSION}-${GITHUB_REF##*/}
- name: Push Image to Github Packages Registry
run: |
docker push --all-tags ${GITHUB_REMOTE_URL}/${IMAGE_NAME}
build-ros-perception-cuda-arm64:
name: "Build ROS perception CUDA ARM64"
runs-on: ubuntu-latest
needs: [build-ros-perception-x86-64, build-ros-perception-arm64]
if: failure()
env:
BASE_IMAGE: "ghcr.io/sonia-auv/sonia_common/sonia_common_cuda:arm64-perception-latest"
ARCH: arm64
TARGET_TYPE: perception
TARGET_VERSION: develop
IMAGE_NAME: proc_image_processing_cuda
GITHUB_REMOTE_URL: ghcr.io/${{ github.repository }}
steps:
- name: Notify Slack Fail
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: github-ci-notifications
status: FAILED
color: danger
- uses: actions/checkout@v2
- name: Login to Github Package Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Enable Docker Daemon Experimental Features
run: |
sudo rm /etc/docker/daemon.json
echo '{"experimental": true , "cgroup-parent": "/actions_job" }' | sudo tee -a /etc/docker/daemon.json
sudo service docker restart
docker version
- name: Install QEMU to be able to compile on X86 into ARM64
run: |
sudo apt-get update
sudo apt-get install qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Build the docker image (perception based)
run: |
docker build . --tag build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} --build-arg BUILD_DATE=$(date '+%Y-%m-%d_%H:%M:%S') --build-arg VERSION=${GITHUB_REF##*/}-$(date ' +%Y-%m-%d_%H:%M:%S') --build-arg BASE_IMAGE=${BASE_IMAGE}
- name: Create Docker Image Tag
run: |
docker tag build-${TARGET_VERSION}-${GITHUB_REF##*/}-${GITHUB_RUN_NUMBER} ${GITHUB_REMOTE_URL}/${IMAGE_NAME}:${ARCH}-${TARGET_TYPE}-${TARGET_VERSION}
- name: Push Image to Github Packages Registry
run: |
docker push --all-tags ${GITHUB_REMOTE_URL}/${IMAGE_NAME}
Loading

0 comments on commit c38eff4

Please sign in to comment.