Skip to content

Commit 3ece4eb

Browse files
Use ninja to build llvm and circt, pin Ubuntu version in CI
Uing makefiles and parallel build seems to cause errors in CI.
1 parent 8fd4e59 commit 3ece4eb

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

.github/build-circt.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ set -e
33

44
mkdir -p circt/build
55
cd circt/build
6-
cmake .. \
6+
cmake -G Ninja .. \
77
-DCMAKE_BUILD_TYPE=Release \
88
-DMLIR_DIR=$PWD/../llvm/build/lib/cmake/mlir \
99
-DLLVM_DIR=$PWD/../llvm/build/lib/cmake/llvm \
1010
-DLLVM_ENABLE_ASSERTIONS=ON
1111

12-
cmake --build . -- -j$(nproc)
12+
ninja -j$(nproc)
13+

.github/build-llvm.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e
33

44
mkdir -p circt/llvm/build
55
cd circt/llvm/build
6-
cmake ../llvm \
6+
cmake -G Ninja ../llvm \
77
-DCMAKE_BUILD_TYPE=Release \
88
-DLLVM_BUILD_EXAMPLES=OFF \
99
-DLLVM_ENABLE_ASSERTIONS=ON \
@@ -14,4 +14,4 @@ cmake ../llvm \
1414
-DLLVM_OPTIMIZED_TABLEGEN=ON \
1515
-DLLVM_TARGETS_TO_BUILD="host"
1616

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

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: CI
55
jobs:
66
lints:
77
name: Lints
8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-22.04
99
steps:
1010
- name: Checkout sources
1111
uses: actions/checkout@v2
@@ -32,7 +32,7 @@ jobs:
3232

3333
check:
3434
name: Checks
35-
runs-on: ubuntu-latest
35+
runs-on: ubuntu-22.04
3636
steps:
3737
- name: Checkout sources
3838
uses: actions/checkout@v2
@@ -64,7 +64,9 @@ jobs:
6464

6565
- name: Rebuild LLVM
6666
if: steps.cache-llvm.outputs.cache-hit != 'true'
67-
run: .github/build-llvm.sh
67+
run: |
68+
sudo apt-get install ninja-build
69+
.github/build-llvm.sh
6870
6971
- name: Upload LLVM to cache
7072
if: steps.cache-llvm.outputs.cache-hit != 'true'
@@ -83,7 +85,9 @@ jobs:
8385

8486
- name: Rebuild CIRCT
8587
if: steps.cache-circt.outputs.cache-hit != 'true'
86-
run: .github/build-circt.sh
88+
run: |
89+
sudo apt-get install ninja-build
90+
.github/build-circt.sh
8791
8892
- name: Upload CIRCT to cache
8993
if: steps.cache-circt.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)