Skip to content

Commit

Permalink
small improvements to CMake CI. (#24)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
vguerra authored Oct 23, 2023
1 parent 4bded04 commit b909ff3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build_and_test_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: seanmiddleditch/gha-setup-ninja@master

- name: Install prerequisites
Expand All @@ -25,7 +27,11 @@ jobs:
with:
path: |
./externals/llvm-project
key: ${{ runner.os }}-norm-${{ hashFiles('externals/llvm-project/llvm/CMakeLists.txt') }}
key: ${{ runner.os }}-norm-${{ hashFiles('**/CMakeLists.txt') }}

- name: Git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
Expand All @@ -39,7 +45,7 @@ jobs:
- name: Build and test mlir-tutorial
run: |
mkdir build && cd build
cmake -DLLVM_DIR=$PWD/../externals/llvm-project/build/lib/cmake/llvm -DMLIR_DIR=$PWD/../externals/llvm-project/build/lib/cmake/mlir ..
cmake -DLLVM_DIR=${GITHUB_WORKSPACE}/externals/llvm-project/build/lib/cmake/llvm -DMLIR_DIR=${GITHUB_WORKSPACE}/externals/llvm-project/build/lib/cmake/mlir ..
cmake --build . --target MLIRAffineFullUnrollPasses
cmake --build . --target MLIRMulToAddPasses
cmake --build . --target mlir-headers
Expand Down

0 comments on commit b909ff3

Please sign in to comment.