Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbarton authored Feb 8, 2024
1 parent 234e6bc commit b241f6d
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ jobs:
brew link --overwrite "$pkg"
done
brew upgrade
brew install libomp
- name: Restore Cache LLVM/Clang runtime build directory
uses: actions/cache/restore@v3
Expand All @@ -206,42 +205,34 @@ jobs:
cd ./cling
git checkout tags/v${{ matrix.cling-version }}
cd ..
CLING_DIR="$(pwd)/cling"
git clone --depth=1 -b cling-llvm${{ matrix.clang-runtime }} https://github.com/root-project/llvm-project.git clang-dev
git clone --depth=1 -b cling-llvm${{ matrix.clang-runtime }} https://github.com/root-project/llvm-project.git
else # repl
git clone --depth=1 -b release/${{ matrix.clang-runtime }}.x https://github.com/llvm/llvm-project.git clang-dev
git clone --depth=1 -b release/${{ matrix.clang-runtime }}.x https://github.com/llvm/llvm-project.git
fi
cd clang-dev
# Build
mkdir build
mkdir inst
if [[ "${cling_on}" == "ON" ]]; then
cd build
#FIXME: Unable to compile root-project/llvm-project openmp
#on osx on Github runner, despite being able to locally
os="${{ matrix.os }}"
if [[ "${os}" == "macos"* ]]; then
PROJECTS=clang
else
PROJECTS='"clang;openmp"'
fi
cmake -DLLVM_ENABLE_PROJECTS=$PROJECTS \
cmake -DLLVM_ENABLE_PROJECTS="clang;openmp" \
-DLLVM_EXTERNAL_PROJECTS=cling \
-DLLVM_EXTERNAL_CLING_SOURCE_DIR=$CLING_DIR \
-DLLVM_EXTERNAL_CLING_SOURCE_DIR=../../cling \
-DLLVM_TARGETS_TO_BUILD="host;NVPTX" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_OPTIMIZED_TABLEGEN=OFF \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_LLD=ON \
-DCLANG_ENABLE_STATIC_ANALYZER=OFF \
-DCLANG_ENABLE_ARCMT=OFF \
-DCLANG_ENABLE_FORMAT=OFF \
-DCLANG_ENABLE_BOOTSTRAP=OFF \
-DCMAKE_INSTALL_PREFIX=../inst \
-DLLVM_ENABLE_LLD=ON \
-DLLVM_BUILD_TESTS=OFF \
../llvm
cmake --build . --target all --parallel ${{ env.ncpus }}
cmake --build . --target clang --parallel ${{ env.ncpus }}
cmake --build . --target cling --parallel ${{ env.ncpus }}
cmake --build . --target openmp --parallel ${{ env.ncpus }}
# Now build gtest.a and gtest_main for CppInterOp to run its tests.
cmake --build . --target gtest_main --parallel ${{ env.ncpus }}
cmake --build . --target install --parallel ${{ env.ncpus }}
else
# Apply patches
Expand All @@ -251,7 +242,6 @@ jobs:
cmake -DLLVM_ENABLE_PROJECTS="clang;openmp" \
-DLLVM_TARGETS_TO_BUILD="host;NVPTX" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_OPTIMIZED_TABLEGEN=OFF \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCLANG_ENABLE_STATIC_ANALYZER=OFF \
-DCLANG_ENABLE_ARCMT=OFF \
Expand All @@ -267,6 +257,7 @@ jobs:
cd ..
rm -rf $(find . -maxdepth 1 ! -name "inst" ! -name ".")
cd ..
mv llvm-project clang-dev
- name: Save Cache LLVM/Clang runtime build directory
uses: actions/cache/save@v3
Expand Down

0 comments on commit b241f6d

Please sign in to comment.