From 1cca8c5e5838d6023db94a29b93a58f14cc5e396 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 4 Dec 2024 11:41:53 -0800 Subject: [PATCH] test Signed-off-by: Sarnie, Nick --- .github/workflows/sycl-post-commit.yml | 5 ++- .github/workflows/sycl-windows-build.yml | 44 ++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sycl-post-commit.yml b/.github/workflows/sycl-post-commit.yml index 1abd497a9c97c..c70b84991edf1 100644 --- a/.github/workflows/sycl-post-commit.yml +++ b/.github/workflows/sycl-post-commit.yml @@ -107,7 +107,10 @@ jobs: && success() && github.repository == 'intel/llvm' uses: ./.github/workflows/sycl-windows-build.yml - + with: + cc: icx + cxx: icpx + e2e-win: needs: build-win # Continue if build was successful. diff --git a/.github/workflows/sycl-windows-build.yml b/.github/workflows/sycl-windows-build.yml index 4bd537146bf31..56a19308394cd 100644 --- a/.github/workflows/sycl-windows-build.yml +++ b/.github/workflows/sycl-windows-build.yml @@ -22,6 +22,14 @@ on: description: 'Artifacts retention period' type: string default: 3 + cc: + type: string + required: false + default: "cl" + cxx: + type: string + required: false + default: "cl" outputs: build_conclusion: @@ -50,20 +58,50 @@ on: type: choice options: - 3 + cc: + type: choice + options: + - cl + - icx + cxx: + type: choice + options: + - cl + - icpx + permissions: read-all jobs: build: name: Build + LIT - runs-on: [Windows, build] + runs-on: [Windows, build-test] environment: WindowsCILock # TODO use cached checkout outputs: build_conclusion: ${{ steps.build.conclusion }} steps: - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 + if: always() && !cancelled() && (contains(inputs.cc, 'cl') || contains(inputs.cxx, 'cl')) with: arch: amd64 + - name: Set oneAPI env + if: always() && !cancelled() && (contains(inputs.cc, 'icx') || contains(inputs.cxx, 'icpx')) + shell: powershell + run: | + function Invoke-CmdScript { + param( + [String] $scriptName + ) + $cmdLine = """$scriptName"" $args & set" + & $Env:SystemRoot\system32\cmd.exe /c $cmdLine | + select-string '^([^=]*)=(.*)$' | foreach-object { + $varName = $_.Matches[0].Groups[1].Value + $varValue = $_.Matches[0].Groups[2].Value + set-item Env:$varName $varValue + } + } + Invoke-CmdScript "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" + - name: Set env run: | git config --system core.longpaths true @@ -87,8 +125,8 @@ jobs: IF NOT EXIST D:\github\_work\cache\${{inputs.build_cache_suffix}} MKDIR D:\github\_work\cache\${{inputs.build_cache_suffix}} python.exe src/buildbot/configure.py -o build ^ --ci-defaults ^ - --cmake-opt="-DCMAKE_C_COMPILER=cl" ^ - --cmake-opt="-DCMAKE_CXX_COMPILER=cl" ^ + --cmake-opt="-DCMAKE_C_COMPILER=${{inputs.cc}}" ^ + --cmake-opt="-DCMAKE_CXX_COMPILER=${{inputs.cxx}}" ^ --cmake-opt="-DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\install" ^ --cmake-opt="-DCMAKE_CXX_COMPILER_LAUNCHER=sccache" ^ --cmake-opt="-DCMAKE_C_COMPILER_LAUNCHER=sccache" ^