Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
pablode committed Nov 30, 2024
1 parent a78c982 commit b7d1aec
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 7 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/build-usd-with-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build gatling for USD (with Tests)

on:
workflow_call:
outputs:
archive-name:
description: "Name of the archive containing the build artifacts"
value: build-${{ inputs.build-config }}-${{ github.sha }}
inputs:
build-config:
description: "Name of the CMake build configuration"
required: false
type: string
default: "Release"
usd-version:
description: "Name of the USD release, in the form 'XX.XX'"
required: true
type: string
mdl-sdk-cache-key-prefix:
description: "Prefix of the MDL SDK cache key"
required: false
type: string
default: "MDL-SDK"
# TODO: upload test results instead
upload-archives:
description: "Whether build results should be uploaded or not"
required: false
type: boolean
default: false

jobs:
build:
name: Build USD v${{ inputs.usd-version }} for ${{ matrix.name }} (${{ inputs.build-config }}) with Tests

strategy:
matrix:
include:
- name: Ubuntu / GCC
image: ubuntu-20.04
usd-download-url: "https://github.com/pablode/USD/releases/download/v${{ inputs.usd-version }}-ci-release/USD${{ inputs.usd-version }}_Linux_x64.tar.gz"
usd-install-path: "/home/runner/work/USD/USD/INSTALL"
upload-archive: ${{ inputs.upload-archives }}
archive-file-name: "gatling_USD${{ inputs.usd-version }}_Linux_x64.tar.gz"
run-tests: true

uses: ./.github/workflows/build.yml
with:
image: ${{ matrix.image }}
build-config: ${{ inputs.build-config }}
usd-download-url: ${{ matrix.usd-download-url }}
usd-install-path: ${{ matrix.usd-install-path }}
upload-archive: ${{ matrix.upload-archive }}
archive-name: tests-${{ inputs.build-config }}-${{ github.sha }}
archive-file-name: ${{ matrix.archive-file-name }}
mdl-sdk-cache-key: ${{ inputs.mdl-sdk-cache-key-prefix }}_${{ matrix.image }}
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ on:
required: false
type: boolean
default: false
run-tests:
required: false
type: boolean
default: false

defaults:
run:
Expand All @@ -60,6 +64,36 @@ jobs:
# There seems to be a transitive dependency on libGL (perhaps by hgi)
run: sudo apt-get update && sudo apt-get install libgl1-mesa-dev

- name: Install packages
if: inputs.run-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-tests
run: |
echo "LD_LIBRARY_PATH=${{ inputs.usd-install-path }}/lib" >> $GITHUB_ENV
echo "DISPLAY=:1" >> $GITHUB_ENV
#echo "VK_LOADER_DEBUG=all" >> $GITHUB_ENV
echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV
echo "GALLIUM_DRIVER=llvmpipe" >> $GITHUB_ENV
- name: Start virtual framebuffer
if: inputs.run-tests
run: |
Xvfb :1 -screen 0 1280x960x24 &
- name: Test glxinfo
if: inputs.run-tests
run: glxinfo

- name: Test vulkaninfo
if: inputs.run-tests
run: vulkaninfo

- name: Fetch USD binaries
run: curl ${{ inputs.usd-download-url }} -L -v -o USD.tar.gz

Expand Down Expand Up @@ -117,6 +151,12 @@ jobs:
if: runner.os == 'Windows'
run: ./bin/imgio_test.exe

# TODO: should rename run-tests to run-graphical-tests
- name: Run hdGatling_test
working-directory: BUILD
if: inputs.run-tests
run: ./bin/hdGatling_test

- name: Install gatling
working-directory: BUILD
run: cmake --install . --config ${{ inputs.build-config }} --component hdGatling
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Validation Build

on:
push:
branches:
- 'master'
- 'dev'
#branches:
# - 'master'
# - 'dev'
paths-ignore:
- '**.md'
- '**.glsl'
Expand All @@ -19,31 +19,31 @@ jobs:
build-2411:
name: Build gatling for USD v24.11 (Release)
needs: build-mdl-sdk
uses: ./.github/workflows/build-usd.yml
uses: ./.github/workflows/build-usd-with-tests.yml
with:
usd-version: 24.11
mdl-sdk-cache-key-prefix: ${{ vars.MDL_SDK_CACHE_KEY_PREFIX }}

build-2408:
name: Build gatling for USD v24.08 (Release)
needs: build-mdl-sdk
uses: ./.github/workflows/build-usd.yml
uses: ./.github/workflows/build-usd-with-tests.yml
with:
usd-version: 24.08
mdl-sdk-cache-key-prefix: ${{ vars.MDL_SDK_CACHE_KEY_PREFIX }}

build-2405:
name: Build gatling for USD v24.05 (Release)
needs: build-mdl-sdk
uses: ./.github/workflows/build-usd.yml
uses: ./.github/workflows/build-usd-with-tests.yml
with:
usd-version: 24.05
mdl-sdk-cache-key-prefix: ${{ vars.MDL_SDK_CACHE_KEY_PREFIX }}

build-2403:
name: Build gatling for USD v24.03 (Release)
needs: build-mdl-sdk
uses: ./.github/workflows/build-usd.yml
uses: ./.github/workflows/build-usd-with-tests.yml
with:
usd-version: 24.03
mdl-sdk-cache-key-prefix: ${{ vars.MDL_SDK_CACHE_KEY_PREFIX }}

0 comments on commit b7d1aec

Please sign in to comment.