Skip to content

Commit

Permalink
merge origin/master
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyu1994 committed Jul 28, 2022
2 parents 0cbe02d + f94050a commit 827a04a
Show file tree
Hide file tree
Showing 208 changed files with 16,920 additions and 2,938 deletions.
11 changes: 5 additions & 6 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 3.3.1.99.{build}
version: 3.3.2.99.{build}

image: Visual Studio 2015
platform: x64
configuration: # a trick to construct a build matrix with multiple Python versions
- 3.7
- '3.7'

# only build pull requests and
# commits to 'master'
Expand All @@ -27,16 +27,15 @@ install:
- set PYTHON_VERSION=%CONFIGURATION%
- set CONDA_ENV="test-env"
- ps: |
switch ($env:PYTHON_VERSION) {
"3.7" {$env:MINICONDA = "C:\Miniconda37-x64"}
default {$env:MINICONDA = "C:\Miniconda37-x64"}
}
$env:MINICONDA = "C:\Miniconda3-x64"
$env:PATH = "$env:MINICONDA;$env:MINICONDA\Scripts;$env:PATH"
$env:BUILD_SOURCESDIRECTORY = "$env:APPVEYOR_BUILD_FOLDER"
$env:LGB_VER = (Get-Content $env:APPVEYOR_BUILD_FOLDER\VERSION.txt).trim()
build: false

test_script:
- conda config --add channels conda-forge
- conda config --set channel_priority strict
- conda init powershell
- powershell.exe -ExecutionPolicy Bypass -File %APPVEYOR_BUILD_FOLDER%\.ci\test_windows.ps1
60 changes: 37 additions & 23 deletions .ci/lint_r_code.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,49 @@ interactive_text <- paste0(
)

