1+ name : " Windows precommit"
2+
3+ permissions :
4+ contents : read
5+
6+ on :
7+ push :
8+ branches : [ "npu/release/18.x" ]
9+ pull_request :
10+ branches : [ "npu/release/18.x" ]
11+ workflow_dispatch :
12+ branches : [ "npu/release/18.x" ]
13+
14+ concurrency :
15+ group : ${{ github.workflow }}-${{ github.ref }}
16+ cancel-in-progress : ${{ startsWith(github.ref, 'refs/pull/') }}
17+
18+
19+ jobs :
20+ Build :
21+ name : Build and Test
22+ runs-on : windows-latest
23+ defaults :
24+ run :
25+ shell : bash
26+ env :
27+ CMAKE_BUILD_TYPE : ' Release'
28+ LLVM_ENABLE_ASSERTIONS : ' ON'
29+ NPU_PLUGIN_LLVM_PROJECT : llvm
30+ NPU_PLUGIN_LLVM_PROJECT_BUILD_DIR : llvm/build
31+ NPU_PLUGIN_LLVM_PROJECT_INSTALL_DIR : llvm/install
32+ steps :
33+ - name : Clone NPU Plugin LLVM sources
34+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35+ with :
36+ submodules : ' true'
37+
38+ - name : Install build dependencies
39+ run : |
40+ Invoke-WebRequest https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip -OutFile ninja-win.zip -MaximumRetryCount 10
41+ Expand-Archive -Force ninja-win.zip
42+ Add-Content -Path $env:GITHUB_PATH -Value "${{ github.workspace }}/ninja-win"
43+
44+ - name : Configure Developer Command Prompt for Microsoft Visual C++ (2019)
45+ uses : ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
46+ with :
47+ toolset : 14.29
48+
49+ - name : Configure CMake
50+ run : |
51+ cmake \
52+ -G "Ninja Multi-Config" \
53+ -B ${NPU_PLUGIN_LLVM_PROJECT_BUILD_DIR} \
54+ -S ${NPU_PLUGIN_LLVM_PROJECT} \
55+ -DCMAKE_INSTALL_PREFIX=${NPU_PLUGIN_LLVM_PROJECT_INSTALL_DIR} \
56+ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
57+ -DLLVM_ENABLE_WARNINGS=OFF \
58+ -DLLVM_ENABLE_BINDINGS=OFF \
59+ -DLLVM_ENABLE_RTTI=ON \
60+ -DLLVM_ENABLE_EH=ON \
61+ -DLLVM_ENABLE_BACKTRACES=OFF \
62+ -DLLVM_ENABLE_CRASH_OVERRIDES=OFF \
63+ -DLLVM_ENABLE_PROJECTS="mlir" \
64+ -DLLVM_ENABLE_ASSERTIONS=${LLVM_ENABLE_ASSERTIONS} \
65+ -DLLVM_INCLUDE_TESTS=ON \
66+ -DLLVM_INCLUDE_BENCHMARKS=OFF \
67+ -DLLVM_TARGETS_TO_BUILD="host" \
68+ -DLLVM_ENABLE_TERMINFO=OFF \
69+ -DLLVM_BUILD_EXAMPLES=OFF \
70+ -DLLVM_INCLUDE_EXAMPLES=OFF \
71+ -DLLVM_BUILD_TOOLS=OFF \
72+ -DLLVM_BUILD_UTILS=ON \
73+ -DLLVM_INSTALL_UTILS=ON \
74+
75+ - name : Build
76+ run : |
77+ cmake \
78+ --build ${NPU_PLUGIN_LLVM_PROJECT_BUILD_DIR} \
79+ --config ${CMAKE_BUILD_TYPE} \
80+ --parallel $(nproc)
81+
82+ - name : Test LLVM
83+ run : |
84+ cmake \
85+ --build ${NPU_PLUGIN_LLVM_PROJECT_BUILD_DIR} \
86+ --config ${CMAKE_BUILD_TYPE} \
87+ --parallel $(nproc) \
88+ --target check-llvm
89+
90+ - name : Test MLIR
91+ run : |
92+ cmake \
93+ --build ${NPU_PLUGIN_LLVM_PROJECT_BUILD_DIR} \
94+ --config ${CMAKE_BUILD_TYPE} \
95+ --parallel $(nproc) \
96+ --target check-mlir
0 commit comments