Parser errors polish #754
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: | |
############## | |
# 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 | |
- name: Checkout Scair | |
uses: actions/checkout@v4 | |
# Restore SBT's incremental build cache | |
- name: Cache Incremental Build | |
uses: actions/cache@v4 | |
with: | |
# All the target/ subdirectories are cached | |
path: "**/target" | |
# Caches are immutable; we need to uniquely identify them to always push the recent ones | |
# There is an LRU-like policy in place on GitHub's side, capped at 10GB caches per repo | |
key: sbt-incremental-tests-${{ github.run_id }}-${{ github.run_attempt }} | |
# When restoring, we restore the most recent one pushed by such a job | |
# Those are scoped by branch too; e.g., the most recent one from the main branch would | |
# be fetched in a fresh PR, then the most recent one from this PR. | |
restore-keys: | | |
sbt-incremental-tests- | |
- name: Cache coursier packages | |
uses: coursier/cache-action@v6 | |
- name: Install coursier packages (Scala and SBT) | |
uses: coursier/setup-action@v1 | |
with: | |
apps: scala:3.3.1 sbt | |
- name: Run tests and generate coverage report | |
run: | | |
export PATH=$PATH:${GITHUB_WORKSPACE}/llvm-project/build/bin/ | |
sbt coverage test filechecks coverageAggregate | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |