|
15 | 15 | concurrency: |
16 | 16 | # A PR number if a pull request and otherwise the commit hash. This cancels |
17 | 17 | # 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) |
20 | 19 | group: ${{ github.workflow }}-${{ github.event.number || github.sha }} |
21 | 20 | cancel-in-progress: true |
22 | 21 |
|
23 | 22 | jobs: |
24 | 23 | windows_x64_msvc: |
25 | | - runs-on: windows-2022 |
26 | | - defaults: |
27 | | - run: |
28 | | - shell: bash |
| 24 | + runs-on: azure-windows-scale |
29 | 25 | 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" |
31 | 31 | steps: |
32 | 32 | - name: "Checking out repository" |
33 | 33 | uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
34 | 34 | with: |
35 | 35 | 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" |
36 | 46 | - name: "Setting up Python" |
37 | 47 | uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.1.0 |
38 | 48 | with: |
|
46 | 56 | run: choco install ccache --yes |
47 | 57 | - name: "Configuring MSVC" |
48 | 58 | 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 |
49 | 66 | - 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 }} |
51 | 70 | - 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