Skip to content

Commit

Permalink
Use Ninja to build llvm in the ci (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbarton authored Jan 9, 2025
1 parent c446c3e commit 508823a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/MacOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ jobs:
done
brew upgrade openssl >/dev/null 2>&1
brew upgrade
brew install ninja
- name: Build LLVM/Cling if the cache is invalid
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
Expand Down Expand Up @@ -238,11 +239,12 @@ jobs:
-DLLVM_ENABLE_ZSTD=OFF \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_LIBXML2=OFF \
-G Ninja \
../llvm
cmake --build . --target clang --parallel ${{ env.ncpus }}
cmake --build . --target cling --parallel ${{ env.ncpus }}
ninja clang -j ${{ env.ncpus }}
ninja cling -j ${{ env.ncpus }}
# Now build gtest.a and gtest_main for CppInterOp to run its tests.
cmake --build . --target gtest_main --parallel ${{ env.ncpus }}
ninja gtest_main -j ${{ env.ncpus }}
else
# Apply patches
llvm_vers=$(echo "${{ matrix.clang-runtime }}" | tr '[:lower:]' '[:upper:]')
Expand All @@ -262,9 +264,9 @@ jobs:
-DLLVM_ENABLE_ZSTD=OFF \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_LIBXML2=OFF \
-G Ninja \
../llvm
cmake --build . --target clang clang-repl --parallel ${{ env.ncpus }}
ninja clang clang-repl -j ${{ env.ncpus }}
fi
cd ../
rm -rf $(find . -maxdepth 1 ! -name "build" ! -name "llvm" ! -name "clang" ! -name ".")
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
run: |
# Install deps
sudo apt-get update
sudo apt-get install valgrind
sudo apt-get install valgrind ninja-build
sudo apt-get autoremove
sudo apt-get clean
Expand Down Expand Up @@ -175,11 +175,12 @@ jobs:
-DLLVM_ENABLE_ZSTD=OFF \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_LIBXML2=OFF \
-G Ninja \
../llvm
cmake --build . --target clang --parallel ${{ env.ncpus }}
cmake --build . --target cling --parallel ${{ env.ncpus }}
ninja clang -j ${{ env.ncpus }}
ninja cling -j ${{ env.ncpus }}
# Now build gtest.a and gtest_main for CppInterOp to run its tests.
cmake --build . --target gtest_main --parallel ${{ env.ncpus }}
ninja gtest_main -j ${{ env.ncpus }}
else
# Apply patches
llvm_vers=$(echo "${{ matrix.clang-runtime }}" | tr '[:lower:]' '[:upper:]')
Expand All @@ -199,9 +200,9 @@ jobs:
-DLLVM_ENABLE_ZSTD=OFF \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_LIBXML2=OFF \
-G Ninja \
../llvm
cmake --build . --target clang clang-repl --parallel ${{ env.ncpus }}
ninja clang clang-repl -j ${{ env.ncpus }}
fi
cd ../
rm -rf $(find . -maxdepth 1 ! -name "build" ! -name "llvm" ! -name "clang" ! -name ".")
Expand Down

0 comments on commit 508823a

Please sign in to comment.