Skip to content

Commit

Permalink
Fixing CMake build on CI
Browse files Browse the repository at this point in the history
By fetching more revisions for when the revision needed is newer
than the one checked in in the llvm submodule.

As well, rename build directory for cmake build in case it clashes
with any build dirs for the bazel build.
  • Loading branch information
vguerra committed Nov 17, 2023
1 parent a1ba595 commit 10625c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build_and_test_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ jobs:
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 fetch
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
- name: Build and test mlir-tutorial
run: |
mkdir build && cd build
mkdir build-cmake && cd build-cmake
cmake -DLLVM_DIR=${GITHUB_WORKSPACE}/externals/llvm-project/build/lib/cmake/llvm -DMLIR_DIR=${GITHUB_WORKSPACE}/externals/llvm-project/build/lib/cmake/mlir -DBUILD_DEPS="ON" ..
cmake --build . --target MLIRAffineFullUnrollPasses
cmake --build . --target MLIRMulToAddPasses
Expand Down

0 comments on commit 10625c4

Please sign in to comment.