Skip to content

Commit

Permalink
Use venv
Browse files Browse the repository at this point in the history
  • Loading branch information
mathias-luedtke committed Aug 4, 2024
1 parent 4f5fb19 commit a11f60f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions industrial_ci/src/tests/ros_prerelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@
# It is dependent on environment variables that need to be exported in advance
# (As of version 0.4.4 most of them are defined in env.sh).

generate_script_path=/home/ci/.local/bin/generate_prerelease_script.py
function setup_ros_buildfarm() {
if ! [ -e "$generate_script_path" ]; then
ici_install_pkgs_for_command pip3 python3-pip python3-setuptools python3-wheel
ici_cmd sudo -EH -u ci pip3 install git+https://github.com/ros-infrastructure/ros_buildfarm.git
fi
ici_apt_install python3-pip python3-setuptools python3-wheel python3-venv
ici_install_pkgs_for_command vcs python3-vcstool
ici_cmd python3 -mvenv /tmp/ros_buildfarm --system-site-packages
ici_cmd /tmp/ros_buildfarm/bin/pip3 install git+https://github.com/ros-infrastructure/ros_buildfarm.git
}

function setup_ros_prerelease() {
Expand Down Expand Up @@ -114,7 +113,7 @@ function run_ros_prerelease() {
local reponame=${PRERELEASE_REPONAME:-$TARGET_REPO_NAME}

ici_step "prepare_prerelease_workspaces" ici_cmd prepare_prerelease_workspaces "$WORKSPACE" "$reponame" "$(basename "$TARGET_REPO_PATH")"
ici_step 'generate_prerelease_script' ici_cmd sudo -EH -u ci "$generate_script_path" "${ROSDISTRO_INDEX_URL}" "$PRERELEASE_DISTRO" default "$OS_NAME" "$OS_CODE_NAME" "${OS_ARCH:-amd64}" --build-tool "$BUILDER" --level "$downstream_depth" --output-dir "$WORKSPACE" --custom-repo "$reponame::::"
ici_step 'generate_prerelease_script' ici_cmd sudo -EH -u ci /tmp/ros_buildfarm/bin/generate_prerelease_script.py "${ROSDISTRO_INDEX_URL}" "$PRERELEASE_DISTRO" default "$OS_NAME" "$OS_CODE_NAME" "${OS_ARCH:-amd64}" --build-tool "$BUILDER" --level "$downstream_depth" --output-dir "$WORKSPACE" --custom-repo "$reponame::::"

# shellcheck disable=SC2016
ici_asroot sed -i '/test_result_EXECUTABLE="colcon"/a mkdir -p "$WORKSPACE/ws/test_results"' "$WORKSPACE/prerelease_build_underlay.sh"
Expand Down

0 comments on commit a11f60f

Please sign in to comment.