Set Up Continuous Integration
Continuous Integration validates your Objectives on every pull request. A deployment pipeline can also start Objectives on a robot after it installs a release.
The examples use GitHub Actions, but the patterns translate directly to GitLab, Jenkins, or any other CI host.
Continuous Integration
Building a workspace and validating its Objectives needs no license. Tests that start MoveIt Pro, such as Objective integration tests, need a license key and a computer that MoveIt Pro can bind the license to.
Build and validate without a license
The MoveIt Pro image builds your workspace and checks every Objective's XML without a license key, so this job runs on any runner, GitHub-hosted included:
jobs:
build:
runs-on: ubuntu-24.04
container:
image: picknikciuser/moveit-pro:10.2.1-jazzy
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Validate Objectives
run: |
. /opt/ros/jazzy/setup.bash
. /opt/overlay_ws/install/setup.bash
shopt -s globstar nullglob
status=0
for objective in src/**/objectives/**/*.xml; do
ros2 run moveit_studio_agent moveit_pro_objective_validator \
--level structural_lint --target-id ci --xml-file "$objective" \
|| { echo "Invalid Objective: $objective"; status=1; }
done
exit $status
- name: Build
run: |
. /opt/ros/jazzy/setup.bash
. /opt/overlay_ws/install/setup.bash
apt-get update
rosdep update
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install
The loop covers every objectives directory in the workspace, including nested libraries, and passes when the workspace has no Objectives of its own. The validator prints one JSON result per file and exits non-zero when the XML does not parse or is not a valid Objective. It checks structure only, not that every Behavior an Objective names is installed. It complements building and testing the workspace, so a workspace with custom Behaviors still needs the licensed tests below.
A standard hosted runner has little disk left after it pulls the MoveIt Pro image. For a large workspace:
- Run the build in the
picknikciuser/moveit-procontainer, as above, rather than building a derived image. - Build and test only what you need, for example by passing
--packages-up-to <config_package>to bothcolcon buildandcolcon test. - Add a
df -hstep before the build. If the build fails withNo space left on device, use a larger runner.
On billed runners, skip runs that cannot change the result. Filter on the paths that hold your packages and workflows, and skip draft pull requests:
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "src/**"
- ".github/workflows/**"
jobs:
build:
if: ${{ !github.event.pull_request.draft }}
A workflow that paths filters out never reports its checks, so GitHub blocks a pull request that requires them. Leave paths off workflows whose jobs are required status checks.
Run licensed tests
Tests that start MoveIt Pro read the license key from MOVEIT_LICENSE_KEY and bind it to the runner's hardware identity, as described in Configure Licensing. Store the key as the repository secret MOVEIT_LICENSE_KEY. GitHub does not pass secrets to workflows triggered by pull requests from forks, so a licensed job fails on them. To skip it there instead, add if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository to the job.
A Developer license key activated successfully on a GitHub-hosted ubuntu-24.04 runner with picknikciuser/moveit-pro:10.2.0-jazzy in three test runs. This does not guarantee activation on every hosted runner: MoveIt Pro needs a TPM 2.0 or a permanent network interface address that it can use as a hardware identity. Mount the host's /sys and set MOVEIT_HOST_SYSFS=/host/sys so MoveIt Pro can read the interface's permanent address. In those tests, activation failed without the mount with No machine-unique hardware identity is available. If the runner exposes neither identity source, use a self-hosted runner with the hardware described below.
jobs:
integration-test:
runs-on: ubuntu-24.04
container:
image: picknikciuser/moveit-pro:10.2.1-jazzy
volumes:
- /sys:/host/sys:ro
env:
MOVEIT_LICENSE_KEY: ${{ secrets.MOVEIT_LICENSE_KEY }}
MOVEIT_HOST_SYSFS: /host/sys
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
# Simulation meshes are usually stored in Git LFS.
lfs: true
- name: Build and test
run: |
export USER_WS="$GITHUB_WORKSPACE"
. /opt/ros/jazzy/setup.bash
. /opt/overlay_ws/install/setup.bash
apt-get update
rosdep update
rosdep install --from-paths src --ignore-src -r -y
colcon build --symlink-install
. install/setup.bash
colcon test --executor sequential
colcon test-result --verbose
Each hosted job runs on a new virtual machine, so it presents a new hardware identity:
- A Developer license key holds one floating seat for each running job and releases it when MoveIt Pro shuts down cleanly. Jobs that run in parallel need one seat each. A cancelled or timed-out job can hold its seat until the lease expires, about an hour later.
- A Runtime license key is node-locked, so each hosted job would register another activation. Do not use a Runtime license key on hosted runners.
A standard hosted runner has no GPU, so simulation cameras render in software. Camera-heavy simulation tests can time out there. Run them on a larger or self-hosted runner.
Keep one hardware identity on a self-hosted runner
To reuse one activation across runs, run the job on a self-hosted runner on a computer with a TPM 2.0 or a permanent hardware network interface. Give the job container the hardware access and licensing directories from Configure a Linux Container. These are the lines that change in the job above:
runs-on: [self-hosted, moveit-pro]
container:
# Omit on a computer without a TPM.
options: --device /dev/tpmrm0:/dev/tpmrm0
volumes:
- /sys:/host/sys:ro
- /opt/moveit_pro/licensing:/opt/moveit_pro/licensing
- /var/lib/moveit-pro-ci:/var/lib/moveit-pro-ci
env:
MOVEIT_CONTAINER_DATA_DIR: /var/lib/moveit-pro-ci
The job runs pull request code as root with write access to the licensing directory, whether or not it receives the secret. Run it only for trusted branches, and not for pull requests from forks.
For more concurrent seats, or for a license for ephemeral runners other than a Developer license key, contact support@picknik.ai.
Start Objectives from a deployment pipeline
A deployment pipeline that installs a MoveIt Pro release on a robot can start an Objective afterward by sending a goal to the /do_objective action from a ROS 2 client on the robot network. See Run an Existing Objective for an rclpy client and the ros2 action send_goal command line.