@@ -215,6 +215,7 @@ jobs:
215215 nametag : ${{ matrix.nametag || 'unnamed!' }}
216216 runner : ${{ matrix.runner || 'ubuntu-latest' }}
217217 container : ${{ matrix.container }}
218+ container_options : ${{ matrix.container_options }}
218219 cc_compiler : ${{ matrix.cc_compiler || 'gcc' }}
219220 cxx_compiler : ${{ matrix.cxx_compiler || 'g++' }}
220221 cxx_std : ${{ matrix.cxx_std || '17' }}
@@ -567,6 +568,7 @@ jobs:
567568 nametag : ${{ matrix.nametag || 'unnamed!' }}
568569 runner : ${{ matrix.runner }}
569570 container : ${{ matrix.container }}
571+ container_options : ${{ matrix.container_options }}
570572 cc_compiler : ${{ matrix.cc_compiler || 'clang' }}
571573 cxx_compiler : ${{ matrix.cxx_compiler || 'clang++' }}
572574 cxx_std : ${{ matrix.cxx_std || '17' }}
@@ -636,6 +638,7 @@ jobs:
636638 nametag : ${{ matrix.nametag || 'unnamed!' }}
637639 runner : ${{ matrix.runner }}
638640 container : ${{ matrix.container }}
641+ container_options : ${{ matrix.container_options }}
639642 cc_compiler : ${{ matrix.cc_compiler }}
640643 cxx_compiler : ${{ matrix.cxx_compiler }}
641644 cxx_std : ${{ matrix.cxx_std || '17' }}
@@ -715,185 +718,51 @@ jobs:
715718 linux-optix :
716719 if : ${{ ! contains(github.ref, 'windows-only') && ! contains(github.ref, 'macos-only') }}
717720 name : " ${{matrix.desc}}"
718- # name: "${{matrix.cxx_compiler}} c++${{matrix.cxx_std}} py${{matrix.python_ver}}"
721+ uses : ./.github/workflows/build-steps.yml
722+ with :
723+ nametag : ${{ matrix.nametag || 'unnamed!' }}
724+ runner : ${{ matrix.runner || 'ubuntu-latest' }}
725+ container : ${{ matrix.container }}
726+ container_options : ${{ matrix.container_options }}
727+ cc_compiler : ${{ matrix.cc_compiler || 'gcc' }}
728+ cxx_compiler : ${{ matrix.cxx_compiler || 'g++' }}
729+ cxx_std : ${{ matrix.cxx_std || '17' }}
730+ build_type : ${{ matrix.build_type || 'Release' }}
731+ depcmds : ${{ matrix.depcmds }}
732+ extra_artifacts : ${{ matrix.extra_artifacts }}
733+ fmt_ver : ${{ matrix.fmt_ver }}
734+ opencolorio_ver : ${{ matrix.opencolorio_ver }}
735+ openexr_ver : ${{ matrix.openexr_ver }}
736+ openimageio_ver : ${{ matrix.openimageio_ver }}
737+ pybind11_ver : ${{ matrix.pybind11_ver }}
738+ python_ver : ${{ matrix.python_ver }}
739+ setenvs : ${{ matrix.setenvs }}
740+ simd : ${{ matrix.simd }}
741+ batched : ${{ matrix.batched }}
742+ skip_build : ${{ matrix.skip_build }}
743+ skip_tests : ${{ matrix.skip_tests }}
744+ abi_check : ${{ matrix.abi_check }}
745+ build_docs : ${{ matrix.build_docs }}
746+ generator : ${{ matrix.generator }}
747+ ctest_args : ${{ matrix.ctest_args }}
748+ ctest_test_timeout : ${{ matrix.ctest_test_timeout || '800' }}
749+ coverage : ${{ matrix.coverage || 0 }}
750+ sonar : ${{ matrix.sonar || 0 }}
751+ llvm_action_ver : ${{ matrix.llvm_action_ver }}
752+ clang_format : ${{ matrix.clang_format }}
719753 strategy :
720754 fail-fast : false
721755 matrix :
722756 include :
723- # - desc: VP2023 GPU Cuda11 gcc11/C++17 llvm15 py3.10 OIIO-main avx2
724- # nametag: linux-optix7-2023
725- # runner: ubuntu-latest
726- # container: aswftesting/ci-osl:2023-clang15
727- # cxx_std: 17
728- # openimageio_ver: main
729- # python_ver: "3.10"
730- # pybind11_ver: v2.10.0
731- # simd: avx2,f16c
732- # skip_tests: 1
733- # setenvs: export OSL_CMAKE_FLAGS="-DOSL_USE_OPTIX=1"
734- # OPTIX_VERSION=7.0.0
735- # OPENIMAGEIO_CMAKE_FLAGS=-DBUILD_FMT_VERSION=9.1.0
736-
737- # runner: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-22.04-8c-32g-300h') || 'ubuntu-latest' }}
738-
739- # Failures so far:
740-
741- # with 'ubuntu-20.04-gpu-t4-4c-16g-176h'
742757 - desc : VP2025 gcc11/C++17 llvm19 py3.11 oiio-rel avx2
743758 nametag : linux-optix-vfx2025
744- # runner: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-gpu-t4-4c-16g-176h') || 'ubuntu-latest' }}
759+ runner : ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-gpu-t4-4c-16g-176h') || 'ubuntu-latest' }}
745760 container : aswf/ci-osl:2025
746- # container_options: --gpus "all,\"capabilities =compute,utility\""
761+ container_options : -e NVIDIA_DRIVER_CAPABILITIES =compute,graphics, utility --gpus all
747762 cxx_std : 17
748763 python_ver : " 3.11"
749764 pybind11_ver : v2.11.1
750765 simd : avx2,f16c
751766 setenvs : export OSL_CMAKE_FLAGS="-DOSL_USE_OPTIX=1"
752767 OPTIX_VERSION=8.0.0
753768 OPENIMAGEIO_CMAKE_FLAGS=-DBUILD_FMT_VERSION=9.1.0
754-
755- runs-on : ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-gpu-t4-4c-16g-176h') || 'ubuntu-latest' }}
756- container :
757- image : ${{ matrix.container }}
758- options : -e NVIDIA_DRIVER_CAPABILITIES=compute,graphics,utility --gpus all
759-
760- env :
761- CXX : ${{matrix.cxx_compiler}}
762- CC : ${{matrix.cc_compiler}}
763- CMAKE_BUILD_TYPE : ${{matrix.build_type}}
764- CMAKE_CXX_STANDARD : ${{matrix.cxx_std}}
765- CMAKE_GENERATOR : ${{matrix.generator}}
766- CTEST_ARGS : ${{matrix.ctest_args}}
767- CTEST_TEST_TIMEOUT : ${{matrix.ctest_test_timeout}}
768- USE_SIMD : ${{matrix.simd}}
769- FMT_VERSION : ${{matrix.fmt_ver}}
770- OPENCOLORIO_VERSION : ${{matrix.opencolorio_ver}}
771- OPENEXR_VERSION : ${{matrix.openexr_ver}}
772- OPENIMAGEIO_VERSION : ${{matrix.openimageio_ver}}
773- PYBIND11_VERSION : ${{matrix.pybind11_ver}}
774- PYTHON_VERSION : ${{matrix.python_ver}}
775- USE_BATCHED : ${{matrix.batched}}
776- ABI_CHECK : ${{matrix.abi_check}}
777- ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION : node16
778- ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
779-
780- steps :
781- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
782- with :
783- fetch-depth : ' 0'
784- - name : Prepare ccache timestamp
785- id : ccache_cache_keys
786- shell : bash
787- run : echo "date=`date -u +'%Y-%m-%dT%H:%M:%SZ'`" >> $GITHUB_OUTPUT
788- - name : ccache-restore
789- id : ccache-restore
790- uses : actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
791- with :
792- path : ./ccache
793- key : ${{github.job}}-${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
794- restore-keys : ${{github.job}}-
795- - name : Build setup
796- shell : bash
797- run : |
798- ${{matrix.setenvs}}
799- src/build-scripts/ci-startup.bash
800- - name : Install LLVM and Clang
801- if : matrix.llvm_action_ver != ''
802- uses : KyleMayes/install-llvm-action@6ba6e2cd3813def9879be378609d87cb3ef3bac3 # v2.0.6
803- with :
804- version : ${{ matrix.llvm_action_ver }}
805- - name : Dependencies
806- shell : bash
807- run : |
808- ${{matrix.depcmds}}
809- if [[ "$RUNNER_OS" == "Linux" ]]; then
810- src/build-scripts/gh-installdeps.bash
811- elif [[ "$RUNNER_OS" == "macOS" ]]; then
812- src/build-scripts/install_homebrew_deps.bash
813- if [[ "$OPENIMAGEIO_VERSION" != "" ]] ; then \
814- OPENIMAGEIO_CMAKE_FLAGS="-DOIIO_BUILD_TESTS=0 -DUSE_OPENGL=0 -DCMAKE_UNITY_BUILD=ON" ; \
815- source src/build-scripts/build_openimageio.bash ; \
816- else \
817- brew install --display-times -q openimageio ; \
818- PYTHONPATH=$PYTHONPATH:/usr/local/lib/python${PYTHON_VERSION}/site-packages ; \
819- fi
820- src/build-scripts/save-env.bash
821- elif [[ "$RUNNER_OS" == "Windows" ]]; then
822- src/build-scripts/gh-win-installdeps.bash
823- fi
824- - name : Install sonar-scanner and build-wrapper
825- if : matrix.sonar == '1'
826- uses : sonarsource/sonarcloud-github-c-cpp@e4882e1621ad2fb48dddfa48287411bed34789b1 # v2.0.2
827- - name : Build
828- if : matrix.skip_build != '1'
829- shell : bash
830- run : src/build-scripts/ci-build.bash
831- - name : Testsuite
832- if : matrix.skip_tests != '1'
833- shell : bash
834- run : src/build-scripts/ci-test.bash
835- - name : clang-format
836- if : matrix.clang_format == '1'
837- shell : bash
838- run : src/build-scripts/run-clang-format.bash
839- - name : Code coverage
840- if : matrix.coverage == '1'
841- run : src/build-scripts/ci-coverage.bash
842- - name : Sonar-scanner
843- if : matrix.sonar == 1
844- env :
845- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
846- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
847- run : |
848- which sonar-scanner
849- ls -l /__w/OpenShadingLanguage/OpenShadingLanguage/bw_output
850- echo "BUILD_OUTPUT_DIR is " "${{ env.BUILD_WRAPPER_OUT_DIR }}"
851- find . -name "*.gcov" -print
852- # sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"
853- time sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.build-wrapper-output="$BUILD_WRAPPER_OUT_DIR" --define sonar.cfamily.gcov.reportsPath="_coverage" --define sonar.cfamily.threads="$PARALLEL"
854- # Consult https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarscanner-cli/ for more information and options
855- - name : Check out ABI standard
856- if : matrix.abi_check != ''
857- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
858- with :
859- ref : ${{matrix.abi_check}}
860- path : abi_standard
861- - name : Build ABI standard
862- if : matrix.abi_check != ''
863- shell : bash
864- run : |
865- mkdir -p abi_standard/build
866- pushd abi_standard
867- src/build-scripts/ci-build.bash
868- popd
869- - name : Check ABI
870- if : matrix.abi_check != ''
871- shell : bash
872- run : |
873- src/build-scripts/ci-abicheck.bash ./build abi_standard/build \
874- liboslexec liboslcomp liboslquery liboslnoise
875- - name : Build Docs
876- if : matrix.build_docs == '1'
877- shell : bash
878- run : |
879- cd src/doc
880- time make doxygen
881- time make sphinx
882- - uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
883- if : ${{ failure() || matrix.build_docs == '1'}}
884- with :
885- name : osl-${{github.job}}-${{matrix.nametag}}
886- path : |
887- build/cmake-save
888- build/compat_reports
889- build/sphinx
890- build/*.cmake
891- build/CMake*
892- build/testsuite/*/*.*
893- ${{ matrix.extra_artifacts }}
894- - name : ccache-save
895- id : ccache-save
896- uses : actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
897- with :
898- path : ./ccache
899- key : ${{github.job}}-${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
0 commit comments