LINTERS_TO_USE <- list(
"absolute_path" = lintr::absolute_path_linter
, "assignment" = lintr::assignment_linter
, "closed_curly" = lintr::closed_curly_linter
, "commas" = lintr::commas_linter
, "equals_na" = lintr::equals_na_linter
, "function_left" = lintr::function_left_parentheses_linter
, "implicit_integers" = lintr::implicit_integer_linter
, "infix_spaces" = lintr::infix_spaces_linter
"absolute_path" = lintr::absolute_path_linter()
, "any_duplicated" = lintr::any_duplicated_linter()
, "any_is_na" = lintr::any_is_na_linter()
, "assignment" = lintr::assignment_linter()
, "braces" = lintr::brace_linter()
, "class_equals" = lintr::class_equals_linter()
, "commas" = lintr::commas_linter()
, "duplicate_argument" = lintr::duplicate_argument_linter()
, "equals_na" = lintr::equals_na_linter()
, "function_left" = lintr::function_left_parentheses_linter()
, "implicit_integers" = lintr::implicit_integer_linter()
, "infix_spaces" = lintr::infix_spaces_linter()
, "inner_combine" = lintr::inner_combine_linter()
, "literal_coercion" = lintr::literal_coercion_linter()
, "long_lines" = lintr::line_length_linter(length = 120L)
, "no_tabs" = lintr::no_tab_linter
, "non_portable_path" = lintr::nonportable_path_linter
, "open_curly" = lintr::open_curly_linter
, "paren_brace_linter" = lintr::paren_brace_linter
, "semicolon" = lintr::semicolon_terminator_linter
, "seq" = lintr::seq_linter
, "single_quotes" = lintr::single_quotes_linter
, "spaces_inside" = lintr::spaces_inside_linter
, "spaces_left_parens" = lintr::spaces_left_parentheses_linter
, "missing_argument" = lintr::missing_argument_linter()
, "no_tabs" = lintr::no_tab_linter()
, "non_portable_path" = lintr::nonportable_path_linter()
, "numeric_leading_zero" = lintr::numeric_leading_zero_linter()
, "outer_negation" = lintr::outer_negation_linter()
, "package_hooks" = lintr::package_hooks_linter()
, "paste" = lintr::paste_linter()
, "regex_subset" = lintr::regex_subset_linter()
, "semicolon" = lintr::semicolon_linter()
, "seq" = lintr::seq_linter()
, "single_quotes" = lintr::single_quotes_linter()
, "spaces_inside" = lintr::spaces_inside_linter()
, "spaces_left_parens" = lintr::spaces_left_parentheses_linter()
, "sprintf" = lintr::sprintf_linter()
, "string_boundary" = lintr::string_boundary_linter()
, "todo_comments" = lintr::todo_comment_linter(c("todo", "fixme", "to-do"))
, "trailing_blank" = lintr::trailing_blank_lines_linter
, "trailing_white" = lintr::trailing_whitespace_linter
, "true_false" = lintr::T_and_F_symbol_linter
, "trailing_blank" = lintr::trailing_blank_lines_linter()
, "trailing_white" = lintr::trailing_whitespace_linter()
, "true_false" = lintr::T_and_F_symbol_linter()
, "undesirable_function" = lintr::undesirable_function_linter(
fun = c(
"cat" = "CRAN forbids the use of cat() in packages except in special cases. Use message() or warning()."
, "cbind" = paste0(
"cbind is an unsafe way to build up a data frame. merge() or direct "
, "column assignment is preferred."
)
, "dyn.load" = "Directly loading/unloading .dll/.so files in package code should not be necessary."
, "dyn.unload" = "Directly loading/unloading .dll/.so files in package code should not be necessary."
, "dyn.load" = "Directly loading or unloading .dll or .so files in package code should not be necessary."
, "dyn.unload" = "Directly loading or unloading .dll or .so files in package code should not be necessary."
, "help" = interactive_text
, "ifelse" = "The use of ifelse() is dangerous because it will silently allow mixing types."
, "install.packages" = interactive_text
Expand All @@ -83,7 +95,9 @@ LINTERS_TO_USE <- list(
, "??" = interactive_text
)
)
, "unneeded_concatenation" = lintr::unneeded_concatenation_linter
, "unneeded_concatenation" = lintr::unneeded_concatenation_linter()
, "unreachable_code" = lintr::unreachable_code_linter()
, "vector_logic" = lintr::vector_logic_linter()
)

noquote(paste0(length(FILES_TO_LINT), " R files need linting"))
Expand Down
92 changes: 0 additions & 92 deletions .ci/run_rhub_solaris_checks.R

This file was deleted.

62 changes: 18 additions & 44 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ if [[ $OS_NAME == "macos" ]]; then
if [[ $TASK == "swig" ]]; then
brew install swig
fi
brew install graphviz
curl -sL -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
curl \
-sL \
-o miniforge.sh \
https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh
else # Linux
if [[ $IN_UBUNTU_LATEST_CONTAINER == "true" ]]; then
# fixes error "unable to initialize frontend: Dialog"
Expand All @@ -42,9 +44,6 @@ else # Linux
libicu66 \
libssl1.1 \
libunwind8 \
libxau6 \
libxext6 \
libxrender1 \
locales \
netcat \
unzip \
Expand Down Expand Up @@ -72,66 +71,41 @@ else # Linux
sudo apt-get install --no-install-recommends -y \
libboost1.74-dev \
ocl-icd-opencl-dev
cd $BUILD_DIRECTORY # to avoid permission errors
curl -sL -o AMD-APP-SDKInstaller.tar.bz2 https://github.com/microsoft/LightGBM/releases/download/v2.0.12/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
tar -xjf AMD-APP-SDKInstaller.tar.bz2
mkdir -p $OPENCL_VENDOR_PATH
mkdir -p $AMDAPPSDK_PATH
sh AMD-APP-SDK*.sh --tar -xf -C $AMDAPPSDK_PATH
mv $AMDAPPSDK_PATH/lib/x86_64/sdk/* $AMDAPPSDK_PATH/lib/x86_64/
echo libamdocl64.so > $OPENCL_VENDOR_PATH/amdocl64.icd
if [[ $IN_UBUNTU_LATEST_CONTAINER == "true" ]]; then
sudo apt-get install --no-install-recommends -y \
pocl-opencl-icd
fi
fi
ARCH=$(uname -m)
if [[ $TASK == "cuda" ]]; then
if [[ $TASK == "cuda" || $TASK == "cuda_exp" ]]; then
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
apt-get update
apt-get install --no-install-recommends -y \
curl \
graphviz \
libxau6 \
libxext6 \
libxrender1 \
lsb-release \
software-properties-common
if [[ $COMPILER == "clang" ]]; then
apt-get install --no-install-recommends -y \
clang \
libomp-dev
fi
curl \
-s \
-L \
--insecure \
https://apt.kitware.com/keys/kitware-archive-latest.asc \
| apt-key add -
curl -sL https://apt.kitware.com/keys/kitware-archive-latest.asc | apt-key add -
apt-add-repository "deb https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" -y
apt-get --allow-unauthenticated upgrade -y
apt-get --allow-unauthenticated update -y
apt-get update
apt-get install --no-install-recommends -y \
cmake
else
if [[ $ARCH != "x86_64" ]]; then
yum update -y
yum install -y \
graphviz
else
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
graphviz
fi
fi
if [[ $SETUP_CONDA != "false" ]]; then
if [[ $ARCH == "x86_64" ]]; then
curl -sL -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
else
curl -sL -o conda.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-${ARCH}.sh
fi
ARCH=$(uname -m)
curl \
-sL \
-o miniforge.sh \
https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-${ARCH}.sh
fi
fi

if [[ "${TASK}" != "r-package" ]]; then
if [[ "${TASK}" != "r-package" ]] && [[ "${TASK}" != "r-rchk" ]]; then
if [[ $SETUP_CONDA != "false" ]]; then
sh conda.sh -b -p $CONDA
sh miniforge.sh -b -p $CONDA
fi
conda config --set always_yes yes --set changeps1 no
conda update -q -y conda
Expand Down
Loading

0 comments on commit 827a04a

Please sign in to comment.