Skip to content

Remove video from residency and allocator APIs. #942

Remove video from residency and allocator APIs.

Remove video from residency and allocator APIs. #942

name: Windows x64 GN/Clang (Release)
permissions: read-all
on:
# This is a required workflow specified in branch enforcement
# and must run unconditionally to allow merges.
push:
pull_request:
jobs:
win_clang_rel_x64:
runs-on: windows-2019
steps:
- name: Git config
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Install depot_tools
shell: cmd
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ..\depot_tools
set "PATH=%CD%\..\depot_tools;%PATH%"
gclient
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.x'
- uses: actions/checkout@v2
with:
ref: main
path: base
fetch-depth: 0
- name: Sync code for main branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd base
copy scripts\standalone.gclient .gclient
gclient sync
- name: Generate project for main branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd base
gn gen out\Release --args="is_debug=false gpgmm_force_tracing=true"
- name: Build for main branch
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd base
ninja -C out\Release
- name: Run gpgmm_end2end_tests
shell: cmd
run: |
cd base
out\Release\gpgmm_end2end_tests.exe --gtest_filter=-*NoLeak --gtest_output=json:${{ github.workspace }}\..\baseline_end2end_tests.json
- name: Run gpgmm_unittests
shell: cmd
run: |
cd base
out\Release\gpgmm_unittests.exe --gtest_output=json:${{ github.workspace }}\..\baseline_unittests.json
- name: Run gpgmm_capture_replay_tests
shell: cmd
run: |
cd base
out\Release\gpgmm_capture_replay_tests.exe --gtest_output=json:${{ github.workspace }}\..\baseline_capture_replay_tests.json
- uses: actions/checkout@v2
with:
path: test
fetch-depth: 0
- name: Sync code for main branch (with patch)
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd test
copy scripts\standalone.gclient .gclient
gclient sync
- name: Generate shared library for main branch (with patch)
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd test
gn gen out\Release --args="is_debug=false gpgmm_shared_library=true"
- name: Build shared library for main branch (with patch)
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd test
ninja -C out\Release gpgmm
- name: Generate project for main branch (with patch)
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd test
gn gen out\Release --args="is_debug=false gpgmm_force_tracing=true"
- name: Build for main branch (with patch)
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd test
ninja -C out\Release
- name: Run gpgmm_end2end_tests (with patch)
timeout-minutes: 10
shell: cmd
run: |
cd test
out\Release\gpgmm_end2end_tests.exe --gtest_filter=-*NoLeak --gtest_output=json:${{ github.workspace }}\..\test_end2end_tests.json
- name: Run gpgmm_end2end_tests runtime leak checks (with patch)
timeout-minutes: 10
shell: cmd
run: |
cd test
out\Release\gpgmm_end2end_tests.exe --no-leaks 2>&1
- name: Run gpgmm_end2end_tests no leak tests (with patch)
timeout-minutes: 10
shell: cmd
run: |
cd test
out\Release\gpgmm_end2end_tests.exe --gtest_filter=*NoLeak --check-device-leaks 2>&1
- name: Run gpgmm_unittests (with patch)
shell: cmd
run: |
cd test
out\Release\gpgmm_unittests.exe --gtest_output=json:${{ github.workspace }}\..\test_unittests.json
- name: Run gpgmm_capture_replay_tests (with patch)
shell: cmd
run: |
cd test
out\Release\gpgmm_capture_replay_tests.exe --gtest_output=json:${{ github.workspace }}\..\test_capture_replay_tests.json
- name: Run gpgmm_capture_replay_tests to generate capture (with patch)
shell: cmd
run: |
cd test
out\Release\gpgmm_capture_replay_tests.exe --gtest_filter=*Replay/* --event-mask=0x3 --ignore-caps-mismatch --disable-memory-playback
- name: Run gpgmm_capture_replay_tests to playback capture (with patch)
shell: cmd
run: |
cd test
out\Release\gpgmm_capture_replay_tests.exe --gtest_filter=*Replay/*
- name: Regression check end2end tests
run: |
python test\scripts\regression_check.py ${{ github.workspace }}\..\baseline_end2end_tests.json ${{ github.workspace }}\..\test_end2end_tests.json
- name: Regression check unittests
run: |
python test\scripts\regression_check.py ${{ github.workspace }}\..\baseline_unittests.json ${{ github.workspace }}\..\test_unittests.json
- name: Regression check capture replay tests
run: |
python test\scripts\regression_check.py ${{ github.workspace }}\..\baseline_capture_replay_tests.json ${{ github.workspace }}\..\test_capture_replay_tests.json
- name: Generate fuzzer for main branch (with patch)
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd test
gn gen out\Fuzzer --args="is_debug=false gpgmm_use_fuzzing_engine=true use_libfuzzer=true is_asan=true"
- name: Build fuzzer for main branch (with patch)
shell: cmd
run: |
set "PATH=%CD%\..\depot_tools;%PATH%"
set "DEPOT_TOOLS_WIN_TOOLCHAIN=0"
cd test
ninja -C out\Fuzzer
- name: Run gpgmm_d3d12_resource_allocator_fuzzer (with patch)
timeout-minutes: 3
shell: cmd
run: |
cd test
out\Fuzzer\gpgmm_d3d12_resource_allocator_fuzzer.exe -max_total_time=120 -timeout=10
# Workaround libFuzzer never exiting when max_total_time by using -runs instead.
# Timeout may need to be increased to not expire before the process exits.
- uses: nick-fields/retry@v2
id: d3d12_residency_manager_fuzzer
with:
timeout_minutes: 1
max_attempts: 3
retry_on: timeout
shell: cmd
command: |
cd test
out\Fuzzer\gpgmm_d3d12_residency_manager_fuzzer.exe -runs=20000
- uses: nick-fields/assert-action@v1
with:
expected: 0
actual: ${{ steps.d3d12_residency_manager_fuzzer.outputs.exit_code }}
- uses: actions/upload-artifact@v3
with:
name: fuzzer-test-reproducer
path: test/(crash|oom|leak|timeout)-.*