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

Enable CI #2

Merged
merged 22 commits into from
Jan 3, 2025
2 changes: 1 addition & 1 deletion .github/linters/actionlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
self-hosted-runner:
labels:
- intellabs-01
- ubuntu-latest
6 changes: 6 additions & 0 deletions .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUN --mount=type=bind,source=.,target=/scenario_execution \
apt-get update && \
apt-get install -y --no-install-recommends \
python3-pip \
pipx golang-go\
xvfb \
tk \
libgl1 && \
Expand All @@ -18,6 +19,11 @@ RUN --mount=type=bind,source=.,target=/scenario_execution \
rosdep install --rosdistro=${ROS_DISTRO} --from-paths /scenario_execution/ --ignore-src -r -y && \
rm -rf /var/lib/apt/lists/*

# install dependencies for license check
RUN PIPX_HOME="" PIPX_BIN_DIR="/python_bin" pipx install -v ros-license-toolkit==1.2.2 && \
GOPATH=/go go install github.com/google/[email protected]

# install pybullet dependencies
RUN --mount=type=bind,source=.,target=/scenario_execution \
pip3 install --no-cache-dir -r /scenario_execution/libs/scenario_execution_pybullet/requirements.txt --break-system-packages

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cleanup_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
cleanup:
permissions:
actions: write
runs-on: intellabs-01
runs-on: ubuntu-latest
steps:
- name: Cleanup
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ permissions: read-all
jobs:
build_docs:
name: 'Build Docs'
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/sphinx-doc/sphinx:7.1.2
volumes:
Expand All @@ -46,7 +46,7 @@ jobs:
name: 'Deploy to GitHub Pages'
needs: build_docs
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' }}
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/sphinx-doc/sphinx:7.1.2
environment:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:
permissions: read-all
jobs:
build-and-push:
runs-on: intellabs-01
runs-on: ubuntu-latest
permissions:
packages: write
steps:
Expand All @@ -45,11 +45,11 @@ jobs:
context: .
file: .github/workflows/Dockerfile
push: true
tags: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref || steps.extract_branch.outputs.branch }}
tags: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref || steps.extract_branch.outputs.branch }}
build-args: |
ROS_DISTRO=${{ github.ref == 'refs/heads/main' && 'humble' || github.event.pull_request.base.ref == 'main' && 'humble' || github.event.pull_request.base.ref }}
test-devcontainer:
runs-on: intellabs-01
runs-on: ubuntu-latest
permissions:
packages: write
steps:
Expand Down
28 changes: 10 additions & 18 deletions .github/workflows/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions: read-all
jobs:
lint:
name: 'Super-linter'
runs-on: intellabs-01
runs-on: ubuntu-latest
container: 'ghcr.io/github/super-linter:v5.0.0'
permissions:
contents: read
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
FILTER_REGEX_EXCLUDE: .*/pull_request_template.md
trivy:
name: Trivy
runs-on: intellabs-01
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
Expand All @@ -52,7 +52,7 @@ jobs:
vuln-type: 'os,library'
bandit:
name: Bandit
runs-on: intellabs-01
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
Expand All @@ -63,29 +63,21 @@ jobs:
bandit -c .github/bandit.yaml -r .
license:
name: License check
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: osrf/ros:humble-desktop
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
- name: Prepare System
shell: bash
run: |
apt update
apt install -y python3-pip
pip3 install ros-license-toolkit==1.2.2
apt install -y golang-go
go version
go install github.com/google/[email protected]
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
- name: Check for license tags
shell: bash
run: |
find . -type f \( -name "*.py" -o -name "*.cpp" -o -name "*.h" \) -exec "$HOME"/go/bin/addlicense -check {} +
find . -type f \( -name "*.py" -o -name "*.cpp" -o -name "*.h" \) -exec /go/bin/addlicense -check {} +
- name: Run ros_license_toolkit for each Package
shell: bash
run: |
git config --global --add safe.directory /__w/scenario_execution/scenario_execution
git config --global --add safe.directory /__w/scenario-execution/scenario-execution
git config --global --add safe.directory /venvs/ros-license-toolkit
find . -name "package.xml" | while IFS= read -r pkg_file; do
pkg_dir=$(dirname "$pkg_file")
pkg_name=$(basename "$pkg_dir")
Expand All @@ -94,6 +86,6 @@ jobs:
continue
fi
echo "Processing package at $pkg_dir"
ros_license_toolkit "$pkg_dir"
/python_bin/ros_license_toolkit "$pkg_dir"
done

