Update lit.site.cfg.py.in #39
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: Build and test | |
on: [push, pull_request] | |
env: | |
LLVM_COMMIT: 7dad7ab3c0d29fb9c6b0cf591889789a3cdbcc0a | |
CMAKE_FLAGS: '-DCMAKE_LINKER=lld -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DMLIR_DIR=$GITHUB_WORKSPACE/llvm-project/prefix/lib/cmake/mlir/ -DLLVM_DIR=$GITHUB_WORKSPACE/llvm-project/prefix/lib/cmake/llvm/ -DLLVM_EXTERNAL_LIT=$GITHUB_WORKSPACE/llvm-project/build/bin/llvm-lit' | |
jobs: | |
lint: | |
name: Check formatting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Template Code | |
uses: actions/checkout@v2 | |
- name: clang-format | |
uses: DoozyX/[email protected] | |
with: | |
source: '.' | |
extensions: 'h,cpp' | |
clangFormatVersion: 9 | |
build: | |
name: Build and test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Configure Environment | |
run: | | |
echo "$GITHUB_WORKSPACE/llvm-project/prefix/bin" >> "$GITHUB_PATH" | |
pip install --upgrade cmake | |
- name: Get Template Code | |
uses: actions/checkout@v2 | |
with: | |
path: 'mlir-standalone-template' | |
- name: Cache LLVM | |
id: cache-llvm | |
uses: actions/cache@v2 | |
with: | |
path: llvm-project | |
key: ${{ runner.os }}-llvm-install-${{ env.LLVM_COMMIT }} | |
- name: Get LLVM | |
if: steps.cache-llvm.outputs.cache-hit != 'true' | |
uses: actions/checkout@v2 | |
with: | |
repository: 'llvm/llvm-project' | |
ref: '${{ env.LLVM_COMMIT }}' | |
path: 'llvm-project' | |
- name: Install LLVM | |
if: steps.cache-llvm.outputs.cache-hit != 'true' | |
run: | | |
mkdir $GITHUB_WORKSPACE/llvm-project/build | |
mkdir $GITHUB_WORKSPACE/llvm-project/prefix | |
cd $GITHUB_WORKSPACE/llvm-project/build | |
cmake $GITHUB_WORKSPACE/llvm-project/llvm -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_TARGETS_TO_BUILD="host" -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/llvm-project/prefix -DLLVM_ENABLE_PROJECTS='mlir' -DLLVM_ENABLE_OCAMLDOC=OFF -DLLVM_ENABLE_BINDINGS=OFF -DLLVM_INSTALL_UTILS=ON -DLLVM_ENABLE_LLD=ON | |
cmake --build . --target install -- -j$(nproc) | |
- name: Sanitizer build | |
run: | | |
mkdir $GITHUB_WORKSPACE/mlir-standalone-template/sanitizer-build | |
cd $GITHUB_WORKSPACE/mlir-standalone-template/sanitizer-build | |
cmake $GITHUB_WORKSPACE/mlir-standalone-template -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER='Address;Undefined' ${{ env.CMAKE_FLAGS }} | |
cmake --build . --target check-standalone-opt -- -j$(nproc) | |
- name: Release build | |
run: | | |
mkdir $GITHUB_WORKSPACE/mlir-standalone-template/build | |
cd $GITHUB_WORKSPACE/mlir-standalone-template/build | |
cmake $GITHUB_WORKSPACE/mlir-standalone-template -DCMAKE_BUILD_TYPE=Release ${{ env.CMAKE_FLAGS }} | |
cmake --build . --target check-standalone-opt -- -j$(nproc) | |