-
Notifications
You must be signed in to change notification settings - Fork 4
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
174 changed files
with
4,187 additions
and
15,137 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
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,45 @@ | ||
name: Build and Push | ||
|
||
# Run workflow on pushes to main branch or by manual dispatch | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
build-publish: | ||
runs-on: ubuntu-latest | ||
name: Build and publish modulo image | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build image | ||
run: | | ||
docker build . --file ./Dockerfile.development --tag dev-image | ||
docker build . --file ./Dockerfile.production --build-arg BASE_IMAGE=dev-image --tag modulo | ||
- name: Login to GitHub Container Registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin | ||
|
||
- name: Push latest image | ||
if: ${{ github.event_name != 'release' }} | ||
run: | | ||
IMAGE_NAME="${{ github.repository }}:latest" | ||
IMAGE_NAME="${IMAGE_NAME/_/-}" | ||
docker tag modulo ghcr.io/"${IMAGE_NAME}" | ||
docker push ghcr.io/"${IMAGE_NAME}" | ||
- name: Push tagged image | ||
if: ${{ github.event_name == 'release' }} | ||
run: | | ||
REF="${{ github.ref }}" | ||
TAG="${REF##*/}" | ||
IMAGE_NAME="${{ github.repository }}:${TAG}" | ||
IMAGE_NAME="${IMAGE_NAME/_/-}" | ||
docker tag modulo ghcr.io/"${IMAGE_NAME}" | ||
docker push ghcr.io/"${IMAGE_NAME}" |
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,4 +1,6 @@ | ||
**/*#* | ||
**/__pycache__/** | ||
**/.cache/** | ||
/source/lib/state_representation/build/* | ||
|
||
.idea | ||
cmake-build-* |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,7 @@ | ||
ARG ROS_VERSION=foxy | ||
FROM ghcr.io/aica-technology/ros2-control-libraries:${ROS_VERSION} | ||
|
||
WORKDIR ${HOME}/ros2_ws | ||
# copy sources and build ROS workspace with user permissions | ||
WORKDIR ${HOME}/ros2_ws/ | ||
COPY --chown=${USER} ./source/ ./src/ |
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,6 @@ | ||
ARG ROS_VERSION=foxy | ||
ARG BASE_IMAGE=epfl-lasa/modulo/development:${ROS_VERSION} | ||
FROM ${BASE_IMAGE} as remote-development | ||
|
||
# build modulo | ||
RUN su ${USER} -c /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash; colcon build" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.3.0 | ||
1.0.0 |
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,27 +1,44 @@ | ||
#!/bin/bash | ||
ROS_VERSION=foxy | ||
|
||
REBUILD=0 | ||
|
||
while getopts 'r' opt; do | ||
case $opt in | ||
r) REBUILD=1 ;; | ||
*) echo 'Error in command line parsing' >&2 | ||
exit 1 | ||
esac | ||
BUILD_PROD=false | ||
IMAGE_NAME=epfl-lasa/modulo | ||
|
||
HELP_MESSAGE="Usage: build.sh [-p] [-r] | ||
Options: | ||
-p, --production Build the production ready image on top of | ||
of the development one. | ||
-r, --rebuild Rebuild the image(s) using the docker | ||
--no-cache option | ||
" | ||
|
||
PARAM_BUILD_FLAGS=() | ||
while [[ $# -gt 0 ]]; do | ||
opt="$1" | ||
case $opt in | ||
-p|--production) BUILD_PROD=true ; shift ;; | ||
-r|--rebuild) PARAM_BUILD_FLAGS+=(--no-cache) ; shift ;; | ||
-h|--help) echo "${HELP_MESSAGE}" ; exit 0 ;; | ||
*) echo 'Error in command line parsing' >&2 | ||
echo -e "\n${HELP_MESSAGE}" | ||
exit 1 | ||
esac | ||
done | ||
shift "$(( OPTIND - 1 ))" | ||
|
||
NAME=$(echo "${PWD##*/}" | tr _ -) | ||
TAG="latest" | ||
|
||
if [ "$REBUILD" -eq 1 ]; then | ||
docker build \ | ||
--no-cache \ | ||
--build-arg ROS_VERSION="${ROS_VERSION}" \ | ||
-t "${NAME}:${TAG}" . | ||
else | ||
docker build \ | ||
--build-arg ROS_VERSION="${ROS_VERSION}" \ | ||
-t "${NAME}:${TAG}" . | ||
fi | ||
|
||
BUILD_FLAGS=() | ||
BUILD_FLAGS+=(--build-arg ROS_VERSION="${ROS_VERSION}") | ||
BUILD_FLAGS+=(-t "${IMAGE_NAME}/development":"${ROS_VERSION}") | ||
BUILD_FLAGS+=("${PARAM_BUILD_FLAGS[@]}") | ||
|
||
docker pull ghcr.io/aica-technology/ros2-control-libraries:"${ROS_VERSION}" | ||
DOCKER_BUILDKIT=1 docker build --file ./Dockerfile.development "${BUILD_FLAGS[@]}" . | ||
|
||
if [ $BUILD_PROD = true ]; then | ||
BUILD_FLAGS=() | ||
BUILD_FLAGS+=(--build-arg ROS_VERSION="${ROS_VERSION}") | ||
BUILD_FLAGS+=(-t "${IMAGE_NAME}":"${ROS_VERSION}") | ||
BUILD_FLAGS+=("${PARAM_BUILD_FLAGS[@]}") | ||
DOCKER_BUILDKIT=1 docker build --file ./Dockerfile.production "${BUILD_FLAGS[@]}" . | ||
fi |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.