Scott Todd | 7463cb4 | 2024-07-22 16:05:15 -0700 | [diff] [blame] | 1 | # Copyright 2024 The IREE Authors |
| 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 | |
Scott Todd | f99df29 | 2024-07-24 11:28:22 -0700 | [diff] [blame] | 7 | name: CI - Windows x64 MSVC |
Scott Todd | 7463cb4 | 2024-07-22 16:05:15 -0700 | [diff] [blame] | 8 | |
| 9 | on: |
| 10 | schedule: |
| 11 | # Weekday mornings at 09:15 UTC = 01:15 PST (UTC - 8). |
| 12 | - cron: "15 9 * * 1-5" |
| 13 | workflow_dispatch: |
| 14 | |
| 15 | concurrency: |
| 16 | # A PR number if a pull request and otherwise the commit hash. This cancels |
| 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. |
| 20 | group: ${{ github.workflow }}-${{ github.event.number || github.sha }} |
| 21 | cancel-in-progress: true |
| 22 | |
| 23 | jobs: |
Scott Todd | f99df29 | 2024-07-24 11:28:22 -0700 | [diff] [blame] | 24 | windows_x64_msvc: |
Scott Todd | 7463cb4 | 2024-07-22 16:05:15 -0700 | [diff] [blame] | 25 | runs-on: windows-2022 |
| 26 | defaults: |
| 27 | run: |
| 28 | shell: bash |
| 29 | env: |
| 30 | BUILD_DIR: build-windows |
| 31 | steps: |
| 32 | - name: "Checking out repository" |
Marius Brehler | b78def2 | 2024-09-06 18:53:11 +0200 | [diff] [blame] | 33 | uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
Scott Todd | 7463cb4 | 2024-07-22 16:05:15 -0700 | [diff] [blame] | 34 | with: |
| 35 | submodules: true |
| 36 | - name: "Setting up Python" |
Marius Brehler | b78def2 | 2024-09-06 18:53:11 +0200 | [diff] [blame] | 37 | uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.1.0 |
Scott Todd | 7463cb4 | 2024-07-22 16:05:15 -0700 | [diff] [blame] | 38 | with: |
| 39 | python-version: "3.10" # Needs pybind >= 2.10.1 for Python >= 3.11 |
| 40 | - name: "Installing Python packages" |
| 41 | run: | |
| 42 | python3 -m venv .venv |
| 43 | .venv/Scripts/activate.bat |
| 44 | python3 -m pip install -r runtime/bindings/python/iree/runtime/build_requirements.txt |
| 45 | - name: "Installing requirements" |
| 46 | run: choco install ccache --yes |
| 47 | - name: "Configuring MSVC" |
Marius Brehler | b78def2 | 2024-09-06 18:53:11 +0200 | [diff] [blame] | 48 | uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 |
Scott Todd | 7463cb4 | 2024-07-22 16:05:15 -0700 | [diff] [blame] | 49 | - name: "Building IREE" |
| 50 | run: ./build_tools/cmake/build_all.sh "${BUILD_DIR}" |
| 51 | - name: "Testing IREE" |
| 52 | run: ./build_tools/cmake/ctest_all.sh "${BUILD_DIR}" |