diff --git a/.github/workflows/build-usd.yml b/.github/workflows/build-usd.yml index 4d4e828a..a760e972 100644 --- a/.github/workflows/build-usd.yml +++ b/.github/workflows/build-usd.yml @@ -26,6 +26,14 @@ on: required: false type: boolean default: false + run-graphical-tests: + required: false + type: boolean + default: false + upload-test-artifacts: + required: false + type: boolean + default: false jobs: build: @@ -41,6 +49,7 @@ jobs: upload-archive: ${{ inputs.upload-archives }} archive-file-name: "gatling_USD${{ inputs.usd-version }}_Linux_x64.tar.gz" cmake-params: + run-graphical-tests: ${{ inputs.run-grahical-tests }} - name: Ubuntu / clang image: ubuntu-20.04 @@ -49,6 +58,7 @@ jobs: # Don't upload clang build results -- we already have GCC's upload-archive: false cmake-params: -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ + run-graphical-tests: false - name: Windows / MSVC image: windows-2019 @@ -57,6 +67,7 @@ jobs: upload-archive: ${{ inputs.upload-archives }} archive-file-name: "gatling_USD${{ inputs.usd-version }}_Windows_x64.tar.gz" cmake-params: -G"Visual Studio 16 2019" -Ax64 + run-graphical-tests: false uses: ./.github/workflows/build.yml with: @@ -69,3 +80,5 @@ jobs: archive-file-name: ${{ matrix.archive-file-name }} mdl-sdk-cache-key: ${{ inputs.mdl-sdk-cache-key-prefix }}_${{ matrix.image }} cmake-params: ${{ matrix.cmake-params }} + run-grapical-tests: ${{ matrix.run-graphical-tests }} + upload-test-artifacts: ${{ inputs.upload-test-artifacts }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8d4e5a1..5b252426 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,6 +36,14 @@ on: required: false type: boolean default: false + run-graphical-tests: + required: false + type: boolean + default: false + upload-test-artifacts: + required: false + type: boolean + default: false defaults: run: @@ -54,12 +62,39 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + lfs: true - name: Install libgl1 package if: runner.os == 'Linux' # There seems to be a transitive dependency on libGL (perhaps by hgi) run: sudo apt-get update && sudo apt-get install libgl1-mesa-dev + # TODO: fixed/release Mesa version + - name: Install packages + if: inputs.run-graphical-tests + run: | + #sudo add-apt-repository ppa:kisak/kisak-mesa + sudo apt update + sudo apt upgrade + sudo apt-get install mesa-utils xvfb qt5-default libgl1-mesa-dev libvulkan-dev vulkan-tools mesa-vulkan-drivers + + - name: Set up graphical environment variables + if: inputs.run-graphical-tests + run: | + echo "LD_LIBRARY_PATH=${{ inputs.usd-install-path }}/lib" >> $GITHUB_ENV + echo "DISPLAY=:1" >> $GITHUB_ENV + echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV + echo "GALLIUM_DRIVER=llvmpipe" >> $GITHUB_ENV + + - name: Start virtual framebuffer + if: inputs.run-graphical-tests + run: | + Xvfb :1 -screen 0 1280x960x24 & + + - name: Test vulkaninfo + if: inputs.run-graphical-tests + run: vulkaninfo + - name: Fetch USD binaries run: curl ${{ inputs.usd-download-url }} -L -v -o USD.tar.gz @@ -117,6 +152,11 @@ jobs: if: runner.os == 'Windows' run: ./bin/imgio_test.exe + - name: Run hdGatling_test + working-directory: BUILD + if: inputs.run-graphical-tests + run: ./bin/hdGatling_test + - name: Install gatling working-directory: BUILD run: cmake --install . --config ${{ inputs.build-config }} --component hdGatling @@ -134,6 +174,19 @@ jobs: mv hdGatling dso/usd_plugins mv hdGatling* dso/usd + #- name: Create archive + # if: ${{ inputs.run-graphical-tests && inputs.upload-test-artifacts && failure() }} + # working-directory: TEST + # run: tar -zcvf test.zip * + + - name: Upload archive + if: ${{ inputs.run-graphical-tests && inputs.upload-test-artifacts && failure() }} + uses: actions/upload-artifact@v3 + with: + name: test-artifacts + path: TEST/* + retention-days: 7 + - name: Create archive if: inputs.upload-archive working-directory: INSTALL diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index a781348c..47a094a5 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -18,6 +18,7 @@ jobs: usd-version: 24.11 mdl-sdk-cache-key-prefix: ${{ vars.MDL_SDK_CACHE_KEY_PREFIX }} upload-archives: true + run-graphical-tests: true build-usd2408: name: Build gatling for USD v24.08 @@ -27,6 +28,7 @@ jobs: usd-version: 24.08 mdl-sdk-cache-key-prefix: ${{ vars.MDL_SDK_CACHE_KEY_PREFIX }} upload-archives: true + run-graphical-tests: true build-usd2405: name: Build gatling for USD v24.05 diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 14cd6f09..a9ffdffc 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -2,9 +2,9 @@ name: Validation Build on: push: - branches: - - 'master' - - 'dev' + #branches: + # - 'master' + # - 'dev' paths-ignore: - '**.md' - '**.glsl' @@ -23,6 +23,8 @@ jobs: with: usd-version: 24.11 mdl-sdk-cache-key-prefix: ${{ vars.MDL_SDK_CACHE_KEY_PREFIX }} + run-graphical-tests: true + upload-test-artifacts: true build-2408: name: Build gatling for USD v24.08 (Release) @@ -31,6 +33,8 @@ jobs: with: usd-version: 24.08 mdl-sdk-cache-key-prefix: ${{ vars.MDL_SDK_CACHE_KEY_PREFIX }} + run-graphical-tests: true + upload-test-artifacts: true build-2405: name: Build gatling for USD v24.05 (Release)