Skip to content

Commit a70ea83

Browse files
Eliasj42Elias Joseph
andauthored
Moved windows workflow to Kubernetes hosted runner (iree-org#18967)
Moved the windows MSVC workflow to a kubernetes hosted windows runner. Also moved a file location to Azure instead of GCP. workflow running successfully: https://github.com/iree-org/iree/actions/runs/11827489914/job/32955730437 Adresses iree-org#18813: runs windows workflow through a runner self hosted through kubernetes on a 32 vcpu machine. Still need to implement sccache. Job currently takes about 1 hour, may need to upgrade to 64 vcpu machine, although implementation of sccache will also save time ci-exactly: windows_x64_msvc --------- Signed-off-by: Elias Joseph <[email protected]> Co-authored-by: Elias Joseph <[email protected]>
1 parent 43b22de commit a70ea83

File tree

1 file changed

+31
-9
lines changed

1 file changed

+31
-9
lines changed

.github/workflows/ci_windows_x64_msvc.yml

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,34 @@ on:
1515
concurrency:
1616
# A PR number if a pull request and otherwise the commit hash. This cancels
1717
# queued and in-progress runs for the same PR (presubmit) or commit
18-
# (postsubmit). The workflow name is prepended to avoid conflicts between
19-
# different workflows.
18+
# (postsubmit)
2019
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
2120
cancel-in-progress: true
2221

2322
jobs:
2423
windows_x64_msvc:
25-
runs-on: windows-2022
26-
defaults:
27-
run:
28-
shell: bash
24+
runs-on: azure-windows-scale
2925
env:
30-
BUILD_DIR: build-windows
26+
BASE_BUILD_DIR_POWERSHELL: C:\mnt\azure\b
27+
SCCACHE_AZURE_CONNECTION_STRING: "${{ secrets.AZURE_CCACHE_CONNECTION_STRING }}"
28+
SCCACHE_AZURE_BLOB_CONTAINER: ccache-container
29+
SCCACHE_CCACHE_ZSTD_LEVEL: 10
30+
SCCACHE_AZURE_KEY_PREFIX: "ci_windows_x64_msvc"
3131
steps:
3232
- name: "Checking out repository"
3333
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
3434
with:
3535
submodules: true
36+
- name: "Create build dir"
37+
run: |
38+
$currentTime = (Get-Date).ToString('HHmmss')
39+
$buildDir = "$env:BASE_BUILD_DIR_POWERSHELL\$currentTime"
40+
echo "BUILD_DIR_POWERSHELL=$buildDir" >> $env:GITHUB_ENV
41+
mkdir "$buildDir"
42+
Write-Host "Generated Build Directory: $buildDir"
43+
$bashBuildDir = $buildDir -replace '\\', '/' -replace '^C:', '/c'
44+
echo "BUILD_DIR_BASH=$bashBuildDir" >> $env:GITHUB_ENV
45+
Write-Host "Converted Build Directory For Bash: $bashBuildDir"
3646
- name: "Setting up Python"
3747
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.1.0
3848
with:
@@ -46,7 +56,19 @@ jobs:
4656
run: choco install ccache --yes
4757
- name: "Configuring MSVC"
4858
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
59+
- name: "Installing IREE requirements"
60+
run: |
61+
choco install sccache
62+
choco install cmake
63+
choco install ninja
64+
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
65+
refreshenv
4966
- name: "Building IREE"
50-
run: ./build_tools/cmake/build_all.sh "${BUILD_DIR}"
67+
run: |
68+
echo "Building in ${{ env.BUILD_DIR_BASH }}"
69+
bash ./build_tools/cmake/build_all.sh ${{ env.BUILD_DIR_BASH }}
5170
- name: "Testing IREE"
52-
run: ./build_tools/cmake/ctest_all.sh "${BUILD_DIR}"
71+
run: bash ./build_tools/cmake/ctest_all.sh ${{ env.BUILD_DIR_BASH }}
72+
- name: "Clean up build dir"
73+
if: always()
74+
run: if (Test-Path -Path "$Env:BUILD_DIR_POWERSHELL") {Remove-Item -Path "$Env:BUILD_DIR_POWERSHELL" -Recurse -Force}

0 commit comments

Comments
 (0)