Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Installs ignition pkgs without prereqs. #12

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/ignition_packages_installation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#! /bin/bash

#######################################
# Pulls apt keys from a few well known keyservers.
#
# We've seen the "default" keyserver (p80.pool.sks-keyservers.net) fail somewhat
# often. This function will try the default, followed by some alternates to
# reduce the number of times builds fail because of key problems.
#
# Arguments
# $1 -> apt key
# Asserts
# That apt key pulling was successful.
#######################################
pull_apt_keys() {
success=0
for keyserver in hkp://p80.pool.sks-keyservers.net:80 hkp://pgp.mit.edu:80 hkp://keyserver.ubuntu.com:80 ; do
apt-key adv --keyserver $keyserver --recv-keys $1 || continue
success=1
return 0
done
return 1
}

#######################################
# Installs apt repository into system wide sources list.
#
# Arguments
# $1 -> name of the repository, to be used as sources list prefix.
# $2 -> url of the repository.
# $3 -> apt key for the repository.
#######################################
install_apt_repo() {
REPO_NAME=$1
REPO_URL=$2
REPO_KEY=$3

if ! grep -q "^deb .*$REPO_URL" /etc/apt/sources.list /etc/apt/sources.list.d/*; then
echo "deb $REPO_URL $(lsb_release -cs) main" | \
tee --append /etc/apt/sources.list.d/$REPO_NAME.list > /dev/null
pull_apt_keys $REPO_KEY
echo "Apt Repo '$REPO_NAME'..........................installed"
else
echo "Apt Repo '$REPO_NAME'..........................found"
fi
}

#######################################
# Install ignition packages.
# Returns:
# 0 if no error was detected, non-zero otherwise.
#######################################
function install_ignition_packages() {

install_apt_repo gazebo-stable \
http://packages.osrfoundation.org/gazebo/ubuntu-stable \
D2486D2DD83DB69272AFE98867170598AF249743

apt update
apt install -y \
libignition-cmake1-dev \
libignition-cmake2-dev \
libignition-common3-dev \
libignition-math6-dev \
libignition-msgs5-dev \
libignition-gui3-dev \
libignition-rendering3-dev \
libignition-tools-dev \
libignition-transport8-dev
}

install_ignition_packages
20 changes: 4 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,26 +85,10 @@ jobs:
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/drake_vendor
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_infrastructure
fetch-depth: 0
path: maliput_infrastructure
token: ${{ secrets.MALIPUT_TOKEN }}
- name: check if dependencies have a matching branch
shell: bash
working-directory: ${{ env.ROS_WS }}/src
run: ./${PACKAGE_NAME}/.github/try_vcs_checkout ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} .
# install delphyne prereqs using maliput_infrastructure/tools/prereqs.lib
- name: install delphyne prereqs
shell: bash
working-directory: ${{ env.ROS_WS }}/src/delphyne
run: ${GITHUB_WORKSPACE}/maliput_infrastructure/tools/prereqs-install -t ignition .
# install delphyne_gui prereqs using maliput_infrastructure/tools/prereqs.lib
- name: install delphyne_gui prereqs
shell: bash
working-directory: ${{ env.ROS_WS }}/src/delphyne_gui
run: ${GITHUB_WORKSPACE}/maliput_infrastructure/tools/prereqs-install -t ignition .
# clone public dependencies
- name: vcs import
shell: bash
Expand All @@ -125,6 +109,10 @@ jobs:
shell: bash
working-directory: ${{ env.ROS_WS }}/src/drake_vendor
run: ./drake_installer
- name: install ignition packages
shell: bash
working-directory: ${{ env.ROS_WS }}/src
run: ./${PACKAGE_NAME}/.github/ignition_packages_installation.sh
- name: colcon build libraries
shell: bash
working-directory: ${{ env.ROS_WS }}
Expand Down
20 changes: 4 additions & 16 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,26 +103,10 @@ jobs:
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/drake_vendor
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_infrastructure
fetch-depth: 0
path: maliput_infrastructure
token: ${{ secrets.MALIPUT_TOKEN }}
- name: check if dependencies have a matching branch
shell: bash
working-directory: ${{ env.ROS_WS }}/src
run: ./${PACKAGE_NAME}/.github/try_vcs_checkout ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} .
# install delphyne prereqs using maliput_infrastructure/tools/prereqs.lib
- name: install delphyne prereqs
shell: bash
working-directory: ${{ env.ROS_WS }}/src/delphyne
run: ${GITHUB_WORKSPACE}/maliput_infrastructure/tools/prereqs-install -t ignition .
# install delphyne_gui prereqs using maliput_infrastructure/tools/prereqs.lib
- name: install delphyne_gui prereqs
shell: bash
working-directory: ${{ env.ROS_WS }}/src/delphyne_gui
run: ${GITHUB_WORKSPACE}/maliput_infrastructure/tools/prereqs-install -t ignition .
- name: clang 8 install
shell: bash
run: ${{ env.ROS_WS }}/src/${PACKAGE_NAME}/.github/clang_suite_installation.sh
Expand All @@ -146,6 +130,10 @@ jobs:
shell: bash
working-directory: ${{ env.ROS_WS }}/src/drake_vendor
run: ./drake_installer
- name: install ignition packages
shell: bash
working-directory: ${{ env.ROS_WS }}/src
run: ./${PACKAGE_NAME}/.github/ignition_packages_installation.sh
- name: colcon build libraries
shell: bash
working-directory: ${{ env.ROS_WS }}
Expand Down
20 changes: 4 additions & 16 deletions .github/workflows/scan_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,26 +90,10 @@ jobs:
fetch-depth: 0
path: ${{ env.ROS_WS }}/src/drake_vendor
token: ${{ secrets.MALIPUT_TOKEN }}
- uses: actions/checkout@v2
with:
repository: ToyotaResearchInstitute/maliput_infrastructure
fetch-depth: 0
path: maliput_infrastructure
token: ${{ secrets.MALIPUT_TOKEN }}
- name: check if dependencies have a matching branch
shell: bash
working-directory: ${{ env.ROS_WS }}/src
run: ./${PACKAGE_NAME}/.github/try_vcs_checkout ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} .
# install delphyne prereqs using maliput_infrastructure/tools/prereqs.lib
- name: install delphyne prereqs
shell: bash
working-directory: ${{ env.ROS_WS }}/src/delphyne
run: ${GITHUB_WORKSPACE}/maliput_infrastructure/tools/prereqs-install -t ignition .
# install delphyne_gui prereqs using maliput_infrastructure/tools/prereqs.lib
- name: install delphyne_gui prereqs
shell: bash
working-directory: ${{ env.ROS_WS }}/src/delphyne_gui
run: ${GITHUB_WORKSPACE}/maliput_infrastructure/tools/prereqs-install -t ignition .
- name: clang 8 install
shell: bash
run: ${{ env.ROS_WS }}/src/${PACKAGE_NAME}/.github/clang_suite_installation.sh
Expand All @@ -133,6 +117,10 @@ jobs:
shell: bash
working-directory: ${{ env.ROS_WS }}/src/drake_vendor
run: ./drake_installer
- name: install ignition packages
shell: bash
working-directory: ${{ env.ROS_WS }}/src
run: ./${PACKAGE_NAME}/.github/ignition_packages_installation.sh
- name: colcon build up-to
shell: bash
working-directory: ${{ env.ROS_WS }}
Expand Down