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

Update CI for branches #121

Merged
merged 2 commits into from
Jul 25, 2024
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
9 changes: 5 additions & 4 deletions .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Use the ROS Humble desktop-full image as the base
FROM osrf/ros:humble-desktop-full
ARG ROS_DISTRO=humble
# Use the ROS desktop-full image as the base
FROM osrf/ros:${ROS_DISTRO}-desktop-full

fred-labs marked this conversation as resolved.
Dismissed
Show resolved Hide resolved
# Install system dependencies
# hadolint ignore=DL3008
Expand All @@ -11,8 +12,8 @@ RUN --mount=type=bind,source=.,target=/scenario_execution \
tk \
libgl1 && \
xargs -a /scenario_execution/deb_requirements.txt apt-get install -y --no-install-recommends && \
rosdep update --rosdistro=humble && \
rosdep install --rosdistro=humble --from-paths /scenario_execution/ --ignore-src -r -y && \
rosdep update --rosdistro=${ROS_DISTRO} && \
rosdep install --rosdistro=${ROS_DISTRO} --from-paths /scenario_execution/ --ignore-src -r -y && \
rm -rf /var/lib/apt/lists/*

# hadolint ignore=DL3042
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ jobs:
context: .
file: .github/workflows/Dockerfile
push: true
tags: ghcr.io/intellabs/scenario-execution:humble
tags: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
build-args: |
ROS_DISTRO=${{ github.ref == 'refs/heads/main' && 'humble' || github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}
57 changes: 28 additions & 29 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
#TODO model dependency to image-workflow. Workaround: retrigger run after image-workflow finished.
runs-on: intellabs-01
container:
image: ghcr.io/intellabs/scenario-execution:humble
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Build
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
colcon build --continue-on-error
source install/setup.bash
- name: Cache Build
Expand All @@ -37,7 +37,7 @@ jobs:
needs: [build]
runs-on: intellabs-01
container:
image: ghcr.io/intellabs/scenario-execution:humble
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Test
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source install/setup.bash
export -n CYCLONEDDS_URI
export ROS_DOMAIN_ID=2
Expand All @@ -74,7 +74,7 @@ jobs:
needs: [build]
runs-on: intellabs-01
container:
image: ghcr.io/intellabs/scenario-execution:humble
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -87,7 +87,7 @@ jobs:
- name: Test
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source install/setup.bash
export -n CYCLONEDDS_URI
export ROS_DOMAIN_ID=2
Expand All @@ -109,7 +109,7 @@ jobs:
needs: [build]
runs-on: intellabs-01
container:
image: ghcr.io/intellabs/scenario-execution:humble
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -122,7 +122,7 @@ jobs:
- name: Test Scenario Files
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source install/setup.bash
find . -name "*.osc" | grep -Ev "lib_osc/*|examples/example_scenario_variation|scenario_coverage|fail*|install|build" | while read -r file; do
echo "$file";
Expand All @@ -132,7 +132,7 @@ jobs:
needs: [build]
runs-on: intellabs-01
container:
image: ghcr.io/intellabs/scenario-execution:humble
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -145,7 +145,7 @@ jobs:
- name: Test Example Scenario
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source install/setup.bash
#shellcheck disable=SC1083
scenario_batch_execution -i examples/example_scenario/ -o test_example_scenario -- ros2 launch scenario_execution_ros scenario_launch.py scenario:={SCENARIO} output_dir:={OUTPUT_DIR}
Expand All @@ -159,7 +159,7 @@ jobs:
needs: [build]
runs-on: intellabs-01
container:
image: ghcr.io/intellabs/scenario-execution:humble
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -172,7 +172,7 @@ jobs:
- name: Test Example Library
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source install/setup.bash
# shellcheck disable=SC1083
scenario_batch_execution -i examples/example_library/scenarios -o test_example_library -- ros2 launch scenario_execution_ros scenario_launch.py scenario:={SCENARIO} output_dir:={OUTPUT_DIR}
Expand All @@ -186,7 +186,7 @@ jobs:
needs: [build]
runs-on: intellabs-01
container:
image: ghcr.io/intellabs/scenario-execution:humble
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -199,7 +199,7 @@ jobs:
- name: Test Example Variation
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source install/setup.bash
scenario_variation -o scenario_variation_out examples/example_scenario_variation/example_scenario_variation.osc
# shellcheck disable=SC1083
Expand All @@ -214,7 +214,7 @@ jobs:
needs: [build]
runs-on: intellabs-01
container:
image: ghcr.io/intellabs/scenario-execution:humble
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -227,7 +227,7 @@ jobs:
- name: Test Example Nav2
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source install/setup.bash
Xvfb :1 -screen 0 800x600x16 &
export DISPLAY=:1.0
Expand All @@ -247,7 +247,7 @@ jobs:
needs: [build]
runs-on: intellabs-01
container:
image: ghcr.io/intellabs/scenario-execution:humble
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -260,7 +260,7 @@ jobs:
- name: Test Example Simulation
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source install/setup.bash
Xvfb :1 -screen 0 800x600x16 &
export DISPLAY=:1.0
Expand All @@ -280,7 +280,7 @@ jobs:
needs: [build]
runs-on: intellabs-01
container:
image: ghcr.io/intellabs/scenario-execution:humble
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -293,7 +293,7 @@ jobs:
- name: Test Example Multirobot
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source install/setup.bash
Xvfb :1 -screen 0 800x600x16 &
export DISPLAY=:1.0
Expand All @@ -313,7 +313,7 @@ jobs:
if: always()
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source /rosbag2_to_video/install/setup.bash
ros2 bag to_video -t /static_camera/image_raw -o test_example_multirobot/example_multi_robot/example-multi-robot.mp4 test_example_multirobot/example_multi_robot/rosbag2_* --fps 5 --codec mp4v
- name: Upload video
Expand All @@ -332,7 +332,7 @@ jobs:
needs: [build]
runs-on: intellabs-01
container:
image: ghcr.io/intellabs/scenario-execution:humble
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -345,7 +345,7 @@ jobs:
- name: Test Example External Method
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source install/setup.bash
export -n CYCLONEDDS_URI
export ROS_DOMAIN_ID=2
Expand All @@ -362,7 +362,7 @@ jobs:
runs-on: intellabs-01
timeout-minutes: 30
container:
image: ghcr.io/intellabs/scenario-execution:humble
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -375,7 +375,7 @@ jobs:
- name: Test Scenario Execution Gazebo
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source install/setup.bash
Xvfb :1 -screen 0 800x600x16 &
export DISPLAY=:1.0
Expand All @@ -395,7 +395,7 @@ jobs:
runs-on: intellabs-01
timeout-minutes: 10
container:
image: ghcr.io/intellabs/scenario-execution:humble
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -408,7 +408,7 @@ jobs:
- name: Test Scenario Execution PyBullet
shell: bash
run: |
source /opt/ros/humble/setup.bash
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source install/setup.bash
Xvfb :1 -screen 0 800x600x16 &
export DISPLAY=:1.0
Expand Down Expand Up @@ -467,5 +467,4 @@ jobs:
downloaded-artifacts/test-example-multirobot-result/test.xml
downloaded-artifacts/test-example-external-method-result/test.xml
downloaded-artifacts/test-scenario-execution-gazebo/test.xml
downloaded-artifacts/test-scenario-execution-pybullet/test.xml

downloaded-artifacts/test-scenario-execution-pybullet/test.xml
Loading