Skip to content

Commit

Permalink
udpate cmake build to use same LLVM commit
Browse files Browse the repository at this point in the history
  • Loading branch information
j2kun committed Oct 31, 2023
1 parent 8422826 commit 7660ef0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build_and_test_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
path: |
./externals/llvm-project
key: ${{ runner.os }}-norm-${{ hashFiles('**/CMakeLists.txt') }}
key: ${{ runner.os }}-cmake-${{ hashFiles('bazel/import_llvm.bzl') }}-${{ hashFiles('**/CMakeLists.txt') }}

- name: Git config
run: |
Expand All @@ -36,8 +36,10 @@ jobs:
- name: Build LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: |
LLVM_COMMIT=$(grep LLVM_COMMIT ${GITHUB_WORKSPACE}/bazel/import_llvm.bzl | head -n 1 | cut -d'"' -f 2 )
git submodule update --init --recursive
cd externals/llvm-project
git checkout ${LLVM_COMMIT}
mkdir build && cd build
cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_BUILD_EXAMPLES=ON -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RTTI=ON -DLLVM_TARGETS_TO_BUILD="host"
cmake --build . --target check-mlir
Expand All @@ -50,4 +52,4 @@ jobs:
cmake --build . --target MLIRMulToAddPasses
cmake --build . --target mlir-headers
cmake --build . --target tutorial-opt
cmake --build . --target check-mlir-tutorial
cmake --build . --target check-mlir-tutorial

0 comments on commit 7660ef0

Please sign in to comment.