Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions .github/workflows/presubmit_bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
type: string
default: ''

# Additional args used only in `bazel test <args>`:
additional-bazel-test-args:
type: string
default: ''

# Cache configuration identifier used to isolate incompatible build
# configurations (e.g. 'default' vs 'asan') into separate cache keys:
cache-config:
Expand All @@ -26,6 +31,12 @@ on:
type: string
default: '...'

# Optional Mesa GitLab merge request number (e.g. '45927') to patch into
# third_party/mesa before building and testing:
mesa-merge-request-number:
type: string
default: ''

# Whether or not to run the `bazel test` step:
run-tests:
type: boolean
Expand All @@ -48,7 +59,7 @@ on:
host/vulkan:gfxstream_vk_memory_allocation_helper_tests
host/vulkan:vk_common_operations_tests
host/vulkan:vk_format_utils_tests
tests/deqp/...
tests/deqp:deqp_vk_smoke_tests
tests/end2end:gfxstream_end2end_tests

permissions:
Expand All @@ -72,6 +83,22 @@ jobs:
# behind in .git/config.
persist-credentials: false

- name: Apply Mesa merge request patch
if: inputs.mesa-merge-request-number != ''
env:
MESA_MR: ${{ inputs.mesa-merge-request-number }}
run: |
if [[ ! "${MESA_MR}" =~ ^[0-9]+$ ]]; then
echo "Error: mesa-merge-request-number must be numeric, got '${MESA_MR}'" >&2
exit 1
fi
PATCH_NAME="PATCH.mr_${MESA_MR}.patch"
curl -sSfL "https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/${MESA_MR}.patch" \
-o "third_party/mesa/${PATCH_NAME}"
sed -i "s|# PLACEHOLDER_FOR_MESA_MR_PATCH_FILE|\"//third_party/mesa:${PATCH_NAME}\",|" \
third_party/mesa/mesa.MODULE.bazel
git diff third_party/mesa/mesa.MODULE.bazel

- name: Install bazel (Linux)
if: runner.os == 'Linux'
run: sudo bash toolchain/bazel/install_bazel.sh
Expand Down Expand Up @@ -120,9 +147,11 @@ jobs:
env:
TEST_TARGETS: ${{ inputs.test-targets }}
ADDITIONAL_BAZEL_ARGS: ${{ inputs.additional-bazel-args }}
ADDITIONAL_BAZEL_TEST_ARGS: ${{ inputs.additional-bazel-test-args }}
run: |
bazel test $TEST_TARGETS \
--disk_cache=$HOME/bazel-disk-cache \
--test_output=streamed \
--verbose_failures \
$ADDITIONAL_BAZEL_ARGS
$ADDITIONAL_BAZEL_ARGS \
$ADDITIONAL_BAZEL_TEST_ARGS
51 changes: 51 additions & 0 deletions .github/workflows/test_mesa_pr_with_deqp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Test Mesa PR with dEQP

on:
workflow_dispatch:
inputs:
mesa-merge-request-number:
description: 'Mesa GitLab Merge Request number (e.g. 45927)'
required: false
default: ''
type: string
deqp-suite:
description: 'Preset dEQP test suite to run'
required: true
default: 'deqp_vk_smoke_tests'
type: choice
options:
- deqp_vk_smoke_tests
- deqp_vk_descriptor_related_tests
- deqp_vk_image_related_tests
- deqp_vk_memory_related_tests
- deqp_vk_sync_related_tests
custom-deqp-patterns:
description: 'Optional comma-separated dEQP case patterns (overrides preset suite if set)'
required: false
default: ''
type: string
graphics-drivers:
description: 'Host graphics driver configuration'
required: true
default: 'gles_angle_vulkan_lavapipe'
type: choice
options:
- gles_angle_vulkan_lavapipe
- gles_angle_vulkan_swiftshader

permissions:
contents: read

jobs:
run-gfxstream-bazel-deqp-tests:
uses: ./.github/workflows/presubmit_bazel.yml
with:
runner: ubuntu-22.04
mesa-merge-request-number: ${{ inputs.mesa-merge-request-number }}
cache-config: ${{ inputs.graphics-drivers == 'gles_angle_vulkan_lavapipe' && 'lavapipe' || 'swiftshader' }}
build-targets: //tests/deqp:${{ inputs.deqp-suite }}
test-targets: //tests/deqp:${{ inputs.deqp-suite }}
additional-bazel-args: --graphics_drivers=${{ inputs.graphics-drivers }}
additional-bazel-test-args: >-
--test_timeout=3600
${{ inputs.custom-deqp-patterns != '' && format('--test_arg=--deqp_cases={0}', inputs.custom-deqp-patterns) || '' }}
49 changes: 49 additions & 0 deletions tests/deqp/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,52 @@ gfxstream_deqp_vk_test(
name = "deqp_vk_smoke_tests",
deqp_cases = ["dEQP-VK.api.smoke.*"],
)

gfxstream_deqp_vk_test(
name = "deqp_vk_descriptor_related_tests",
size = "enormous",
deqp_cases = [
"dEQP-VK.api.descriptor_pool.*",
"dEQP-VK.api.descriptor_set.*",
"dEQP-VK.api.maintenance3_check.descriptor_set",
"dEQP-VK.api.object_management.multithreaded_*",
"dEQP-VK.binding_model.*",
"dEQP-VK.descriptor_indexing.*",
],
)

gfxstream_deqp_vk_test(
name = "deqp_vk_image_related_tests",
size = "enormous",
deqp_cases = [
"dEQP-VK.api.copy_and_blit.*",
"dEQP-VK.api.image_clearing.*",
"dEQP-VK.image.*",
"dEQP-VK.texture.*",
"dEQP-VK.ycbcr.*",
],
)

gfxstream_deqp_vk_test(
name = "deqp_vk_memory_related_tests",
size = "enormous",
deqp_cases = [
"dEQP-VK.api.buffer_memory_requirements.*",
"dEQP-VK.api.external.memory.*",
"dEQP-VK.api.get_memory_commitment.*",
"dEQP-VK.memory.*",
"dEQP-VK.sparse_resources.*",
],
)

gfxstream_deqp_vk_test(
name = "deqp_vk_sync_related_tests",
size = "enormous",
deqp_cases = [
"dEQP-VK.api.command_buffers.*",
"dEQP-VK.api.external.fence.*",
"dEQP-VK.api.external.semaphore.*",
"dEQP-VK.synchronization.*",
"dEQP-VK.synchronization2.*",
],
)
1 change: 1 addition & 0 deletions third_party/mesa/mesa.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ git_repository(
],
patches = [
"//third_party/mesa:PATCH.0001_disable_vk_envvar_modification_for_testing.patch",
# PLACEHOLDER_FOR_MESA_MR_PATCH_FILE
],
remote = "https://android.googlesource.com/platform/external/mesa3d.git",
)
Expand Down
Loading