|
| 1 | +# Copyright 2026 Advanced Micro Devices, Inc. |
| 2 | +# |
| 3 | +# Licensed under the Apache License v2.0 with LLVM Exceptions. |
| 4 | +# See https://llvm.org/LICENSE.txt for license information. |
| 5 | +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | + |
| 7 | +name: CI - Windows x64 MSVC |
| 8 | + |
| 9 | +on: |
| 10 | + workflow_dispatch: |
| 11 | + pull_request: |
| 12 | + push: |
| 13 | + branches: |
| 14 | + - main |
| 15 | + |
| 16 | +jobs: |
| 17 | + windows_x64_msvc: |
| 18 | + runs-on: azure-windows-scale |
| 19 | + env: |
| 20 | + BASE_BUILD_DIR_POWERSHELL: B:\tmpbuild |
| 21 | + steps: |
| 22 | + - name: "Checking out repository" |
| 23 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 24 | + with: |
| 25 | + submodules: true |
| 26 | + # TODO(#18813): Remove this. Environment setup needs to happen on runners, not in workflows. |
| 27 | + - name: "Create build dir" |
| 28 | + run: | |
| 29 | + $buildDir = "$env:BASE_BUILD_DIR_POWERSHELL\" |
| 30 | + echo "BUILD_DIR_POWERSHELL=$buildDir" >> $env:GITHUB_ENV |
| 31 | + mkdir "$buildDir" |
| 32 | + Write-Host "Generated Build Directory: $buildDir" |
| 33 | + $bashBuildDir = $buildDir -replace '\\', '/' -replace '^B:', '/b' |
| 34 | + echo "BUILD_DIR_BASH=$bashBuildDir" >> $env:GITHUB_ENV |
| 35 | + Write-Host "Converted Build Directory For Bash: $bashBuildDir" |
| 36 | + - name: "Setting up Python" |
| 37 | + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 38 | + with: |
| 39 | + python-version: "3.11" |
| 40 | + - name: "Installing Python packages" |
| 41 | + run: | |
| 42 | + python3 -m venv .venv |
| 43 | + .venv/Scripts/activate.bat |
| 44 | +
|
| 45 | + python3 -m pip install --upgrade pip |
| 46 | + python3 -m pip install lit filecheck |
| 47 | + python3 -m pip install --find-links https://iree.dev/pip-release-links.html iree-base-compiler==3.11.0rc20260203 |
| 48 | +
|
| 49 | + - name: "Configuring MSVC" |
| 50 | + uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 |
| 51 | + - name: "Installing Fusilli requirements" |
| 52 | + run: | |
| 53 | + choco install cmake |
| 54 | + choco install ninja |
| 55 | + Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 |
| 56 | + refreshenv |
| 57 | + - name: "Building Fusilli" |
| 58 | + run: | |
| 59 | + cmake -S . -B ${{ env.BUILD_DIR_POWERSHELL}} -G Ninja -DCMAKE_BUILD_TYPE=Release |
| 60 | + cmake --build ${{ env.BUILD_DIR_POWERSHELL}} --config Release --target all |
| 61 | + - name: "Running Fusilli tests" |
| 62 | + run: | |
| 63 | + ctest --test-dir ${{ env.BUILD_DIR_POWERSHELL}} --output-on-failure |
| 64 | + - name: "Clean up build dir" |
| 65 | + if: always() |
| 66 | + run: if (Test-Path -Path "$Env:BUILD_DIR_POWERSHELL") {Remove-Item -Path "$Env:BUILD_DIR_POWERSHELL" -Recurse -Force} |
| 67 | + |
| 68 | + # Depends on all other jobs to provide an aggregate job status. |
| 69 | + ci_fusilli_summary: |
| 70 | + if: always() |
| 71 | + runs-on: ubuntu-24.04 |
| 72 | + needs: |
| 73 | + - windows_x64_msvc |
| 74 | + steps: |
| 75 | + - name: Getting failed jobs |
| 76 | + run: | |
| 77 | + echo '${{ toJson(needs) }}' |
| 78 | + FAILED_JOBS="$(echo '${{ toJson(needs) }}' \ |
| 79 | + | jq --raw-output \ |
| 80 | + 'map_values(select(.result!="success" and .result!="skipped")) | keys | join(",")' \ |
| 81 | + )" |
| 82 | + if [[ "${FAILED_JOBS}" != "" ]]; then |
| 83 | + echo "The following jobs failed: ${FAILED_JOBS}" |
| 84 | + exit 1 |
| 85 | + fi |
0 commit comments