OperationDef as macros. #872
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
name: Testing | |
# Run on every push to main and every change on pull requests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
# Tests and coverage | |
tests: | |
name: "Tests" | |
runs-on: ubuntu-latest | |
env: | |
MLIR-Version: 98e674c9f16d677d95c67bc130e267fae331e43c | |
steps: | |
- name: Checkout Scair | |
uses: actions/checkout@v4 | |
############## | |
# MLIR SETUP # | |
############## | |
# Get from cache | |
- name: Cache MLIR build | |
id: cache-binary | |
uses: actions/cache@v4 | |
with: | |
path: llvm-project/build | |
key: mlir-${{ runner.os }}-${{ env.MLIR-Version }} | |
restore-keys: mlir-${{ runner.os }}-${{ env.MLIR-Version }} | |
# Otherwise, get it and build it | |
- name: Checkout MLIR | |
if: steps.cache-binary.outputs.cache-hit != 'true' | |
uses: actions/checkout@v4 | |
with: | |
repository: llvm/llvm-project.git | |
path: llvm-project | |
ref: ${{ env.MLIR-Version }} | |
- name: Clang Setup | |
if: steps.cache-binary.outputs.cache-hit != 'true' | |
uses: egor-tensin/setup-clang@v1 | |
- name: Ninja Setup | |
if: steps.cache-binary.outputs.cache-hit != 'true' | |
uses: lukka/get-cmake@9e431acfe656e5db66cd4930386328fce59cfaba | |
- name: MLIR configuration | |
if: steps.cache-binary.outputs.cache-hit != 'true' | |
run: | | |
mkdir llvm-project/build | |
cd llvm-project/build | |
cmake -G Ninja ../llvm \ | |
-DLLVM_ENABLE_PROJECTS=mlir \ | |
-DLLVM_TARGETS_TO_BUILD="Native" \ | |
-DLLVM_ENABLE_LLD=ON \ | |
-DLLVM_INCLUDE_BENCHMARKS=OFF \ | |
-DLLVM_INCLUDE_EXAMPLES=OFF \ | |
-DCMAKE_C_COMPILER=clang \ | |
-DCMAKE_CXX_COMPILER=clang++ \ | |
-DCMAKE_C_FLAGS="-pipe" \ | |
-DCMAKE_CXX_FLAGS="-pipe" \ | |
-DCMAKE_BUILD_TYPE=Release | |
- name: MLIR build | |
if: steps.cache-binary.outputs.cache-hit != 'true' | |
run: | | |
cd llvm-project/build | |
cmake --build . --target mlir-opt mlir-cpu-runner | |
########### | |
# TESTING # | |
########### | |
- name: Python Setup | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install lit and filecheck (python version) | |
run: | | |
pip install --upgrade pip | |
pip install lit filecheck | |
# Restore Mill's incremental build cache | |
- name: Cache Incremental Build | |
uses: actions/cache@v4 | |
with: | |
path: ./out | |
key: mill-incremental-tests-${{ github.run_id }}-${{ github.run_attempt }} | |
restore-keys: | | |
mill-incremental-tests- | |
- name: Cache coursier packages | |
uses: coursier/cache-action@v6 | |
- name: Install coursier packages (Scala and Mill) | |
uses: coursier/setup-action@v1 | |
with: | |
apps: scala:3.3.4 | |
- name: Run all tests | |
run: | | |
export PATH=$PATH:$(pwd)/llvm-project/build/bin/ | |
./mill testAll | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |