"vscode:/vscode.git/clone" did not exist on "3df9698bf31c7309e0b243105bd35c317c7a9198"
Unverified Commit 552fafc7 authored by shiyu1994's avatar shiyu1994 Committed by GitHub
Browse files

Merge branch 'master' into rocm3

parents 5acc6781 7c10e6d8
version: 4.6.0.99.{build}
image: Visual Studio 2015
image: Visual Studio 2017
platform: x64
configuration:
- '3.9'
......
......@@ -153,7 +153,7 @@ if [[ "${TASK}" != "cpp-tests" ]] && [[ "${TASK}" != "r-package" ]]; then
sh miniforge.sh -b -p "${CONDA}"
fi
conda config --set always_yes yes --set changeps1 no
conda update -q -y conda
conda update -q -y conda conda-libmamba-solver
# print output of 'conda info', to help in submitting bug reports
echo "conda info:"
......
......@@ -153,6 +153,10 @@ elif [[ $R_BUILD_TYPE == "cran" ]]; then
cd "${R_CMD_CHECK_DIR}"
fi
if [[ $PRODUCES_ARTIFACTS == "true" ]]; then
cp "${PKG_TARBALL}" "${BUILD_ARTIFACTSTAGINGDIRECTORY}/lightgbm-${LGB_VER}-r-cran.tar.gz"
fi
declare -i allowed_notes=0
bash "${BUILD_DIRECTORY}/.ci/run-r-cmd-check.sh" \
"${PKG_TARBALL}" \
......
......@@ -66,7 +66,7 @@ if ($env:TASK -eq "swig") {
conda init powershell
conda activate
conda config --set always_yes yes --set changeps1 no
conda update -q -y conda "python=$env:PYTHON_VERSION[build=*_cp*]"
conda update -q -y conda conda-libmamba-solver "python=$env:PYTHON_VERSION[build=*_cp*]"
# print output of 'conda info', to help in submitting bug reports
Write-Output "conda info:"
......
......@@ -13,6 +13,9 @@ ARCH=$(uname -m)
LGB_VER=$(head -n 1 "${BUILD_DIRECTORY}/VERSION.txt")
# create the artifact upload directory if it doesn't exist yet
mkdir -p "${BUILD_ARTIFACTSTAGINGDIRECTORY}"
if [[ $OS_NAME == "macos" ]] && [[ $COMPILER == "gcc" ]]; then
export CXX=g++-14
export CC=gcc-14
......
......@@ -74,9 +74,11 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: true
- name: Setup and run tests
run: |
export BUILD_ARTIFACTSTAGINGDIRECTORY="${{ github.workspace }}/artifacts"
export BUILD_DIRECTORY="$GITHUB_WORKSPACE"
export PATH=$CONDA/bin:$PATH
......
......@@ -21,6 +21,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: false
- name: Setup and run tests
run: |
......
......@@ -14,6 +14,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: false
- name: Check that all tests succeeded
shell: bash
......
......@@ -14,6 +14,9 @@ concurrency:
cancel-in-progress: true
env:
# tell scripts where to put artifacts
# (this variable name is left over from when jobs ran on Azure DevOps)
BUILD_ARTIFACTSTAGINGDIRECTORY: '${{ github.workspace }}/artifacts'
CMAKE_BUILD_PARALLEL_LEVEL: 4
SKBUILD_STRICT_CONFIG: true
......@@ -27,6 +30,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: true
- name: Setup and run tests
shell: bash
......@@ -106,6 +110,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: true
- name: Setup and run tests
shell: bash
......@@ -140,6 +145,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: true
- name: Create wheel
run: |
......@@ -174,6 +180,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: true
- name: Create wheel
run: |
......
......@@ -14,6 +14,9 @@ concurrency:
cancel-in-progress: true
env:
# tell scripts where to put artifacts
# (this variable name is left over from when jobs ran on Azure DevOps)
BUILD_ARTIFACTSTAGINGDIRECTORY: '${{ github.workspace }}/artifacts'
# in CMake-driven builds, parallelize compilation
CMAKE_BUILD_PARALLEL_LEVEL: 4
# on Debian-based images, avoid interactive prompts
......@@ -114,6 +117,8 @@ jobs:
r_version: 4.3
build_type: cran
container: 'ubuntu:22.04'
produces-artifacts: 'true'
artifact-name: r-cran-package
- os: macos-13
task: r-package
compiler: clang
......@@ -160,6 +165,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: true
- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2
......@@ -182,6 +188,8 @@ jobs:
export IN_UBUNTU_BASE_CONTAINER="true"
fi
export BUILD_DIRECTORY="$GITHUB_WORKSPACE"
export LGB_VER=$(head -n 1 "${BUILD_DIRECTORY}/VERSION.txt")
export PRODUCES_ARTIFACTS="${{ matrix.produces-artifacts }}"
export R_VERSION="${{ matrix.r_version }}"
export R_BUILD_TYPE="${{ matrix.build_type }}"
$GITHUB_WORKSPACE/.ci/setup.sh
......@@ -198,6 +206,13 @@ jobs:
$env:COMPILER = "${{ matrix.compiler }}"
$env:TASK = "${{ matrix.task }}"
& "$env:GITHUB_WORKSPACE/.ci/test-windows.ps1"
- name: Upload artifacts
if: ${{ matrix.produces-artifacts == 'true' }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: ${{ env.BUILD_ARTIFACTSTAGINGDIRECTORY }}/*.tar.gz
if-no-files-found: error
test-r-sanitizers:
name: r-sanitizers (ubuntu-latest, R-devel, ${{ matrix.compiler }} ASAN/UBSAN)
timeout-minutes: 60
......@@ -219,6 +234,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: true
- name: Install packages
shell: bash
......@@ -259,6 +275,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: true
- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2
......
......@@ -28,6 +28,7 @@ jobs:
with:
fetch-depth: 5
submodules: true
persist-credentials: false
repository: microsoft/LightGBM
ref: "refs/pull/${{ github.event.client_payload.pr_number }}/merge"
- name: Send init status
......
......@@ -30,6 +30,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: false
- name: Setup and run tests
shell: bash
......@@ -48,6 +49,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: false
- name: Setup and run tests
shell: bash
......@@ -70,6 +72,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: true
- name: Install packages
shell: bash
......
......@@ -18,6 +18,7 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 5
persist-credentials: false
submodules: false
- name: Trigger R valgrind tests
......
......@@ -331,33 +331,6 @@ jobs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: PackageAssets
artifactType: container
##############
# R_artifact #
##############
- job: R_artifact
condition: not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))
pool:
vmImage: 'ubuntu-22.04'
container: rbase
steps:
- script: |
git clean -d -f -x
displayName: 'Clean source directory'
- script: |
LGB_VER=$(head -n 1 VERSION.txt | sed "s/rc/-/g")
R_LIB_PATH=~/Rlib
export R_LIBS=${R_LIB_PATH}
mkdir -p ${R_LIB_PATH}
RDscript .ci/install-r-deps.R --build --include=RhpcBLASctl || exit 1
sh build-cran-package.sh --r-executable=RD || exit 1
mv lightgbm_${LGB_VER}.tar.gz $(Build.ArtifactStagingDirectory)/lightgbm-${LGB_VER}-r-cran.tar.gz
displayName: 'Build CRAN R-package'
- task: PublishBuildArtifacts@1
condition: succeeded()
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: R-package
artifactType: container
###########
# Package #
......@@ -368,7 +341,6 @@ jobs:
- Linux_latest
- macOS
- Windows
- R_artifact
condition: and(succeeded(), not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')))
pool:
vmImage: 'ubuntu-22.04'
......@@ -399,12 +371,6 @@ jobs:
inputs:
artifactName: PackageAssets
downloadPath: $(Build.SourcesDirectory)/binaries
- task: DownloadBuildArtifacts@0
displayName: Download R-package
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))
inputs:
artifactName: R-package
downloadPath: $(Build.SourcesDirectory)/R
- script: |
python "$(Build.SourcesDirectory)/.ci/create-nuget.py" "$(Build.SourcesDirectory)/binaries/PackageAssets"
displayName: 'Create NuGet configuration files'
......@@ -430,7 +396,6 @@ jobs:
title: '$(Build.SourceBranchName)'
assets: |
$(Build.SourcesDirectory)/binaries/PackageAssets/*
$(Build.SourcesDirectory)/R/R-package/*
$(Build.ArtifactStagingDirectory)/nuget/*.nupkg
$(Build.ArtifactStagingDirectory)/archives/*
assetUploadMode: 'delete'
......
......@@ -128,6 +128,14 @@ If you want to force `LightGBM` to use MSYS2 (for any R version), pass `--use-ms
Rscript build_r.R --use-msys2
```
**MinGW**
If you want to force `LightGBM` to use [MinGW](https://www.mingw-w64.org/) (for any R version), pass `--use-mingw` to the installation script.
```shell
Rscript build_r.R --use-mingw
```
#### Mac OS Preparation
You can perform installation either with **Apple Clang** or **gcc**. In case you prefer **Apple Clang**, you should install **OpenMP** (details for installation can be found in [Installation Guide](https://github.com/microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#apple-clang)) first. In case you prefer **gcc**, you need to install it (details for installation can be found in [Installation Guide](https://github.com/microsoft/LightGBM/blob/master/docs/Installation-Guide.rst#gcc)) and set some environment variables to tell R to use `gcc` and `g++`. If you install these from Homebrew, your versions of `g++` and `gcc` are most likely in `/usr/local/bin`, as shown below.
......
......@@ -11,7 +11,6 @@ CXX17=`"${R_EXE}" CMD config CXX17`
CXX17STD=`"${R_EXE}" CMD config CXX17STD`
CXX="${CXX17} ${CXX17STD}"
CXXFLAGS=`"${R_EXE}" CMD config CXX17FLAGS`
CXX_STD="CXX17"
CPPFLAGS=`"${R_EXE}" CMD config CPPFLAGS`
# LightGBM-specific flags
......@@ -98,9 +97,6 @@ then
fi
# Generate Makevars.win from Makevars.win.in
sed -e \
"s/@CXX_STD@/$CXX_STD/" \
< src/Makevars.win.in > src/Makevars.win
sed -e \
"s/@LGB_CPPFLAGS@/$LGB_CPPFLAGS/" \
< src/Makevars.win.in > src/Makevars.win
CXX_STD = @CXX_STD@
CXX_STD = CXX17
PKGROOT=.
......
......@@ -15,8 +15,6 @@ if (.Machine$sizeof.pointer != 8L) {
stop("LightGBM only supports 64-bit R, please check the version of R and Rtools.")
}
R_ver <- as.double(R.Version()$major) + as.double(R.Version()$minor) / 10.0
# Get some paths
source_dir <- file.path(R_PACKAGE_SOURCE, "src", fsep = "/")
build_dir <- file.path(source_dir, "build", fsep = "/")
......@@ -67,7 +65,6 @@ inst_dir <- file.path(R_PACKAGE_SOURCE, "inst", fsep = "/")
"Visual Studio 17 2022"
, "Visual Studio 16 2019"
, "Visual Studio 15 2017"
, "Visual Studio 14 2015"
)
working_vs_version <- NULL
for (vs_version in vs_versions) {
......@@ -162,11 +159,7 @@ if (use_mingw) {
# Rtools 4.0 moved from MinGW to MSYS toolchain. If user tries
# Visual Studio install but that fails, fall back to the toolchain
# supported in Rtools
if (R_ver >= 4.0) {
windows_toolchain <- "MSYS2"
} else {
windows_toolchain <- "MinGW"
}
}
windows_build_tool <- WINDOWS_BUILD_TOOLS[[windows_toolchain]][["build_tool"]]
windows_makefile_generator <- WINDOWS_BUILD_TOOLS[[windows_toolchain]][["makefile_generator"]]
......
......@@ -39,7 +39,7 @@ data.table::setDTthreads(1L)
# [description]
# test that every element of 'x' is in 'y'
#
# testthat::expect_in() was added in {testthat} v3.1.19
# testthat::expect_in() was added in {testthat} v3.1.19.
# This is here to support a similar interface on older {testthat} versions.
.expect_in <- function(x, y) {
if (exists("expect_in")) {
......
......@@ -78,8 +78,6 @@ if(WIN32)
set(MSVC_TOOLCHAIN_ID "142")
elseif(${MSVC_VERSION} GREATER 1909)
set(MSVC_TOOLCHAIN_ID "141")
elseif(${MSVC_VERSION} GREATER 1899)
set(MSVC_TOOLCHAIN_ID "140")
else()
message(FATAL_ERROR "Unsupported MSVC version number: ${MSVC_VERSION}")
endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment