Add Windows CI and refactor workflow layout #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2026 Advanced Micro Devices, Inc. | |
| # | |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. | |
| # See https://llvm.org/LICENSE.txt for license information. | |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| name: CI - Windows x64 MSVC | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| windows_x64_msvc: | |
| runs-on: azure-windows-scale | |
| env: | |
| BASE_BUILD_DIR_POWERSHELL: B:\tmpbuild | |
| steps: | |
| - name: "Checking out repository" | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: true | |
| # TODO(#18813): Remove this. Environment setup needs to happen on runners, not in workflows. | |
| - name: "Create build dir" | |
| run: | | |
| $buildDir = "$env:BASE_BUILD_DIR_POWERSHELL\" | |
| echo "BUILD_DIR_POWERSHELL=$buildDir" >> $env:GITHUB_ENV | |
| mkdir "$buildDir" | |
| Write-Host "Generated Build Directory: $buildDir" | |
| $bashBuildDir = $buildDir -replace '\\', '/' -replace '^B:', '/b' | |
| echo "BUILD_DIR_BASH=$bashBuildDir" >> $env:GITHUB_ENV | |
| Write-Host "Converted Build Directory For Bash: $bashBuildDir" | |
| - name: "Setting up Python" | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.11" | |
| - name: "Installing Python packages" | |
| run: | | |
| python3 -m venv .venv | |
| .venv/Scripts/activate.bat | |
| python3 -m pip install --upgrade pip | |
| python3 -m pip install lit filecheck | |
| python3 -m pip install --find-links https://iree.dev/pip-release-links.html iree-base-compiler==3.11.0rc20260203 | |
| - name: "Configuring MSVC" | |
| uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 | |
| - name: "Installing Fusilli requirements" | |
| run: | | |
| choco install cmake | |
| choco install ninja | |
| Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 | |
| refreshenv | |
| - name: "Building Fusilli" | |
| run: | | |
| cmake -S . -B ${{ env.BUILD_DIR_POWERSHELL}} -G Ninja -DCMAKE_BUILD_TYPE=Release | |
| cmake --build ${{ env.BUILD_DIR_POWERSHELL}} --config Release --target all | |
| - name: "Running Fusilli tests" | |
| run: | | |
| ctest --test-dir ${{ env.BUILD_DIR_POWERSHELL}} --output-on-failure | |
| - name: "Clean up build dir" | |
| if: always() | |
| run: if (Test-Path -Path "$Env:BUILD_DIR_POWERSHELL") {Remove-Item -Path "$Env:BUILD_DIR_POWERSHELL" -Recurse -Force} | |
| # Depends on all other jobs to provide an aggregate job status. | |
| ci_fusilli_summary: | |
| if: always() | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - windows_x64_msvc | |
| steps: | |
| - name: Getting failed jobs | |
| run: | | |
| echo '${{ toJson(needs) }}' | |
| FAILED_JOBS="$(echo '${{ toJson(needs) }}' \ | |
| | jq --raw-output \ | |
| 'map_values(select(.result!="success" and .result!="skipped")) | keys | join(",")' \ | |
| )" | |
| if [[ "${FAILED_JOBS}" != "" ]]; then | |
| echo "The following jobs failed: ${FAILED_JOBS}" | |
| exit 1 | |
| fi |