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

Change to use venvs for pip installations #78

Draft
wants to merge 6 commits into
base: noble
Choose a base branch
from
Draft
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
13 changes: 7 additions & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ TESTS_ENABLED=$7
CPPLINT_ENABLED=$8
CPPCHECK_ENABLED=$9

VENV_ROOT=/tmp/

# keep the previous behaviour of running codecov if old token is set
[ -n "${DEPRECATED_CODECOV_TOKEN}" ] && CODECOV_ENABLED=1

Expand All @@ -31,7 +33,7 @@ apt -y install \
gnupg \
lcov \
lsb-release \
python3-pip \
python3-venv \
wget

if [ -n "$DOXYGEN_ENABLED" ] && ${DOXYGEN_ENABLED} ; then
Expand Down Expand Up @@ -69,21 +71,20 @@ if python3 detect_ci_matching_branch.py "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/he
GZDEV_TRY_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
fi

python3 -m venv "$VENV_ROOT/venv_gzdev"
. "$VENV_ROOT/venv_gzdev/bin/activate"
git clone https://github.com/osrf/gzdev /tmp/gzdev
if [ -n "${GZDEV_TRY_BRANCH}" ]; then
git -C /tmp/gzdev checkout ${GZDEV_TRY_BRANCH} || true
fi
pip3 install -r /tmp/gzdev/requirements.txt --break-system-packages
pip3 install -r /tmp/gzdev/requirements.txt
/tmp/gzdev/gzdev.py \
repository enable --project="${PACKAGE}${PACKAGE_MAJOR_VERSION}"
deactivate

apt-get update 2>&1
echo ::endgroup::

echo ::group::Install tools: pip
pip3 install -U vcstool colcon-common-extensions --break-system-packages
echo ::endgroup::

if [ -f "$SOURCE_DEPENDENCIES" ] || [ -f "$SOURCE_DEPENDENCIES_VERSIONED" ] ; then
echo ::group::Fetch source dependencies
mkdir -p deps/src
Expand Down