Skip to content

Commit

Permalink
mlir: Point CI build to install directories instead of build
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianschuiki committed Nov 24, 2021
1 parent 68651cb commit 5a35b81
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/build-circt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ cd circt/build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=../install \
-DMLIR_DIR=$PWD/../llvm/build/lib/cmake/mlir \
-DLLVM_DIR=$PWD/../llvm/build/lib/cmake/llvm \
-DMLIR_DIR=$PWD/../llvm/install/lib/cmake/mlir \
-DLLVM_DIR=$PWD/../llvm/install/lib/cmake/llvm \
-DLLVM_ENABLE_ASSERTIONS=ON

cmake --build . --target install -- -j$(nproc)
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
id: env
run: |
echo "CIRCT_SYS_CIRCT_DIR=$GITHUB_WORKSPACE/circt" >> $GITHUB_ENV
echo "CIRCT_SYS_CIRCT_BUILD_DIR=$GITHUB_WORKSPACE/circt/install" >> $GITHUB_ENV
echo "CIRCT_SYS_LLVM_DIR=$GITHUB_WORKSPACE/circt/llvm" >> $GITHUB_ENV
echo "CIRCT_SYS_LLVM_BUILD_DIR=$GITHUB_WORKSPACE/circt/llvm/install" >> $GITHUB_ENV
echo "::set-output name=circt-hash::$(git rev-parse @:./circt)"
echo "::set-output name=llvm-hash::$(cd circt && git rev-parse @:./llvm)"
Expand All @@ -59,7 +62,7 @@ jobs:
id: cache-llvm
uses: martijnhols/actions-cache/restore@v3
with:
path: circt/llvm/build
path: circt/llvm/install
key: ${{ runner.os }}-llvm-${{ hashFiles('.github/build-llvm.sh') }}-${{ steps.env.outputs.llvm-hash }}

- name: Rebuild LLVM
Expand All @@ -70,15 +73,15 @@ jobs:
if: steps.cache-llvm.outputs.cache-hit != 'true'
uses: martijnhols/actions-cache/save@v3
with:
path: circt/llvm/build
path: circt/llvm/install
key: ${{ steps.cache-llvm.outputs.primary-key }}

# Fetch CIRCT from the cache if possible, otherwise rebuild it.
- name: Fetch CIRCT from cache
id: cache-circt
uses: martijnhols/actions-cache/restore@v3
with:
path: circt/build
path: circt/install
key: ${{ runner.os }}-circt-${{ hashFiles('.github/build-circt.sh') }}-${{ steps.env.outputs.circt-hash }}

- name: Rebuild CIRCT
Expand All @@ -89,7 +92,7 @@ jobs:
if: steps.cache-circt.outputs.cache-hit != 'true'
uses: martijnhols/actions-cache/save@v3
with:
path: circt/build
path: circt/install
key: ${{ steps.cache-circt.outputs.primary-key }}

# Run the quick check build.
Expand All @@ -114,7 +117,7 @@ jobs:

# Run the tests.
- name: Run lit tests
run: circt/llvm/build/bin/llvm-lit test -v
run: circt/llvm/install/bin/llvm-lit test -v
- name: Run regression tests (old)
run: env TERM=xterm-color test/run.sh
- name: Run regression tests (new)
Expand Down

0 comments on commit 5a35b81

Please sign in to comment.