Skip to content

Commit

Permalink
Try to use a bare ubuntu container
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Apr 19, 2024
1 parent e5f2096 commit 9d77def
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/reusable-build-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,48 @@ on:
required: true
type: string
os_name:
description: 'On which OS to run the workflow, e.g. ubuntu-22.04'
description: 'On which runner-OS to run the workflow, e.g. ubuntu-22.04'
required: false
default: 'ubuntu-latest'
type: string
container:
description: '(optional) Docker container to run the job in, e.g. ubuntu:noble'
required: false
default: ''
type: string

jobs:
coverage:
name: coverage build ${{ inputs.ros_distro }}
runs-on: ${{ inputs.os_name }}
container: ${{ inputs.container }}
steps:
- name: "Determine prerequisites"
id: prereq
run: |
DEBIAN_FRONTEND=noninteractive apt update && apt upgrade -y
apt install -y curl sudo apt-utils
echo "need_node=$(command -v node >/dev/null 2>&1 && echo 0 || echo 1)" >> $GITHUB_OUTPUT
echo "need_python=$(command -v python >/dev/null 2>&1 && echo 0 || echo 1)" >> $GITHUB_OUTPUT
# Consider switching to https://github.com/actions/setup-node when it works
# https://github.com/nektos/act/issues/973
# needed only if a bare ubuntu image is used
- name: Install node
if: ${{ steps.prereq.outputs.need_node == '1' }}
run: |
curl -sS https://webi.sh/node | sh
echo ~/.local/opt/node/bin >> $GITHUB_PATH
# not working for noble yet
# - uses: actions/setup-python@v5
# with:
# python-version: '3.11'
- name: Install python
if: ${{ steps.prereq.outputs.need_python == '1' }}
run: |
DEBIAN_FRONTEND=noninteractive apt install -y python3-pip
- uses: ros-tooling/[email protected]
# - name: Temporary fix for rolling by setting the ROSDISTRO_INDEX_URL
# # see https://docs.ros.org/en/rolling/How-To-Guides/Using-Custom-Rosdistro.html
Expand All @@ -31,7 +63,8 @@ jobs:
# echo "ROS_DISTRO: $ROS_DISTRO"
# rosdep resolve test_msgs std_msgs || true
# rosdep resolve test_msgs std_msgs --os=ubuntu:jammy --rosdistro=rolling
# - uses: actions/checkout@v4

- uses: actions/checkout@v4
- id: package_list_action
uses: ros-controls/ros2_control_ci/.github/actions/set-package-list@master
- uses: ros-tooling/[email protected]
Expand Down

0 comments on commit 9d77def

Please sign in to comment.