@@ -48,13 +48,6 @@ name: Docker + Tests
4848on :
4949 pull_request :
5050 types : [opened, synchronize, reopened]
51- paths :
52- - ' source/**'
53- - ' docker/**'
54- - ' tools/**'
55- - ' apps/**'
56- - ' .github/workflows/build.yaml'
57- - ' .github/actions/**'
5851 branches :
5952 - main
6053 - develop
7770 CI_IMAGE_TAG : isaac-lab-ci:${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}-${{ github.sha }}
7871
7972jobs :
73+ changes :
74+ name : Detect Docker Test Changes
75+ runs-on : ubuntu-latest
76+ outputs :
77+ run_docker_tests : ${{ steps.detect.outputs.run_docker_tests }}
78+ steps :
79+ - id : detect
80+ env :
81+ GH_TOKEN : ${{ github.token }}
82+ PR_NUMBER : ${{ github.event.pull_request.number }}
83+ run : |
84+ set -euo pipefail
85+
86+ if [ "${{ github.event_name }}" != "pull_request" ]; then
87+ echo "run_docker_tests=true" >> "$GITHUB_OUTPUT"
88+ exit 0
89+ fi
90+
91+ changed_files="$(gh api --paginate "repos/${{ github.repository }}/pulls/${PR_NUMBER}/files" --jq '.[].filename')"
92+ printf '%s\n' "$changed_files"
93+
94+ # config.yaml controls the base image names and tags consumed by the Docker build jobs.
95+ if printf '%s\n' "$changed_files" | grep -qE '^(source/|docker/|tools/|apps/|\.github/workflows/build\.yaml$|\.github/workflows/config\.yaml$|\.github/actions/)'; then
96+ echo "run_docker_tests=true" >> "$GITHUB_OUTPUT"
97+ else
98+ echo "run_docker_tests=false" >> "$GITHUB_OUTPUT"
99+ fi
100+
80101 config :
81102 name : Load Config
82103 runs-on : ubuntu-latest
@@ -102,7 +123,8 @@ jobs:
102123 build :
103124 name : Build Base Docker Image
104125 runs-on : [self-hosted, gpu]
105- needs : [config]
126+ needs : [changes, config]
127+ if : needs.changes.outputs.run_docker_tests == 'true'
106128 steps :
107129 - name : Checkout Code
108130 uses : actions/checkout@v6
@@ -122,7 +144,8 @@ jobs:
122144 build-curobo :
123145 name : Build cuRobo Docker Image
124146 runs-on : [self-hosted, gpu]
125- needs : [config]
147+ needs : [changes, config]
148+ if : needs.changes.outputs.run_docker_tests == 'true'
126149 steps :
127150 - name : Checkout Code
128151 uses : actions/checkout@v6
@@ -507,6 +530,100 @@ jobs:
507530 container-name : isaac-lab-environments-training-test
508531 # endregion
509532
533+ docker-tests-gate :
534+ name : Docker Tests Gate
535+ runs-on : ubuntu-latest
536+ needs :
537+ - changes
538+ - build
539+ - build-curobo
540+ - test-isaaclab-tasks
541+ - test-isaaclab-tasks-2
542+ - test-isaaclab-tasks-3
543+ - test-isaaclab-core
544+ - test-isaaclab-core-2
545+ - test-isaaclab-core-3
546+ - test-isaaclab-rl
547+ - test-isaaclab-mimic
548+ - test-isaaclab-assets
549+ - test-isaaclab-contrib
550+ - test-isaaclab-teleop
551+ - test-isaaclab-visualizers
552+ - test-isaaclab-newton
553+ - test-isaaclab-physx
554+ - test-isaaclab-ov
555+ - test-curobo
556+ - test-skillgen
557+ - test-environments-training
558+ if : always()
559+ steps :
560+ - name : Check Docker test results
561+ env :
562+ CHANGES_RESULT : ${{ needs.changes.result }}
563+ RUN_DOCKER_TESTS : ${{ needs.changes.outputs.run_docker_tests }}
564+ BUILD_RESULT : ${{ needs.build.result }}
565+ BUILD_CUROBO_RESULT : ${{ needs.build-curobo.result }}
566+ TASKS_1_RESULT : ${{ needs.test-isaaclab-tasks.result }}
567+ TASKS_2_RESULT : ${{ needs.test-isaaclab-tasks-2.result }}
568+ TASKS_3_RESULT : ${{ needs.test-isaaclab-tasks-3.result }}
569+ CORE_1_RESULT : ${{ needs.test-isaaclab-core.result }}
570+ CORE_2_RESULT : ${{ needs.test-isaaclab-core-2.result }}
571+ CORE_3_RESULT : ${{ needs.test-isaaclab-core-3.result }}
572+ RL_RESULT : ${{ needs.test-isaaclab-rl.result }}
573+ MIMIC_RESULT : ${{ needs.test-isaaclab-mimic.result }}
574+ ASSETS_RESULT : ${{ needs.test-isaaclab-assets.result }}
575+ CONTRIB_RESULT : ${{ needs.test-isaaclab-contrib.result }}
576+ TELEOP_RESULT : ${{ needs.test-isaaclab-teleop.result }}
577+ VISUALIZERS_RESULT : ${{ needs.test-isaaclab-visualizers.result }}
578+ NEWTON_RESULT : ${{ needs.test-isaaclab-newton.result }}
579+ PHYSX_RESULT : ${{ needs.test-isaaclab-physx.result }}
580+ OV_RESULT : ${{ needs.test-isaaclab-ov.result }}
581+ CUROBO_RESULT : ${{ needs.test-curobo.result }}
582+ SKILLGEN_RESULT : ${{ needs.test-skillgen.result }}
583+ ENVIRONMENTS_TRAINING_RESULT : ${{ needs.test-environments-training.result }}
584+ run : |
585+ set -euo pipefail
586+
587+ if [ "$CHANGES_RESULT" != "success" ]; then
588+ echo "Change detection failed with result: $CHANGES_RESULT"
589+ exit 1
590+ fi
591+
592+ if [ "$RUN_DOCKER_TESTS" != "true" ]; then
593+ echo "Docker tests are not required for this change."
594+ exit 0
595+ fi
596+
597+ failures=()
598+ [ "$BUILD_RESULT" = "success" ] || failures+=("Build Base Docker Image: $BUILD_RESULT")
599+ [ "$BUILD_CUROBO_RESULT" = "success" ] || failures+=("Build cuRobo Docker Image: $BUILD_CUROBO_RESULT")
600+ [ "$TASKS_1_RESULT" = "success" ] || failures+=("isaaclab_tasks [1/3]: $TASKS_1_RESULT")
601+ [ "$TASKS_2_RESULT" = "success" ] || failures+=("isaaclab_tasks [2/3]: $TASKS_2_RESULT")
602+ [ "$TASKS_3_RESULT" = "success" ] || failures+=("isaaclab_tasks [3/3]: $TASKS_3_RESULT")
603+ [ "$CORE_1_RESULT" = "success" ] || failures+=("isaaclab (core) [1/3]: $CORE_1_RESULT")
604+ [ "$CORE_2_RESULT" = "success" ] || failures+=("isaaclab (core) [2/3]: $CORE_2_RESULT")
605+ [ "$CORE_3_RESULT" = "success" ] || failures+=("isaaclab (core) [3/3]: $CORE_3_RESULT")
606+ [ "$RL_RESULT" = "success" ] || failures+=("isaaclab_rl: $RL_RESULT")
607+ [ "$MIMIC_RESULT" = "success" ] || failures+=("isaaclab_mimic: $MIMIC_RESULT")
608+ [ "$ASSETS_RESULT" = "success" ] || failures+=("isaaclab_assets: $ASSETS_RESULT")
609+ [ "$CONTRIB_RESULT" = "success" ] || failures+=("isaaclab_contrib: $CONTRIB_RESULT")
610+ [ "$TELEOP_RESULT" = "success" ] || failures+=("isaaclab_teleop: $TELEOP_RESULT")
611+ [ "$VISUALIZERS_RESULT" = "success" ] || failures+=("isaaclab_visualizers: $VISUALIZERS_RESULT")
612+ [ "$NEWTON_RESULT" = "success" ] || failures+=("isaaclab_newton: $NEWTON_RESULT")
613+ [ "$PHYSX_RESULT" = "success" ] || failures+=("isaaclab_physx: $PHYSX_RESULT")
614+ [ "$OV_RESULT" = "success" ] || failures+=("isaaclab_ov: $OV_RESULT")
615+ [ "$CUROBO_RESULT" = "success" ] || failures+=("test-curobo: $CUROBO_RESULT")
616+ [ "$SKILLGEN_RESULT" = "success" ] || failures+=("test-skillgen: $SKILLGEN_RESULT")
617+ [ "$ENVIRONMENTS_TRAINING_RESULT" = "success" ] || failures+=("environments_training: $ENVIRONMENTS_TRAINING_RESULT")
618+
619+ if [ "${#failures[@]}" -gt 0 ]; then
620+ printf 'Docker checks did not pass:\n'
621+ printf ' - %s\n' "${failures[@]}"
622+ exit 1
623+ fi
624+
625+ echo "Docker checks passed."
626+
510627# region disabled quarantined tests
511628# test-quarantined:
512629# name: "Quarantined Tests"
0 commit comments