Fixed Conversion Flag #250
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: Formatting Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
clang-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install clang-format | |
sudo apt-get install ninja-build | |
- name: Load MLIR cache | |
id: mlir-cache | |
uses: actions/cache@v2 | |
with: | |
path: llvm-project/build | |
key: ${{ runner.os }}-mlir-commit-67760d7 | |
# TODO: Prevent building in multiple workflows | |
- name: Build MLIR | |
if: steps.mlir-cache.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="host" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON | |
ninja | |
- name: Check Formatting | |
run: | | |
mkdir build | |
cd build | |
cmake -G Ninja .. -DMLIR_DIR=${{github.workspace}}/llvm-project/build/lib/cmake/mlir -DLLVM_EXTERNAL_LIT=${{github.workspace}}/llvm-project/build/bin/llvm-lit | |
ninja check-format | |