Skip to content

CI - Windows x64 MSVC #80

CI - Windows x64 MSVC

CI - Windows x64 MSVC #80

# Copyright 2024 The IREE Authors
#
# 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:
schedule:
# Weekday mornings at 09:15 UTC = 01:15 PST (UTC - 8).
- cron: "15 9 * * 1-5"
workflow_dispatch:
concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
# queued and in-progress runs for the same PR (presubmit) or commit
# (postsubmit). The workflow name is prepended to avoid conflicts between
# different workflows.
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
windows_x64_msvc:
runs-on: arc-runner-set
env:
BUILD_DIR: C:\mnt\azure\build-windows
steps:
- name: "Checking out repository"
uses: actions/[email protected]
with:
submodules: true
#- name: "Clean up build dir"
# run: |
# Remove-Item -Path "C:\mnt\azure\build-windows" -Recurse -Force
# mkdir "C:\mnt\azure\build-windows"
- name: "Setting up Python"
uses: actions/setup-python@v4
with:
python-version: "3.10" # Needs pybind >= 2.10.1 for Python >= 3.11
- name: "Installing Python packages"
run: |
python3 -m venv .venv
.venv/Scripts/activate.bat
python3 -m pip install -r runtime/bindings/python/iree/runtime/build_requirements.txt
python3 -m pip install --upgrade certifi
python3 -m certifi
- name: "Installing requirements"
run: choco install ccache --yes
- name: "Installing MSVC requirements"
run: |
choco install visualstudio2022buildtools -y
choco install visualstudio2022community --package-parameters "--add Microsoft.VisualStudio.Workload.CoreEditor --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.DesktopDevelopmentWithC++" -y
choco install visualstudio2022-workload-nativedesktop -y
- name: "Configuring MSVC"
uses: ilammy/[email protected]
- name: "Installing iree reqs"
run: |
choco install cmake
choco install ninja
choco install Ninja
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
refreshenv
- name: "Install Bash"
run: |
$gitPath = "C:\Program Files\Git\bin"
$env:PATH += ";C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin"
[System.Environment]::GetEnvironmentVariable("PATH", "Process")
Test-Path -Path "C:/Program Files/Git/bin/bash.exe"
- name: Add Bash to PATH
run: |
echo "Adding Bash to PATH"
echo "C:\Program Files\Git\bin" >> $Env:GITHUB_PATH
#- name: "Building Iree"
# run: bash ./build_tools/cmake/build_all.sh "/c/mnt/azure/build-windows"
- name: "Testing IREE"
run: bash ./build_tools/cmake/ctest_all.sh "/c/mnt/azure/build-windows"
#- name: "Clean up build dir"
# run: Remove-Item -Path "C:\mnt\azure\build-windows" -Recurse -Force