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

Merge changes #151

Merged
merged 4 commits into from
Aug 8, 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
64 changes: 64 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: "CodeQL"

on:
push:
branches: [main, humble, jazzy]
pull_request:
branches: [main, humble, jazzy]
schedule:
- cron: '16 21 * * 6'
permissions: read-all
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
container:
image: osrf/ros:humble-desktop-full
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: manual
- language: python
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- if: matrix.build-mode == 'manual'
shell: bash
run: |
source /opt/ros/humble/setup.bash
colcon build --packages-up-to scenario_execution_interfaces
source install/setup.bash
apt update
rosdep update --rosdistro=humble
rosdep install --rosdistro=humble --from-paths scenario_execution_rviz --ignore-src -r -y;
mkdir build_rviz
cd build_rviz
cmake ../scenario_execution_rviz
make

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
88 changes: 87 additions & 1 deletion .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ jobs:
export -n CYCLONEDDS_URI
export ROS_DOMAIN_ID=2
# shellcheck disable=SC1083
scenario_batch_execution -i examples/example_external_method/scenarios -o test_example_external_method --ignore-process-return-value -- ros2 launch scenario_execution_ros scenario_launch.py scenario:={SCENARIO} output_dir:={OUTPUT_DIR}
scenario_batch_execution -i examples/example_external_method/scenarios -o test_example_external_method --ignore-process-return-value -- ros2 launch scenario_execution_ros scenario_launch.py scenario:={SCENARIO} output_dir:={OUTPUT_DIR} headless:=True
- name: Upload result
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
if: always()
Expand Down Expand Up @@ -391,6 +391,52 @@ jobs:
with:
name: test-scenario-execution-gazebo
path: test_scenario_execution_gazebo/test.xml
test-scenario-execution-nav2:
needs: [build]
runs-on: intellabs-01
timeout-minutes: 30
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Restore cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
key: ${{ runner.os }}-build-${{ github.run_number }}
path: .
- name: Test Scenario Execution Nav2
shell: bash
run: |
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
export -n CYCLONEDDS_URI
export ROS_DOMAIN_ID=2
export IGN_PARTITION=${HOSTNAME}:${GITHUB_RUN_ID}
# shellcheck disable=SC1083
scenario_batch_execution -i test/scenario_execution_nav2_test/scenarios/ -o test_scenario_execution_nav2 -- ros2 launch tb4_sim_scenario sim_nav_scenario_launch.py scenario:={SCENARIO} output_dir:={OUTPUT_DIR} headless:=True
- name: Upload result
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
if: always()
with:
name: test-scenario-execution-nav2
path: test_scenario_execution_nav2/test.xml
- name: Convert video
if: always()
shell: bash
run: |
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_scenario_execution_nav2/test_scenario_execution_nav2/example_nav2.mp4 test_scenario_execution_nav2/test_scenario_execution_nav2/rosbag2_* --fps 5 --codec mp4v
- name: Upload video
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
if: always()
with:
name: test-scenario-execution-nav2-video
path: test_scenario_execution_nav2/test_scenario_execution_nav2/example_nav2.mp4
test-scenario-execution-pybullet:
needs: [build]
runs-on: intellabs-01
Expand Down Expand Up @@ -421,6 +467,43 @@ jobs:
with:
name: test-scenario-execution-pybullet
path: test_scenario_execution_pybullet/test.xml
test-scenario-execution-x11:
needs: [build]
runs-on: intellabs-01
timeout-minutes: 3
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Restore cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
key: ${{ runner.os }}-build-${{ github.run_number }}
path: .
- name: Test Scenario Execution X11
shell: bash
run: |
source /opt/ros/${{ github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}/setup.bash
source install/setup.bash
sudo apt -y install mesa-utils
Xvfb :1 -screen 0 800x600x16 &
export DISPLAY=:1.0
ros2 run scenario_execution_ros scenario_execution_ros libs/scenario_execution_x11/scenarios/example_capture.osc -t -o test_scenario_execution_x11
find test_scenario_execution_x11
- name: Upload result
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
if: always()
with:
name: test-scenario-execution-x11
path: test_scenario_execution_x11/test.xml
- name: Upload video
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
if: always()
with:
name: test-scenario-execution-x11-video
path: test_scenario_execution_x11/capture.mp4
tests:
needs:
- test-scenario-execution
Expand All @@ -434,7 +517,9 @@ jobs:
- test-example-multirobot
- test-example-external-method
- test-scenario-execution-gazebo
- test-scenario-execution-nav2
- test-scenario-execution-pybullet
- test-scenario-execution-x11
runs-on: intellabs-01
if: ${{ always() }}
permissions:
Expand Down Expand Up @@ -471,4 +556,5 @@ 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-nav2/test.xml
downloaded-artifacts/test-scenario-execution-pybullet/test.xml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
build/
log/
install/
Expand Down
Loading
Loading