-
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.
- Loading branch information
Showing
2 changed files
with
78 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG | ||
trap 'echo "$0: \"${last_command}\" command failed with exit code $?"' ERR | ||
|
||
LIST=mrs | ||
VARIANT=testing | ||
PACKAGE_NAME=$1 | ||
WORKSPACE=/tmp/workspace | ||
|
||
YAML_FILE=${LIST}.yaml | ||
|
||
# needed for building open_vins | ||
export ROS_VERSION=1 | ||
|
||
sudo apt-get -y install dpkg-dev | ||
|
||
ARCH=$(dpkg-architecture -qDEB_HOST_ARCH) | ||
|
||
# we already have a docker image with ros for the ARM build | ||
if [[ "$ARCH" != "arm64" ]]; then | ||
curl https://ctu-mrs.github.io/ppa-$VARIANT/add_ros_ppa.sh | bash | ||
fi | ||
|
||
curl https://ctu-mrs.github.io/ppa-$VARIANT/add_ppa.sh | bash | ||
|
||
# dependencies need for build the deb package | ||
sudo apt-get -y install ros-noetic-catkin python3-catkin-tools | ||
sudo apt-get -y install fakeroot debhelper | ||
sudo pip3 install -U bloom | ||
|
||
REPOS=$(./.ci/get_repo_source.py $YAML_FILE $VARIANT $ARCH $PACKAGE_NAME) | ||
|
||
IDX=`cat "$IDX_FILE"` | ||
IDX=$(($IDX+1)) | ||
|
||
echo "$0: this is the $IDX-th job in the pipeline" | ||
|
||
echo "$0: artifacts installed" | ||
|
||
# write the new incremented job idx to the shared file | ||
echo "$IDX" > $IDX_FILE | ||
|
||
mkdir -p $WORKSPACE | ||
|
||
cd $WORKSPACE | ||
mkdir src | ||
source /opt/ros/noetic/setup.bash | ||
catkin init | ||
|
||
cd src | ||
|
||
# clone and checkout | ||
echo "$REPOS" | while IFS= read -r REPO; do | ||
|
||
PACKAGE=$(echo "$REPO" | awk '{print $1}') | ||
URL=$(echo "$REPO" | awk '{print $2}') | ||
BRANCH=$(echo "$REPO" | awk '{print $4}') | ||
|
||
echo "$0: cloning '$URL --depth 1 --branch $BRANCH' into '$PACKAGE'" | ||
git clone $URL --recurse-submodules --shallow-submodules --depth 1 --branch $BRANCH $PACKAGE | ||
|
||
done | ||
|
||
cd $WORKSPACE/src | ||
|
||
echo "$0: building the workspace" | ||
|
||
catkin build | ||
|
||
echo "$0: testing" | ||
|
||
catkin test | ||
|
||
echo "$0: tests finished" |
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