-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[R-package] [ci] remove unnecessary include in linear_tree_learner (fixes #6264) #6265
Merged
Merged
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
76aa831
[R-package] [ci] fix clang18 warning
jameslamb a66f9b2
simmplify
jameslamb 3a029eb
typo
jameslamb 580f1db
fix flags
jameslamb a4301c3
fixes
jameslamb 08da818
more fixes
jameslamb 52097d0
fix syntax
jameslamb f87fcf9
get more logs
jameslamb 8fe7967
try linking against libc++
jameslamb 2e70b60
upgrade to fmt 10.2.1
jameslamb fc02a16
try removing unused <string> includes
jameslamb 40ad59a
add back serial_tree_learner include
jameslamb 19ed905
revert fmt change
jameslamb af47e26
restore CI
jameslamb 738a660
Merge branch 'master' into fix/clang-18-warning
jameslamb 49b6652
Merge branch 'master' into fix/clang-18-warning
jameslamb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/bin/bash | ||
|
||
# [description] | ||
# | ||
# Installs a development version of clang and the other LLVM tools. | ||
# | ||
|
||
set -e -E -u -o pipefail | ||
|
||
CLANG_VERSION=${1} | ||
|
||
apt-get autoremove -y --purge \ | ||
clang-* \ | ||
libclang-* \ | ||
libunwind-* \ | ||
llvm-* | ||
|
||
apt-get update -y | ||
apt-get install --no-install-recommends -y \ | ||
gnupg \ | ||
lsb-release \ | ||
software-properties-common \ | ||
wget | ||
|
||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - | ||
|
||
# ref: https://apt.llvm.org/ | ||
add-apt-repository -y "deb http://apt.llvm.org/unstable/ llvm-toolchain main" | ||
add-apt-repository -y "deb-src http://apt.llvm.org/unstable/ llvm-toolchain main" | ||
|
||
apt-get install -y --no-install-recommends \ | ||
clang-${CLANG_VERSION} \ | ||
clangd-${CLANG_VERSION} \ | ||
clang-format-${CLANG_VERSION} \ | ||
clang-tidy-${CLANG_VERSION} \ | ||
clang-tools-${CLANG_VERSION} \ | ||
lldb-${CLANG_VERSION} \ | ||
lld-${CLANG_VERSION} \ | ||
llvm-${CLANG_VERSION}-dev \ | ||
llvm-${CLANG_VERSION}-tools \ | ||
libomp-${CLANG_VERSION}-dev \ | ||
libc++-${CLANG_VERSION}-dev \ | ||
libc++abi-${CLANG_VERSION}-dev \ | ||
libclang-common-${CLANG_VERSION}-dev \ | ||
libclang-${CLANG_VERSION}-dev \ | ||
libclang-cpp${CLANG_VERSION}-dev \ | ||
libunwind-${CLANG_VERSION}-dev | ||
|
||
# overwriting the stuff in /usr/bin is simpler and more reliable than | ||
# updating PATH, LD_LIBRARY_PATH, etc. | ||
cp --remove-destination /usr/lib/llvm-${CLANG_VERSION}/bin/* /usr/bin/ | ||
|
||
# per https://www.stats.ox.ac.uk/pub/bdr/Rconfig/r-devel-linux-x86_64-fedora-clang | ||
# | ||
# clang was built to use libc++: for a version built to default to libstdc++ | ||
# (as shipped by Fedora/Debian/Ubuntu), add -stdlib=libc++ to CXX | ||
# and install the libcxx-devel/libc++-dev package. | ||
mkdir -p "${HOME}/.R" | ||
|
||
cat << EOF > "${HOME}/.R/Makevars" | ||
CXX += -stdlib=libc++ | ||
CXX11 += -stdlib=libc++ | ||
CXX14 += -stdlib=libc++ | ||
CXX17 += -stdlib=libc++ | ||
CXX20 += -stdlib=libc++ | ||
EOF | ||
|
||
echo "" | ||
echo "done installing clang" | ||
clang --version | ||
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this, compiler invocations and most warnings are not visible in CI logs because
R CMD check
redirects them to this file instead of printing them.I think this will be generically useful for CI in the future, and in fact we already do that for most other R CI jobs:
LightGBM/.ci/test_r_package.sh
Lines 226 to 232 in 2e3543c