-
Notifications
You must be signed in to change notification settings - Fork 130
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
1 parent
714b847
commit 3bf4a63
Showing
2 changed files
with
69 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (c) 2021, Mathias Lüdtke | ||
# All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Based on https://github.com/ros-industrial/industrial_ci/issues/697#issuecomment-876293987 | ||
|
||
function prepare_debians() { | ||
true | ||
} | ||
|
||
function build_and_install_debian() ( | ||
local pkg_path=$1 | ||
shift | ||
cd "$pkg_path" | ||
ici_quiet_echo bloom-generate rosdebian --ros-distro="$ROS_DISTRO" --debian-inc="ici~" | ||
ici_quiet_echo dpkg-buildpackage -b -uc -us | ||
mv ../*.{buildinfo,changes,deb} . | ||
ici_quiet_echo ici_asroot dpkg -i *.deb | ||
) | ||
|
||
function run_debians() { | ||
export BUILDER=colcon | ||
ici_source_builder | ||
ici_run "${BUILDER}_setup" ici_quiet builder_setup | ||
ici_run "setup_bloom" ici_quiet ici_install_pkgs_for_command bloom-generate python3-bloom debhelper | ||
ici_run "setup_dpkg_dev" ici_quiet ici_install_pkgs_for_command dpkg-buildpackage dpkg-dev | ||
|
||
ici_run "setup_rosdep" ici_setup_rosdep | ||
|
||
if [ ! -f "$_ROS_KEYRING" ]; then | ||
ici_run "setup_gpg_key" ici_setup_gpg_key | ||
fi | ||
|
||
local ws | ||
ici_make_temp_dir ws | ||
|
||
local sourcespace | ||
ici_make_temp_dir sourcespace | ||
|
||
for name in upstream target downstream; do | ||
local sources=() | ||
local current="$sourcespace/$name" | ||
ici_parse_env_array sources "${name^^}_WORKSPACE" | ||
ici_run "prepare_${name}_sourcespace" ici_prepare_sourcespace "$current" "${sources[@]}" | ||
ici_run "install_${name}_dependencies" ici_quiet ici_install_dependencies "$UNDERLAY" "$ROSDEP_SKIP_KEYS" "$sourcespace" | ||
|
||
while read -r -a pkg; do | ||
ici_run "${pkg[0]}_debian" build_and_install_debian "$current/${pkg[1]}" | ||
done < <(cd "$current" && colcon list -t) | ||
done | ||
} |
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