tests: Rewrite test conversion tooling with additional capabilities #204
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2021-2023 The Khronos Group Inc. | |
# Copyright (c) 2021-2023 Valve Corporation | |
# Copyright (c) 2021-2023 LunarG, Inc. | |
# Copyright (c) 2023-2023 RasterGrid Kft. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: VVL (Build/Tests) - Vulkan SC | |
# https://docs.github.com/en/actions/using-jobs/using-concurrency | |
concurrency: | |
# github.head_ref is only defined on pull_request | |
# Fallback to the run ID, which is guaranteed to be both unique and defined for the run. | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches-ignore: | |
- main | |
pull_request: | |
branches: | |
- sc_main | |
jobs: | |
linux: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
cc: [gcc, clang] | |
cxx: [g++, clang++] | |
config: [debug, release] | |
exclude: | |
- cc: gcc | |
cxx: clang++ | |
- cc: clang | |
cxx: g++ | |
- cc: clang | |
config: debug | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: lukka/get-cmake@latest | |
with: | |
cmakeVersion: 3.17.2 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install build dependencies | |
run: | | |
python3 -m pip install jsonschema pyparsing | |
sudo apt-get -qq update | |
sudo apt-get install -y libwayland-dev xorg-dev | |
# Turn on ccache this way, which is easier than figuring out how to turn it on for all deps | |
# PATH changes need to be done in an action before any action that needs it | |
- name: Add ccache to PATH | |
run: echo "/usr/lib/ccache" >> $GITHUB_PATH | |
- name: Set PYTHONPATH | |
run: echo "PYTHONPATH=$GITHUB_WORKSPACE/external/${{ matrix.config }}/Vulkan-Headers/registry:$PYTHONPATH" >> $GITHUB_ENV | |
- name: Build VulkanSC-ValidationLayers | |
run: | | |
echo "PYTHONPATH = $PYTHONPATH" | |
python3 scripts/vksc_github_ci.py --build --config ${{ matrix.config }} --cmake='-DVVL_ENABLE_ASAN=ON' | |
env: | |
CC: ${{ matrix.cc }} | |
CXX: ${{ matrix.cxx }} | |
- name: Test VulkanSC-ValidationLayers - Min Core | |
run: python3 scripts/vksc_github_ci.py --test --config ${{ matrix.config }} | |
env: | |
VKSC_DEVSIM_PROFILE_FILE: ${{ github.workspace }}/tests/vulkansc/device_profiles/min_core.json | |
- name: Test VulkanSC-ValidationLayers - Max Core | |
run: python3 scripts/vksc_github_ci.py --test --config ${{ matrix.config }} | |
env: | |
VKSC_DEVSIM_PROFILE_FILE: ${{ github.workspace }}/tests/vulkansc/device_profiles/max_core.json | |
- name: Test VulkanSC-ValidationLayers - Max Profile | |
run: python3 scripts/vksc_github_ci.py --test --config ${{ matrix.config }} | |
env: | |
VKSC_DEVSIM_PROFILE_FILE: ${{ github.workspace }}/tests/vulkansc/device_profiles/max_profile.json | |
windows: | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
arch: [ x64, Win32 ] | |
config: [ debug, release ] | |
os: [ windows-latest ] | |
exclude: | |
- arch: Win32 | |
config: release | |
- arch: x64 | |
config: debug | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{ matrix.arch }} | |
- name: Install build dependencies | |
run: | | |
python3 -m pip install jsonschema pyparsing | |
- name: Set PYTHONPATH | |
run: echo "PYTHONPATH=$env:GITHUB_WORKSPACE\\external\\${{ matrix.config }}\\Vulkan-Headers\\registry;$env:PYTHONPATH" >> $env:GITHUB_ENV | |
- name: Build VulkanSC-ValidationLayers | |
run: python3 scripts/vksc_github_ci.py --build --config ${{ matrix.config }} --cmake='-DUPDATE_DEPS_SKIP_EXISTING_INSTALL=ON' | |
mingw: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install build dependencies | |
run: python -m pip install jsonschema pyparsing | |
- uses: lukka/get-cmake@latest | |
- name: GCC Version | |
run: gcc --version # If this fails MINGW is not setup correctly | |
- name: Configure | |
run: cmake -S. -B build -D BUILD_WERROR=ON -D UPDATE_DEPS=ON -D CMAKE_BUILD_TYPE=Release -D VULKANSC=ON -G "Ninja" | |
env: | |
LDFLAGS: -fuse-ld=lld # MINGW linking is very slow. Use llvm linker instead. | |
- name: Build | |
run: cmake --build build -- --quiet | |
- name: Install | |
run: cmake --install build --prefix build/install | |
check_vvl: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- run: python3 -m pip install jsonschema pyparsing | |
- run: scripts/update_deps.py --dir ext --no-build --api vulkansc | |
- run: scripts/generate_source.py --verify ext/Vulkan-Headers/registry/ ext/SPIRV-Headers/include/spirv/unified1/ --api vulkansc | |
- run: scripts/vk_validation_stats.py ext/Vulkan-Headers/registry/validusage.json -summary -c -api vulkansc |