Bump IREE to candidate-20240828.999. #63
Workflow file for this run
This file contains 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
# 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: IREE Runtime Template | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
build_and_test: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: ubuntu-20.04 - clang 10 | |
os: ubuntu-20.04 | |
cc_compiler: clang-10 | |
cxx_compiler: clang++-10 | |
- name: ubuntu-22.04 - clang 13 | |
os: ubuntu-22.04 | |
cc_compiler: clang-13 | |
cxx_compiler: clang++-13 | |
- name: ubuntu-24.04 - clang 16 | |
os: ubuntu-24.04 | |
cc_compiler: clang-16 | |
cxx_compiler: clang++-16 | |
- name: ubuntu-20.04 - gcc 10 | |
os: ubuntu-20.04 | |
cc_compiler: gcc-10 | |
cxx_compiler: g++-10 | |
- name: ubuntu-22.04 - gcc 10 | |
os: ubuntu-22.04 | |
cc_compiler: gcc-10 | |
cxx_compiler: g++-10 | |
- name: ubuntu-24.04 - gcc 12 | |
os: ubuntu-24.04 | |
cc_compiler: gcc-12 | |
cxx_compiler: g++-12 | |
- name: macos-14 - clang | |
os: macos-14 | |
cc_compiler: clang | |
cxx_compiler: clang++ | |
- name: windows-2019 - msvc | |
os: windows-2019 | |
compiler: msvc | |
- name: windows-2022 - msvc | |
os: windows-2022 | |
compiler: msvc | |
# As of IREE commit 44c93468, Windows only reliably supports MSVC and | |
# clang-cl. clang and gcc builds could be added with a few changes. | |
# - name: windows-2019 - clang | |
# os: windows-2019 | |
# compiler: clang | |
# - name: windows-2022 - clang | |
# os: windows-2022 | |
# compiler: clang | |
# - name: windows-2019 - gcc | |
# os: windows-2019 | |
# compiler: gcc | |
# - name: windows-2022 - gcc | |
# os: windows-2022 | |
# compiler: gcc | |
defaults: | |
run: | |
shell: bash | |
steps: | |
########################################################################### | |
# OS specific setup | |
########################################################################### | |
- name: (Linux) Install dependencies | |
if: contains(matrix.os, 'ubuntu') | |
run: | | |
sudo apt update | |
sudo apt install ninja-build | |
echo "CC=${{ matrix.cc_compiler }}" >> $GITHUB_ENV | |
echo "CXX=${{ matrix.cxx_compiler }}" >> $GITHUB_ENV | |
- name: (macOS) Install dependencies | |
if: contains(matrix.os, 'macos') | |
run: | | |
brew install ninja | |
echo "CC=${{ matrix.cc_compiler }}" >> $GITHUB_ENV | |
echo "CXX=${{ matrix.cxx_compiler }}" >> $GITHUB_ENV | |
- name: (Windows) Configure MSVC | |
if: contains(matrix.os, 'windows') && contains(matrix.compiler, 'msvc') | |
uses: ilammy/[email protected] | |
- name: (Windows) Configure clang | |
if: contains(matrix.os, 'windows') && contains(matrix.compiler, 'clang') | |
run: | | |
choco install ninja --yes | |
echo "CC='C:\Program Files\LLVM\bin\clang.exe'" >> $GITHUB_ENV | |
echo "CXX='C:\Program Files\LLVM\bin\clang++.exe'" >> $GITHUB_ENV | |
- name: (Windows) Configure GCC | |
if: contains(matrix.os, 'windows') && contains(matrix.compiler, 'gcc') | |
uses: egor-tensin/setup-mingw@v2 | |
with: | |
version: 12.2.0 | |
########################################################################### | |
# General setup | |
########################################################################### | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: "3.11" | |
- name: Install IREE compiler | |
run: | | |
python -m pip install iree-compiler==20240828.999 | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Initialize submodules | |
run: | | |
git \ | |
-c submodule."third_party/llvm-project".update=none \ | |
-c submodule."third_party/stablehlo".update=none \ | |
-c submodule."third_party/torch-mlir".update=none \ | |
submodule update --init --recursive | |
########################################################################### | |
# Build and test | |
########################################################################### | |
- name: Build sample | |
run: | | |
cmake -B build/ -G Ninja | |
cmake --build build/ --target hello_world | |
- name: Compile sample module | |
run: | | |
iree-compile \ | |
--iree-hal-target-backends=llvm-cpu \ | |
simple_mul.mlir \ | |
-o build/simple_mul.vmfb | |
- name: Test execution | |
run: | | |
./build/hello_world local-sync build/simple_mul.vmfb |