Commit 88bcfb8d authored by daniel's avatar daniel
Browse files

added buildfarm files

parent 0ec8c288
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
*.sql
*.sqlite
# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.
# Models #
*.pyc
*.meta
*.ckpt*
#Documentation
documentation/
*~
\ No newline at end of file
stages:
- dev-build
- night-build
- release-build
# Ubuntu 16.04
ubuntu-xenial-test:
image: ubuntu:xenial
variables:
CI_ROS_DISTRO: kinetic
UBUNTU_DISTRO: xenial
before_script:
- echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
- apt-get update
- apt-get install -qq -y apt-transport-https sed wget unzip > /dev/null
- source .gitlab-ci/prepare.sh
- chmod +x setup.sh
- ./setup.sh $UBUNTU_DISTRO $CI_ROS_DISTRO > /dev/null
- setup_apt ${UBUNTU_DISTRO}
- apt-get install -qq -y python-catkin-tools > /dev/null
- rosdep update 2> /dev/null
- add_aass_yaml
- rosdep install --from-paths . -i -y -r --rosdistro $CI_ROS_DISTRO 2> /dev/null
stage: dev-build
script:
- old_dir=`pwd`
- mkdir -p /tmp/src
- cp -r * /tmp/src/
- cd /tmp/
- source /opt/ros/${CI_ROS_DISTRO}/setup.sh
- catkin init
- catkin build
- cd $old_dir
- rm -rf /tmp/src
# Ubuntu 16.04 debian package generation
ubuntu-xenial-build-package-nightbuild:
image: ubuntu:xenial
variables:
CI_ROS_DISTRO: kinetic
UBUNTU_DISTRO: xenial
before_script:
- echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
- echo $CI_ROS_DISTRO
- echo ${CI_ROS_DISTRO}
- apt-get update
- apt-get install -qq -y apt-transport-https sed wget unzip > /dev/null
- source .gitlab-ci/prepare.sh
- chmod +x setup.sh
- ./setup.sh $UBUNTU_DISTRO $CI_ROS_DISTRO > /dev/null
- setup_apt ${UBUNTU_DISTRO}
- apt-get install -q -y python-bloom devscripts debhelper > /dev/null
- apt-get install -f -y > /dev/null
- rosdep update 2> /dev/null
- add_aass_yaml
- rosdep install --from-paths . -i -y -r --rosdistro $CI_ROS_DISTRO 2> /dev/null
stage: night-build
script:
- ls *
- rm -rf build
- source .gitlab-ci/release.sh
- show_info
- mkdir .build
- release_package
- mv .build build
when: on_success
# The files which are to be made available in GitLab
artifacts:
paths:
- build/*
# Ubuntu 16.04 debian package generation
ubuntu-xenial-build-package-release:
image: ubuntu:xenial
variables:
CI_ROS_DISTRO: kinetic
UBUNTU_DISTRO: xenial
before_script:
- echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
- echo $CI_ROS_DISTRO
- echo ${CI_ROS_DISTRO}
- apt-get update
- apt-get install -qq -y apt-transport-https sed wget unzip > /dev/null
- source .gitlab-ci/prepare.sh
- chmod +x setup.sh
- ./setup.sh $UBUNTU_DISTRO $CI_ROS_DISTRO > /dev/null
- setup_apt ${UBUNTU_DISTRO}
- apt-get install -q -y python-bloom devscripts debhelper > /dev/null
- apt-get install -f -y > /dev/null
- rosdep update 2> /dev/null
- rosdep install --from-paths . -i -y -r --rosdistro $CI_ROS_DISTRO 2> /dev/null
- add_ndt_core_yaml
stage: release-build
script:
- ls *
- rm -rf build
- source .gitlab-ci/release.sh
- show_info
- mkdir .build
- release_package
- mv .build build
only:
- tags
when: on_success
# The files which are to be made available in GitLab
artifacts:
paths:
- build/*
#!/bin/bash
add_aass_yaml() {
echo "Here adding aass dependencies.";
echo "yaml https://gitsvn-nt.oru.se/software/aass_rosdep/raw/master/kinetic.yml" | tee /etc/ros/rosdep/sources.list.d/50-aass.list
rosdep update > /dev/null
}
setup_apt() {
echo "Adding aass packages";
wget -O - http://130.243.98.216/repos/apt/conf/public.gpg.key | apt-key add -
echo "deb http://130.243.98.216/repos/apt/debian xenial main" >> /etc/apt/sources.list
apt-get update > /dev/null
}
#!/bin/bash
release_dependency_packages() {
for i in "graph_map graph_localization ndt_calibration ndt_evaluation"; do
create_debian_package "$i"
dpkg -i ros-*_amd64.deb > /dev/null
done
move_debian_packages
}
release_meta_package() {
create_debian_package "<meta package>"
dpkg -i ros-*_amd64.deb > /dev/null
move_debian_packages
}
create_debian_package() {
cd $1
if [ -f .done ]; then
echo "Package $1 was already build. Skipping..."
else
echo "generating debian package for $1"
bloom-generate rosdebian --os-name ubuntu --os-version $UBUNTU_DISTRO --ros-distro $CI_ROS_DISTRO &&\
sed -i 's/dh $@/dh $@ --parallel/' debian/rules
debuild -rfakeroot -us -uc -b -j8 > /dev/null
touch .done
fi
cd ..
}
move_debian_packages() {
mv *deb .build/
}
release_package() {
release_dependency_packages
#release_meta_package
}
show_info() {
echo $UBUNTU_DISTRO
echo $CI_ROS_DISTRO
}
# Releasing your code via aass build farm
## Repository preparation
1. Copy content of this repository into the root directory of your package
2. Modify line 13 in .gitlab-ci/release.sh. Replace <meta package> with the name of your meta package.
3. Modify line 4 in .gitlab-ci/release.sh. Replace <Topological order of packages> with the topological order of packages in your meta package. (You can use catkin_topological_order to check it.)
4. In tab Setting->General of your project add tag ros
## Add dependencies
1. Add all your packages to the list in https://gitsvn-nt.oru.se/software/aass_rosdep.
\ No newline at end of file
......@@ -118,8 +118,6 @@ namespace perception_oru{
double distance=(Tnow.translation()-close_nodes[i]->GetPose().translation()).norm();
//double score = close_nodes[i]->GetMap()->Score(scan, Trobot_local);
double overlap = close_nodes[i]->GetMap()->Overlap(scan,Trobot_local);
//NDTMap *source_ndt = boost::dynamic_pointer_cast<NDTMapType>(scan)->GetNDTMap();
//GraphPlot::PlotNDT(source_ndt, "world", "l2_measure", close_nodes[i]->GetPose()*Trobot_local);
cout<<"node id: "<<close_nodes[i]->GetId()<<", overlap="<<overlap<<endl;
if(overlap > max_overlap){
max_overlap = overlap;
......
#!/bin/bash
if [ $# -eq 0 ]
then
# No arguments supplied
ubuntu_version_name="xenial"
ros_version="kinetic"
elif [ $# -eq 2 ]
then
ubuntu_version_name=${1}
ros_version=${2}
else
echo "ERROR: Wrong usage"
echo "Usage: $0 ubuntu_code_name ros_code_name eg. $0 xenial kinetic"
exit 1
fi
echo "Installing Dependencies (Ubuntu ${ubuntu_version_name} using ROS ${ros_version})..."
echo "If you want to change this you can pass in the codename of the Ubuntu release. Eg. $0 xenial kinetic for 16.04 with ROS kinetic"
if [ ! -f /etc/apt/sources.list.d/ros-latest.list ]; then
sh -c 'echo "deb http://packages.ros.org/ros/ubuntu '${ubuntu_version_name}' main" > /etc/apt/sources.list.d/ros-latest.list'
fi
wget http://packages.ros.org/ros.key -O - | apt-key add -
apt-get update -qq > /dev/null
apt-get install -qq -y python-rosdep build-essential cmake > /dev/null
rosdep init > /dev/null
rosdep update 2> /dev/null
rosdep install -q --from-paths . -i -y -r --rosdistro ${ros_version} 2> /dev/null
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment