Files
OpenCL-CTS/.github/workflows/presubmit.yml
saurabhnv 7f1caf4aa9 Shader -> SPIR-V at CTS build time (#1849) (#1878)
* Shader -> SPIR-V at CTS build time (#1849)

Instead of relying on prebuilt checked-in SPIR-V files, compile
available shaders at CTS build time.

* Add dependency on glslc (available as part of VULKAN_SDK).
* Add optional build flag BUILD_GLSL_SHADERS, OFF by default.

* Remove pre-built SPIR-V files

* Compile Shader -> SPIR-V at CTS build time

* Use glslangValidator for shader -> spirv

* Add glslangValidator tool for shader -> spirv

* Refactor glslangValidator tool retrieval

* Address review comments

* Use add_subdirectory() instead of include()
* Use glslang instead of glslangValidator
* Update Github actions CI to install Vulkan SDK
2024-04-02 10:16:45 -07:00

72 lines
2.0 KiB
YAML

name: Presubmit
on: [push, pull_request]
jobs:
build:
name: Build ${{ matrix.os }} ${{ matrix.arch }}${{ matrix.extra }}
runs-on: ${{ matrix.os }}
env:
JOB_ARCHITECTURE: ${{ matrix.arch }}
JOB_ENABLE_GL: ${{ matrix.gl }}
JOB_ENABLE_DEBUG: ${{ matrix.debug }}
strategy:
fail-fast: false
matrix:
mainmatrix: [true]
os: [ubuntu-22.04, macos-latest, windows-latest]
include:
- os: ubuntu-22.04
mainmatrix: true
gl: 1
extra: " gl"
- os: ubuntu-22.04
mainmatrix: false
arch: arm
- os: ubuntu-22.04
mainmatrix: false
arch: aarch64
debug: 1
extra: " debug"
steps:
- uses: actions/checkout@v4
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Setup OpenGL build dependencies
if: ${{ matrix.gl }}
run: |
sudo apt-get update
sudo apt-get -y install libglu1-mesa-dev freeglut3-dev mesa-common-dev libglew-dev
- name: Setup MSVC with Ninja
uses: ilammy/msvc-dev-cmd@v1
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
variant: sccache
key: ${{ matrix.os }}-${{ matrix.arch }}
- name: Fetch OpenCL Headers
shell: bash
run: |
git clone https://github.com/KhronosGroup/OpenCL-Headers.git
cd OpenCL-Headers
ln -s CL OpenCL # For OSX builds
cd ..
- name: Install Vulkan SDK
uses: humbletim/install-vulkan-sdk@main
with:
version: 1.3.275.0
cache: true
- name: Build
shell: bash
run: ./presubmit.sh
formatcheck:
name: Check code format
runs-on: ubuntu-22.04
steps:
- name: Install packages
run: sudo apt install -y clang-format clang-format-11
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check code format
run: ./check-format.sh