Skip to content

Commit b909ff3

Browse files
authored
small improvements to CMake CI. (#24)
- usingi env variable GITHUB_WORKSPACE everywhere possible. - configure git to avoid warning messages during post action of `actions/checkout@v3` - checking out code recursively so that LLVM dependency is checked out. - fixing key definition for caching LLVM build.
1 parent 4bded04 commit b909ff3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/build_and_test_cmake.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v3
15+
with:
16+
submodules: recursive
1517
- uses: seanmiddleditch/gha-setup-ninja@master
1618

1719
- name: Install prerequisites
@@ -25,7 +27,11 @@ jobs:
2527
with:
2628
path: |
2729
./externals/llvm-project
28-
key: ${{ runner.os }}-norm-${{ hashFiles('externals/llvm-project/llvm/CMakeLists.txt') }}
30+
key: ${{ runner.os }}-norm-${{ hashFiles('**/CMakeLists.txt') }}
31+
32+
- name: Git config
33+
run: |
34+
git config --global --add safe.directory ${GITHUB_WORKSPACE}
2935
3036
- name: Build LLVM
3137
if: steps.cache-llvm.outputs.cache-hit != 'true'
@@ -39,7 +45,7 @@ jobs:
3945
- name: Build and test mlir-tutorial
4046
run: |
4147
mkdir build && cd build
42-
cmake -DLLVM_DIR=$PWD/../externals/llvm-project/build/lib/cmake/llvm -DMLIR_DIR=$PWD/../externals/llvm-project/build/lib/cmake/mlir ..
48+
cmake -DLLVM_DIR=${GITHUB_WORKSPACE}/externals/llvm-project/build/lib/cmake/llvm -DMLIR_DIR=${GITHUB_WORKSPACE}/externals/llvm-project/build/lib/cmake/mlir ..
4349
cmake --build . --target MLIRAffineFullUnrollPasses
4450
cmake --build . --target MLIRMulToAddPasses
4551
cmake --build . --target mlir-headers

0 commit comments

Comments
 (0)