Skip to content

Commit

Permalink
Use ninja to build llvm and circt, pin Ubuntu version in CI
Browse files Browse the repository at this point in the history
Uing makefiles and parallel build seems to cause errors in CI.
  • Loading branch information
stefanlippuner committed Sep 30, 2023
1 parent 8fd4e59 commit 3ece4eb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/build-circt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ set -e

mkdir -p circt/build
cd circt/build
cmake .. \
cmake -G Ninja .. \
-DCMAKE_BUILD_TYPE=Release \
-DMLIR_DIR=$PWD/../llvm/build/lib/cmake/mlir \
-DLLVM_DIR=$PWD/../llvm/build/lib/cmake/llvm \
-DLLVM_ENABLE_ASSERTIONS=ON

cmake --build . -- -j$(nproc)
ninja -j$(nproc)

4 changes: 2 additions & 2 deletions .github/build-llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

mkdir -p circt/llvm/build
cd circt/llvm/build
cmake ../llvm \
cmake -G Ninja ../llvm \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_BUILD_EXAMPLES=OFF \
-DLLVM_ENABLE_ASSERTIONS=ON \
Expand All @@ -14,4 +14,4 @@ cmake ../llvm \
-DLLVM_OPTIMIZED_TABLEGEN=ON \
-DLLVM_TARGETS_TO_BUILD="host"

cmake --build . -- -j$(nproc)
ninja -j$(nproc)
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: CI
jobs:
lints:
name: Lints
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
Expand All @@ -32,7 +32,7 @@ jobs:

check:
name: Checks
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v2
Expand Down Expand Up @@ -64,7 +64,9 @@ jobs:

- name: Rebuild LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: .github/build-llvm.sh
run: |
sudo apt-get install ninja-build
.github/build-llvm.sh
- name: Upload LLVM to cache
if: steps.cache-llvm.outputs.cache-hit != 'true'
Expand All @@ -83,7 +85,9 @@ jobs:

- name: Rebuild CIRCT
if: steps.cache-circt.outputs.cache-hit != 'true'
run: .github/build-circt.sh
run: |
sudo apt-get install ninja-build
.github/build-circt.sh
- name: Upload CIRCT to cache
if: steps.cache-circt.outputs.cache-hit != 'true'
Expand Down

0 comments on commit 3ece4eb

Please sign in to comment.