-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand build-and-test matrix. #9
Merged
+102
−83
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,23 +25,36 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
include: | ||
- name: ubuntu-20.04 - clang | ||
- name: ubuntu-20.04 - clang 10 | ||
os: ubuntu-20.04 | ||
cc_compiler: clang | ||
cxx_compiler: clang++ | ||
- name: ubuntu-22.04 - clang | ||
cc_compiler: clang-10 | ||
cxx_compiler: clang++-10 | ||
- name: ubuntu-22.04 - clang 13 | ||
os: ubuntu-22.04 | ||
cc_compiler: clang | ||
cxx_compiler: clang++ | ||
|
||
- name: ubuntu-20.04 - gcc | ||
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 | ||
cxx_compiler: g++ | ||
- name: ubuntu-22.04 - gcc | ||
cc_compiler: gcc-10 | ||
cxx_compiler: g++-10 | ||
- name: ubuntu-22.04 - gcc 10 | ||
os: ubuntu-22.04 | ||
cc_compiler: gcc | ||
cxx_compiler: g++ | ||
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 | ||
|
@@ -71,73 +84,79 @@ jobs: | |
shell: bash | ||
|
||
steps: | ||
|
||
########################################################################### | ||
# OS specific setup | ||
########################################################################### | ||
|
||
- name: Install dependencies (Linux) | ||
if: contains(matrix.os, 'ubuntu') | ||
run: | | ||
sudo apt update | ||
sudo apt install cmake clang ninja-build | ||
export CC=${{ matrix.cc_compiler }} | ||
export CXX=${{ matrix.cxx_compiler }} | ||
|
||
- name: Configure MSVC (Windows) | ||
if: contains(matrix.os, 'windows') && contains(matrix.compiler, 'msvc') | ||
uses: ilammy/[email protected] | ||
|
||
- name: Configure clang (Windows) | ||
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: Configure GCC (Windows) | ||
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/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install IREE compiler | ||
run: | | ||
python -m pip install iree-compiler==20240724.964 | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- 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 | ||
########################################################################### | ||
# 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==20240724.964 | ||
- 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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also tested macos-12 and macos-13:
Proceeding with what works out of the box for now.