Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: changed externals output arcive diretory permissions to docke… #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ test: set_env ## run libadore unit tests
build_external: ## builds all libadore external libraries
cd "${ROOT_DIR}/libadore/external/" && make

.PHONY: clean_external_cache
clean_external_cache: ## clean all libadore external library cache located in /var/tmp. Note: This is never done automatically and must be manually invoked.
cd "${ROOT_DIR}/libadore/external/" && make clean_cache

.PHONY: clean_external
clean_external: ## clean all libadore external libraries
cd "${ROOT_DIR}/libadore/external/" && make clean
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,15 @@ you would like to build in the `.gitmodules` file.
> by modifying the `.gitmodules` and invoking 'git submodue update --init'.

> **ℹ️ INFO:**
> By default external libraries are not built. They are sourced as pre-compiled
> docker images from docker.io.
> By default external libraries are not built. They are sourced first from local
> cache in /var/tmp/docker and seconds as pre-compiled docker images from docker.io.

The external libraries cache is not deleted or cleaned automatically. In order
to clean the external libriary cache located in `/var/tmp/docker` invoke the
provided target:
```bash
make clean_external_cache
```

## License
The source code and the accompanying material is licensed under the terms of the [EPL v2](https://www.eclipse.org/legal/epl-2.0/).
Expand Down
4 changes: 4 additions & 0 deletions libadore.mk
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ test_libadore: ## run libadore unit tests
clean_libadore: ## Clean libadore build artifacts
cd "${LIBADORE_MAKEFILE_PATH}" && make clean

.PHONY: clean_external_library_cache
clean_external_library_cache: ## Clean/delete libadore system wide cache in /var/tmp/docker. Note: this is never done automatically and must be manually invoked.
cd "${LIBADORE_MAKEFILE_PATH}" && make clean_external_library_cache

.PHONY: branch_libadore
branch_libadore: ## Returns the current docker safe/sanitized branch for libadore
@printf "%s\n" ${LIBADORE_TAG}
Expand Down
12 changes: 10 additions & 2 deletions libadore/external/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ CSAPS_CPP_TAG=${CSAPS_CPP_PROJECT}:${CSAPS_CPP_VERSION}

DOCKER_REPOSITORY=andrewkoerner/adore

EXTERNALS_DOCKER_ARCHIVE="/var/tmp/libadore_externals.tar"
EXTERNALS_DOCKER_DIRECTORY=/var/tmp/docker
EXTERNALS_DOCKER_ARCHIVE=${EXTERNALS_DOCKER_DIRECTORY}/libadore_externals.tar

.PHONY: save_docker_images
save_docker_images:
@docker save -o "${EXTERNALS_DOCKER_ARCHIVE}" "${QPOASES_TAG}" "${DLIB_TAG}" "${CATCH2_TAG}" "${OSQP_TAG}" "${XODR_TAG}"
@mkdir -p ${EXTERNALS_DOCKER_DIRECTORY} && \
docker save -o "${EXTERNALS_DOCKER_ARCHIVE}" "${QPOASES_TAG}" "${DLIB_TAG}" "${CATCH2_TAG}" "${OSQP_TAG}" "${XODR_TAG}" && \
chgrp -R docker ${EXTERNALS_DOCKER_DIRECTORY} && chmod -R 2775 ${EXTERNALS_DOCKER_DIRECTORY} || true

.PHONY: load_docker_images
load_docker_images:
Expand Down Expand Up @@ -159,6 +162,11 @@ clean:
(cd csaps-cpp && make clean) 2>/dev/null || true
(cd xodr && make clean) 2>/dev/null || true

.PHONY: clean_cache
clean_cache:
rm "${EXTERNALS_DOCKER_ARCHIVE}" 2> /dev/null || true


.PHONY: docker_publish
docker_publish:
docker tag "${QPOASES_TAG}" "${DOCKER_REPOSITORY}:${QPOASES_PROJECT}_${QPOASES_VERSION}"
Expand Down
9 changes: 8 additions & 1 deletion libadore/external/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ you would like to build in the `.gitmodules` file.

> **ℹ️ INFO:**
> By default external libraries are not built. They are sourced as pre-compiled
> docker images from docker.io.
> docker images from docker.io and saved to a local system wide cache in
> /var/tmp.

The external libraries cache is not deleted or cleaned automatically. In order
to clean the external library cache located in `/var/tmp/docker` invoke the
provided target:
```bash
make clean_cache
```
## Getting Started
Docker and Make are required

Expand Down