|
| 1 | +# Job template for running deadline-cloud-for-maya integration tests on |
| 2 | +# Deadline Cloud Service Managed Fleets. See README.md for usage instructions. |
| 3 | +specificationVersion: jobtemplate-2023-09 |
| 4 | +name: deadline-cloud-for-maya integ tests |
| 5 | +parameterDefinitions: |
| 6 | +# The local checkout of the deadline-cloud-for-maya repository. |
| 7 | +# Uploaded automatically as a job attachment because dataFlow is IN. |
| 8 | +- name: RepoDir |
| 9 | + type: PATH |
| 10 | + objectType: DIRECTORY |
| 11 | + dataFlow: IN |
| 12 | + description: Path to the deadline-cloud-for-maya repository root. |
| 13 | +jobEnvironments: |
| 14 | +# Headless Qt: PySide6 needs a platform plugin to initialize. |
| 15 | +# "offscreen" allows it to run without a display server. |
| 16 | +- name: EnvVars |
| 17 | + variables: |
| 18 | + QT_QPA_PLATFORM: offscreen |
| 19 | +# Shared setup: installs the package, test dependencies, and symlinks |
| 20 | +# the adaptor entry points onto PATH. Runs once per session and applies |
| 21 | +# to all steps. |
| 22 | +- name: SetupTestEnv |
| 23 | + script: |
| 24 | + embeddedFiles: |
| 25 | + - name: Setup |
| 26 | + filename: setup.sh |
| 27 | + type: TEXT |
| 28 | + runnable: true |
| 29 | + data: | |
| 30 | + #!/bin/bash |
| 31 | + set -euo pipefail |
| 32 | +
|
| 33 | + # Install the package (non-editable so entry points are created) |
| 34 | + # and pin numpy<2 for Maya 2026 ABI compatibility. |
| 35 | + mayapy -m pip install '{{Param.RepoDir}}' --force-reinstall |
| 36 | + mayapy -m pip install 'numpy<2' |
| 37 | + mayapy -m pip install -r '{{Param.RepoDir}}/requirements-testing.txt' |
| 38 | + mayapy -m pip install -r '{{Param.RepoDir}}/requirements-integ-testing.txt' |
| 39 | +
|
| 40 | + # pip installs entry points (MayaAdaptor, maya-openjd) into Maya's |
| 41 | + # internal bin dir, which is not on PATH. Symlink them to .env/bin/ |
| 42 | + # so that `openjd run` can find the adaptor binary. |
| 43 | + SCRIPTS_DIR=$(mayapy -c "import sysconfig; print(sysconfig.get_path('scripts'))" 2>/dev/null) |
| 44 | + ENV_BIN=$(dirname $(which mayapy)) |
| 45 | + ln -sf "$SCRIPTS_DIR/MayaAdaptor" "$ENV_BIN/MayaAdaptor" |
| 46 | + ln -sf "$SCRIPTS_DIR/maya-openjd" "$ENV_BIN/maya-openjd" |
| 47 | + actions: |
| 48 | + onEnter: |
| 49 | + command: '{{Env.File.Setup}}' |
| 50 | + timeout: 300 |
| 51 | +steps: |
| 52 | +# Submitter tests: validate that the Maya submitter generates correct job bundles. |
| 53 | +# Requires LD_LIBRARY_PATH for PySide6 (step-scoped to avoid breaking adaptor). |
| 54 | +- name: submitter |
| 55 | + stepEnvironments: |
| 56 | + # PySide6's shiboken6.Shiboken.so needs Qt shared libraries from |
| 57 | + # $MAYA_LOCATION/lib. The Conda Maya package has incomplete RPATH patching |
| 58 | + # for these files. This MUST be step-scoped: setting LD_LIBRARY_PATH |
| 59 | + # job-wide causes adaptor subprocesses to resolve to a broken system Python. |
| 60 | + - name: MayaLibPath |
| 61 | + script: |
| 62 | + embeddedFiles: |
| 63 | + - name: SetLibPath |
| 64 | + filename: set-lib-path.sh |
| 65 | + type: TEXT |
| 66 | + runnable: true |
| 67 | + data: | |
| 68 | + #!/bin/bash |
| 69 | + set -euo pipefail |
| 70 | + echo "openjd_env: LD_LIBRARY_PATH=${MAYA_LOCATION}/lib:${LD_LIBRARY_PATH:-}" |
| 71 | + actions: |
| 72 | + onEnter: |
| 73 | + command: '{{Env.File.SetLibPath}}' |
| 74 | + script: |
| 75 | + embeddedFiles: |
| 76 | + - name: Run |
| 77 | + filename: run.sh |
| 78 | + type: TEXT |
| 79 | + runnable: true |
| 80 | + data: | |
| 81 | + #!/bin/bash |
| 82 | + set -euo pipefail |
| 83 | + cd '{{Param.RepoDir}}' |
| 84 | + mayapy -m pytest test/integ/test_maya_submitters.py -vvv --numprocesses=1 --no-cov -m submitter |
| 85 | + actions: |
| 86 | + onRun: |
| 87 | + command: '{{Task.File.Run}}' |
| 88 | + timeout: 600 |
| 89 | +# Adaptor tests: validate that the Maya adaptor renders scenes correctly |
| 90 | +# with all supported renderers (mayaHardware2, Arnold, V-Ray, Redshift). |
| 91 | +# Pytest is pointed at the specific test file to avoid collecting |
| 92 | +# test_maya_submitters.py, which imports PySide6 at module level. |
| 93 | +- name: adaptor |
| 94 | + script: |
| 95 | + embeddedFiles: |
| 96 | + - name: Run |
| 97 | + filename: run.sh |
| 98 | + type: TEXT |
| 99 | + runnable: true |
| 100 | + data: | |
| 101 | + #!/bin/bash |
| 102 | + set -euo pipefail |
| 103 | + cd '{{Param.RepoDir}}' |
| 104 | + mayapy -m pytest test/integ/test_maya_adaptors.py -vvv --numprocesses=1 --no-cov -m adaptor |
| 105 | + actions: |
| 106 | + onRun: |
| 107 | + command: '{{Task.File.Run}}' |
| 108 | + timeout: 600 |
0 commit comments