1010 build_ref :
1111 type : string
1212 required : false
13+ build_configure_extra_args :
14+ type : string
15+ required : false
1316 changes :
1417 type : string
1518 description : ' Filter matches for the changed files in the PR'
2225 description : ' Artifacts retention period'
2326 type : string
2427 default : 3
28+ compiler :
29+ type : string
30+ required : false
31+ default : " cl"
2532
2633 outputs :
2734 build_conclusion :
5057 type : choice
5158 options :
5259 - 3
60+ compiler :
61+ type : choice
62+ options :
63+ - cl
64+ - icx
65+
5366permissions : read-all
5467
5568jobs :
@@ -61,37 +74,43 @@ jobs:
6174 outputs :
6275 build_conclusion : ${{ steps.build.conclusion }}
6376 steps :
77+ - uses : actions/checkout@v4
78+ with :
79+ path : src
80+ ref : ${{ inputs.build_ref || github.sha }}
81+ fetch-depth : 1
6482 - uses : ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
6583 with :
6684 arch : amd64
85+ - name : Setup oneAPI env
86+ uses : ./src/devops/actions/setup_windows_oneapi_env
87+ if : ${{ always() && !cancelled() && inputs.compiler == 'icx' }}
6788 - name : Set env
6889 run : |
6990 git config --system core.longpaths true
7091 git config --global core.autocrlf false
7192 echo "C:\Program Files\Git\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
72- echo "SCCACHE_DIR=D:\github\_work\cache\${{ inputs.build_cache_suffix }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
73- - uses : actions/checkout@v4
74- with :
75- path : src
76- ref : ${{ inputs.build_ref || github.sha }}
77- fetch-depth : 1
93+ echo "CCACHE_DIR=D:\github\_work\cache\${{ inputs.build_cache_suffix }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
94+ echo "CCACHE_MAXSIZE=10G" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
7895 - name : Register cleanup after job is finished
7996 uses : ./src/devops/actions/cleanup
8097 - name : Configure
8198 shell : cmd
99+ env :
100+ ARGS : ${{ inputs.build_configure_extra_args }}
82101 # TODO switch to clang-cl and lld when this is fixed https://github.com/oneapi-src/level-zero/issues/83
83102 run : |
84103 mkdir build
85104 mkdir install
86105 IF NOT EXIST D:\github\_work\cache MKDIR D:\github\_work\cache
87106 IF NOT EXIST D:\github\_work\cache\${{inputs.build_cache_suffix}} MKDIR D:\github\_work\cache\${{inputs.build_cache_suffix}}
88107 python.exe src/buildbot/configure.py -o build ^
89- --ci-defaults ^
90- --cmake-opt="-DCMAKE_C_COMPILER=cl " ^
91- --cmake-opt="-DCMAKE_CXX_COMPILER=cl " ^
108+ --ci-defaults %ARGS% ^
109+ --cmake-opt="-DCMAKE_C_COMPILER=${{inputs.compiler}} " ^
110+ --cmake-opt="-DCMAKE_CXX_COMPILER=${{inputs.compiler}} " ^
92111 --cmake-opt="-DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\install" ^
93- --cmake-opt="-DCMAKE_CXX_COMPILER_LAUNCHER=sccache " ^
94- --cmake-opt="-DCMAKE_C_COMPILER_LAUNCHER=sccache " ^
112+ --cmake-opt="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache " ^
113+ --cmake-opt="-DCMAKE_C_COMPILER_LAUNCHER=ccache " ^
95114 --cmake-opt="-DLLVM_INSTALL_UTILS=ON" ^
96115 --cmake-opt="-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV"
97116 - name : Build
@@ -101,16 +120,24 @@ jobs:
101120 cmake --build build --target sycl-toolchain
102121 - name : check-llvm
103122 if : always() && !cancelled() && contains(inputs.changes, 'llvm')
123+ shell : bash
104124 run : |
125+ if [[ ${{inputs.compiler}} == 'icx' ]]; then
126+ export LIT_FILTER="SYCL"
127+ fi
105128 cmake --build build --target check-llvm
106129 - name : check-clang
107130 if : always() && !cancelled() && contains(inputs.changes, 'clang')
108131 run : |
109132 cmake --build build --target check-clang
110133 - name : check-sycl
111134 if : always() && !cancelled() && contains(inputs.changes, 'sycl')
135+ shell : bash
112136 run : |
113- cmake --build build --target check-sycl
137+ if [[ ${{inputs.compiler}} == 'icx' ]]; then
138+ export LIT_FILTER_OUT="host_tanpi_double_accuracy"
139+ fi
140+ cmake --build build --target check-sycl
114141 - name : check-sycl-unittests
115142 if : always() && !cancelled() && contains(inputs.changes, 'sycl')
116143 run : |
0 commit comments