|
| 1 | +name: Device-agnostic LIT tests |
| 2 | +inputs: |
| 3 | + filters: |
| 4 | + description: 'Filter matches for the changed files in the PR' |
| 5 | + # TODO: If that is used by a re-usable workflow, then the caller has to |
| 6 | + # provide the same defaults explicitly in its inputs. Make sure those are |
| 7 | + # modified whenever changes are being made here. |
| 8 | + default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]' |
| 9 | + required: false |
| 10 | + skip_targets: |
| 11 | + description: 'Checks to skip' |
| 12 | + default: '[]' |
| 13 | + required: false |
| 14 | + build_path: |
| 15 | + description: 'Path to the build directory' |
| 16 | + required: true |
| 17 | + |
| 18 | +runs: |
| 19 | + using: "composite" |
| 20 | + steps: |
| 21 | + - name: check-llvm |
| 22 | + shell: bash |
| 23 | + if: | |
| 24 | + always() && !cancelled() |
| 25 | + && contains(inputs.filters, 'llvm') |
| 26 | + && !contains(inputs.skip_targets, 'llvm') |
| 27 | + run: | |
| 28 | + cmake --build ${{ inputs.build_path }} --target check-llvm |
| 29 | + - name: check-clang |
| 30 | + shell: bash |
| 31 | + if: | |
| 32 | + always() && !cancelled() |
| 33 | + && contains(inputs.filters, 'clang') |
| 34 | + && !contains(inputs.skip_targets, 'clang') |
| 35 | + run: | |
| 36 | + # Can we move this to Dockerfile? Hopefully, noop on Windows. |
| 37 | + export XDG_CACHE_HOME=$GITHUB_WORKSPACE/os_cache |
| 38 | + cmake --build ${{ inputs.build_path }} --target check-clang |
| 39 | + - name: check-sycl |
| 40 | + shell: bash |
| 41 | + if: | |
| 42 | + always() && !cancelled() |
| 43 | + && contains(inputs.filters, 'sycl') |
| 44 | + && !contains(inputs.skip_targets, 'sycl') |
| 45 | + run: | |
| 46 | + # TODO consider moving this to Dockerfile. |
| 47 | + # Will be ignored on Windows even when executed. |
| 48 | + export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH |
| 49 | + cmake --build ${{ inputs.build_path }} --target check-sycl |
| 50 | + - name: check-llvm-spirv |
| 51 | + shell: bash |
| 52 | + if: | |
| 53 | + always() && !cancelled() |
| 54 | + && contains(inputs.filters, 'llvm_spirv') |
| 55 | + && !contains(inputs.skip_targets, 'llvm_spirv') |
| 56 | + run: | |
| 57 | + cmake --build ${{ inputs.build_path }} --target check-llvm-spirv |
| 58 | + - name: check-xptifw |
| 59 | + shell: bash |
| 60 | + if: | |
| 61 | + always() && !cancelled() |
| 62 | + && contains(inputs.filters, 'xptifw') |
| 63 | + && !contains(inputs.skip_targets, 'xptifw') |
| 64 | + run: | |
| 65 | + cmake --build ${{ inputs.build_path }} --target check-xptifw |
| 66 | + - name: check-libclc |
| 67 | + shell: bash |
| 68 | + if: | |
| 69 | + always() && !cancelled() |
| 70 | + && contains(inputs.filters, 'libclc') |
| 71 | + && !contains(inputs.skip_targets, 'libclc') |
| 72 | + run: | |
| 73 | + cmake --build ${{ inputs.build_path }} --target check-libclc |
| 74 | + - name: check-libdevice |
| 75 | + shell: bash |
| 76 | + if: | |
| 77 | + always() && !cancelled() |
| 78 | + && contains(inputs.filters, 'libdevice') |
| 79 | + && !contains(inputs.skip_targets, 'libdevice') |
| 80 | + run: | |
| 81 | + cmake --build ${{ inputs.build_path }} --target check-libdevice |
0 commit comments