2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: intellabs-01
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
Expand Down
66 changes: 33 additions & 33 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ permissions: read-all
jobs:
build:
#TODO model dependency to image-workflow. Workaround: retrigger run after image-workflow finished.
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -40,9 +40,9 @@ jobs:
key: ${{ runner.os }}-build-${{ github.run_number }}
test-scenario-execution:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -77,9 +77,9 @@ jobs:
path: ./**/TEST.xml
test-scenario-execution-ros:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -112,9 +112,9 @@ jobs:
path: ./**/TEST.xml
scenario-files-validation:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -135,9 +135,9 @@ jobs:
done
test-example-scenario:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -162,9 +162,9 @@ jobs:
path: test_example_scenario/test.xml
test-example-library:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -189,9 +189,9 @@ jobs:
path: test_example_library/test.xml
test-example-variation:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -217,9 +217,9 @@ jobs:
path: test_example_variation/test.xml
test-example-nav2:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -250,9 +250,9 @@ jobs:
path: test_example_nav2/test.xml
test-example-simulation:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -283,9 +283,9 @@ jobs:
path: test_example_simulation/test.xml
test-example-multirobot:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -335,9 +335,9 @@ jobs:
path: test_example_multirobot/**/rosbag*
test-example-external-method:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -364,9 +364,9 @@ jobs:
path: test_example_external_method/test.xml
test-example-moveit2:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -397,10 +397,10 @@ jobs:
path: test_example_moveit2/test.xml
test-scenario-execution-gazebo:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
timeout-minutes: 30
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -430,10 +430,10 @@ jobs:
path: test_scenario_execution_gazebo/test.xml
test-scenario-execution-nav2:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
timeout-minutes: 30
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -476,10 +476,10 @@ jobs:
path: test_scenario_execution_nav2/test_scenario_execution_nav2/example_nav2.mp4
test-scenario-execution-pybullet:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
timeout-minutes: 10
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -506,10 +506,10 @@ jobs:
path: test_scenario_execution_pybullet/test.xml
test-scenario-execution-x11:
needs: [build]
runs-on: intellabs-01
runs-on: ubuntu-latest
timeout-minutes: 3
container:
image: ghcr.io/intellabs/scenario-execution:${{ github.event.pull_request.base.ref }}
image: ghcr.io/cps-test-lab/scenario-execution:${{ github.event.pull_request.base.ref }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -558,7 +558,7 @@ jobs:
- test-scenario-execution-nav2
- test-scenario-execution-pybullet
- test-scenario-execution-x11
runs-on: intellabs-01
runs-on: ubuntu-latest
if: ${{ always() }}
permissions:
checks: write
Expand Down
7 changes: 5 additions & 2 deletions dependencies/scenario_execution_py_trees_ros/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
<name>scenario_execution_py_trees_ros</name>
<version>1.2.0</version>
<description>Fixes in py-trees-ros not yet release</description>
<author email="[email protected]">Intel Labs</author>
<maintainer email="[email protected]">Intel Labs</maintainer>
<author>Intel Labs</author>
<author email="[email protected]">Frederik Pasch</author>
<author email="[email protected]">Florian Mirus</author>
<maintainer email="[email protected]">Frederik Pasch</maintainer>
<maintainer email="[email protected]">Florian Mirus</maintainer>
<license>BSD-3-Clause</license>

<exec_depend>py_trees_ros</exec_depend>
Expand Down
3 changes: 2 additions & 1 deletion examples/example_multi_robot/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<version>1.2.0</version>
<description>Example Multi Robot</description>
<author email="[email protected]">Intel Labs</author>
<maintainer email="[email protected]">Intel Labs</maintainer>
<maintainer email="[email protected]">Frederik Pasch</maintainer>
<maintainer email="[email protected]">Florian Mirus</maintainer>
<license>Apache-2.0</license>

<exec_depend>rclpy</exec_depend>
Expand Down
7 changes: 5 additions & 2 deletions examples/example_scenario_control/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
<name>example_scenario_control</name>
<version>1.2.0</version>
<description>Scenario Execution Example for Scenario Control using RVIZ</description>
<author email="[email protected]">Intel Labs</author>
<maintainer email="[email protected]">Intel Labs</maintainer>
<author>Intel Labs</author>
<author email="[email protected]">Frederik Pasch</author>
<author email="[email protected]">Florian Mirus</author>
<maintainer email="[email protected]">Frederik Pasch</maintainer>
<maintainer email="[email protected]">Florian Mirus</maintainer>
<license>Apache-2.0</license>

<depend>scenario_execution_control</depend>
Expand Down
Loading
Loading