-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add commands to devcontainer * Set builtin bash to be safe https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425 https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ * Setup workspace on create * Revert use of set -u for bash don't raise error due to variables otherwise colcon setup.sh chokes from using an unbounded path variable * Add safe.directory for git config otherwise colcon cache errors out because of issues with git due to complex user mapping magic that vscode does with devcontainers https://stackoverflow.com/questions/72978485/git-submodule-update-failed-with-fatal-detected-dubious-ownership-in-repositor also used by Moveit2: moveit/moveit2#1994 https://github.blog/2022-04-12-git-security-vulnerability-announced/ * Set env using remoteEnv instead of inlining them in scripts * Revert to using the main tag now that the tester stage has been replicated with the new devcontainer script commands instead * formating * Scrap `-dev` image tag and use codspaces prebuilds instead * Build incrementally from update content command by copying the build workspace steps from circleci config * Adapt the build workspace steps for bash
- Loading branch information
1 parent
27c2d1e
commit 5a6fda9
Showing
4 changed files
with
83 additions
and
21 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,19 @@ | ||
#!/bin/bash | ||
|
||
set -exo pipefail | ||
|
||
env | ||
|
||
cd $OVERLAY_WS | ||
. $UNDERLAY_WS/install/setup.sh | ||
|
||
git config --global --add safe.directory "*" | ||
colcon cache lock | ||
|
||
colcon build \ | ||
--symlink-install \ | ||
--mixin $OVERLAY_MIXINS | ||
|
||
sed --in-place \ | ||
's|^source .*|source "$OVERLAY_WS/install/setup.bash"|' \ | ||
/ros_entrypoint.sh |
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,57 @@ | ||
#!/bin/bash | ||
|
||
set -exo pipefail | ||
|
||
env | ||
|
||
cd $OVERLAY_WS | ||
|
||
colcon cache lock | ||
|
||
BUILD_UNFINISHED=$( | ||
colcon list \ | ||
--names-only \ | ||
--packages-skip-build-finished \ | ||
| xargs) | ||
echo BUILD_UNFINISHED: $BUILD_UNFINISHED | ||
|
||
BUILD_FAILED=$( | ||
colcon list \ | ||
--names-only \ | ||
--packages-select-build-failed \ | ||
| xargs) | ||
echo BUILD_FAILED: $BUILD_FAILED | ||
|
||
BUILD_INVALID=$( | ||
colcon list \ | ||
--names-only \ | ||
--packages-select-cache-invalid \ | ||
--packages-select-cache-key build \ | ||
| xargs) | ||
echo BUILD_INVALID: $BUILD_INVALID | ||
|
||
BUILD_PACKAGES="" | ||
if [ -n "$BUILD_UNFINISHED" ] || \ | ||
[ -n "$BUILD_FAILED" ] || \ | ||
[ -n "$BUILD_INVALID" ] | ||
then | ||
BUILD_PACKAGES=$( | ||
colcon list \ | ||
--names-only \ | ||
--packages-above \ | ||
$BUILD_UNFINISHED \ | ||
$BUILD_FAILED \ | ||
$BUILD_INVALID \ | ||
| xargs) | ||
fi | ||
echo BUILD_PACKAGES: $BUILD_PACKAGES | ||
|
||
colcon clean packages --yes \ | ||
--packages-select ${BUILD_PACKAGES} \ | ||
--base-select install | ||
|
||
. $UNDERLAY_WS/install/setup.sh | ||
colcon build \ | ||
--symlink-install \ | ||
--mixin $OVERLAY_MIXINS \ | ||
--packages-select ${BUILD_PACKAGES} |
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