52 lines · yaml
1name: MLIR SPIR-V Tests2 3permissions:4 contents: read5 6on:7 workflow_dispatch:8 pull_request:9 paths:10 - 'mlir/include/mlir/Dialect/SPIRV/**'11 - 'mlir/lib/Dialect/SPIRV/**'12 - 'mlir/include/mlir/Target/SPIRV/**'13 - 'mlir/lib/Target/SPIRV/**'14 - 'mlir/test/Target/SPIRV/**'15 - '.github/workflows/mlir-spirv-tests.yml'16 17concurrency:18 # Skip intermediate builds: always.19 # Cancel intermediate builds: only if it is a pull request build.20 group: ${{ github.workflow }}-${{ github.ref }}21 cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}22 23jobs:24 check_spirv:25 if: github.repository_owner == 'llvm'26 name: Test MLIR SPIR-V27 runs-on: ubuntu-24.0428 container:29 image: ghcr.io/llvm/ci-ubuntu-24.04:latest30 steps:31 - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.032 - name: Setup ccache33 uses: hendrikmuhs/ccache-action@5ebbd400eff9e74630f759d94ddd7b6c26299639 # v1.2.2034 with:35 max-size: 2G36 key: spirv-mlir-ubuntu-24.0437 variant: sccache38 - name: Build and Test39 run: |40 mkdir build41 cmake -GNinja \42 -S llvm \43 -B build \44 -DCMAKE_BUILD_TYPE=Release \45 -DLLVM_ENABLE_ASSERTIONS=ON \46 -DCMAKE_C_COMPILER_LAUNCHER=sccache \47 -DCMAKE_CXX_COMPILER_LAUNCHER=sccache \48 -DLLVM_TARGETS_TO_BUILD="host" \49 -DLLVM_INCLUDE_SPIRV_TOOLS_TESTS=ON \50 -DLLVM_ENABLE_PROJECTS=mlir51 ninja -C build check-mlir52