LLVM and SPIRV-LLVM-Translator pulldown (WW39 2025) #42
This file contains hidden or 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
name: MLIR SPIR-V Tests | |
permissions: | |
contents: read | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- 'mlir/include/mlir/Dialect/SPIRV/**' | |
- 'mlir/lib/Dialect/SPIRV/**' | |
- 'mlir/include/mlir/Target/SPIRV/**' | |
- 'mlir/lib/Target/SPIRV/**' | |
- 'mlir/test/Target/SPIRV/**' | |
- '.github/workflows/mlir-spirv-tests.yml' | |
concurrency: | |
# Skip intermediate builds: always. | |
# Cancel intermediate builds: only if it is a pull request build. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
jobs: | |
check_spirv: | |
if: github.repository_owner == 'llvm' | |
name: Test MLIR SPIR-V | |
runs-on: ubuntu-24.04 | |
container: | |
image: ghcr.io/llvm/ci-ubuntu-24.04:latest | |
steps: | |
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- name: Setup ccache | |
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17 | |
with: | |
max-size: 2G | |
key: spirv-mlir-ubuntu-24.04 | |
variant: sccache | |
- name: Build and Test | |
run: | | |
mkdir build | |
cmake -GNinja \ | |
-S llvm \ | |
-B build \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DLLVM_ENABLE_ASSERTIONS=ON \ | |
-DCMAKE_C_COMPILER_LAUNCHER=sccache \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \ | |
-DLLVM_TARGETS_TO_BUILD="host" \ | |
-DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON \ | |
-DLLVM_ENABLE_PROJECTS=mlir | |
ninja -C build check-mlir |