-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from OUXT-Polaris/feature/cache
Feature/cache
- Loading branch information
Showing
6 changed files
with
116 additions
and
11 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
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,16 @@ | ||
ARG ROS_DISTRO=humble | ||
ARG IMAGE_NAME=ros | ||
FROM ${IMAGE_NAME}:${ROS_DISTRO} as cache-stage | ||
|
||
WORKDIR /workspace | ||
RUN echo "repositories:" >> workspace.repos | ||
|
||
ARG REPOS_FILE=workspace.repos | ||
ADD ${REPOS_FILE} workspace.repos | ||
|
||
ARG APT_SERVER=ftp.jaist.ac.jp/pub/Linux | ||
RUN sed -i "[email protected]@$APT_SERVER@g" /etc/apt/sources.list | ||
RUN vcs import . < workspace.repos | ||
RUN apt update && rosdep install -iy --from-paths . --skip-keys $(colcon list -n | tr '\n' ',') && \ | ||
apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* |
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,24 +1,25 @@ | ||
#!/bin/bash | ||
|
||
# Building packages | ||
echo "Changing apt server to $APT_SERVER" | ||
sed -i "[email protected]@$APT_SERVER@g" /etc/apt/sources.list | ||
|
||
vcs import . < workspace.repos | ||
cd /artifacts | ||
sh update_apt_repo.sh | ||
|
||
apt update | ||
rosdep install -iy -t buildtool_export -t build -t buildtool -t build_export -t test --from-paths . --skip-keys $(colcon list -n | tr '\n' ',') | ||
cd /workspace | ||
|
||
vcs import . < workspace.repos | ||
|
||
colcon list -t -p | xargs -L 1 bash -c \ | ||
'cd "$1"; pkg=$(colcon list -n);pkg_with_prefix=$(echo $pkg|echo "ros-humble-"$(sed -e 's/_/-/g')); \ | ||
yq eval -i ".\"$pkg\".ubuntu=[\"$pkg_with_prefix\"]" /artifacts/rosdep/${ROS_DISTRO}.yaml' _ | ||
rosdep update | ||
|
||
cd /artifacts && sh update_apt_repo.sh | ||
apt update | ||
rosdep install -iy --from-paths . --skip-keys $(colcon list -n | tr '\n' ',') | ||
|
||
cd /workspace && colcon list -t -p --packages-above $PACKAGES_ABOVE | xargs -I{} bash -c \ | ||
'echo {} && cd {} && \ | ||
rosdep install -iy -t buildtool_export -t build -t buildtool -t build_export -t test --from-paths . && \ | ||
rosdep install -iy --from-paths . && \ | ||
bloom-generate rosdebian --os-name ubuntu --os-version $DEB_DISTRO --ros-distro $ROS_DISTRO && \ | ||
fakeroot debian/rules binary && cd /artifacts && sh update_apt_repo.sh && \ | ||
dpkg -i /artifacts/dists/$DEB_DISTRO/universe/binary-$ARCHITECTURE/ros-$ROS_DISTRO-*.deb' | ||
|