зеркало из https://github.com/microsoft/LightGBM.git
[ci] remove conda from R CI jobs (#3573)
* [ci] always use latest conda version on GitHub Actions * try new use-conda version * just remove conda * skip conda even more
This commit is contained in:
Родитель
0b5e60dd10
Коммит
34187a86fa
|
@ -48,8 +48,10 @@ else # Linux
|
|||
fi
|
||||
fi
|
||||
|
||||
if [[ $TRAVIS == "true" ]] || [[ $GITHUB_ACTIONS == "true" ]] || [[ $OS_NAME == "macos" ]]; then
|
||||
if [[ "${TASK:0:9}" != "r-package" ]]; then
|
||||
if [[ $TRAVIS == "true" ]] || [[ $OS_NAME == "macos" ]]; then
|
||||
sh conda.sh -b -p $CONDA
|
||||
fi
|
||||
conda config --set always_yes yes --set changeps1 no
|
||||
conda update -q -y conda
|
||||
fi
|
||||
|
|
10
.ci/test.sh
10
.ci/test.sh
|
@ -8,6 +8,11 @@ elif [[ $OS_NAME == "linux" ]] && [[ $COMPILER == "clang" ]]; then
|
|||
export CC=clang
|
||||
fi
|
||||
|
||||
if [[ "${TASK:0:9}" == "r-package" ]]; then
|
||||
bash ${BUILD_DIRECTORY}/.ci/test_r_package.sh || exit -1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
conda create -q -y -n $CONDA_ENV python=$PYTHON_VERSION
|
||||
source activate $CONDA_ENV
|
||||
|
||||
|
@ -65,11 +70,6 @@ if [[ $TASK == "if-else" ]]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "${TASK:0:9}" == "r-package" ]]; then
|
||||
bash ${BUILD_DIRECTORY}/.ci/test_r_package.sh || exit -1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
conda install -q -y -n $CONDA_ENV joblib matplotlib numpy pandas psutil pytest python-graphviz scikit-learn scipy
|
||||
|
||||
if [[ $OS_NAME == "macos" ]] && [[ $COMPILER == "clang" ]]; then
|
||||
|
|
|
@ -89,12 +89,6 @@ if [[ $OS_NAME == "macos" ]]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
conda install \
|
||||
-y \
|
||||
-q \
|
||||
--no-deps \
|
||||
pandoc
|
||||
|
||||
# Manually install Depends and Imports libraries + 'testthat'
|
||||
# to avoid a CI-time dependency on devtools (for devtools::install_deps())
|
||||
packages="c('data.table', 'jsonlite', 'Matrix', 'R6', 'testthat')"
|
||||
|
|
|
@ -120,7 +120,6 @@ if (($env:COMPILER -eq "MINGW") -or ($env:R_BUILD_TYPE -eq "cran")) {
|
|||
Write-Output "Done installing MiKTeX"
|
||||
|
||||
Run-R-Code-Redirect-Stderr "result <- processx::run(command = 'initexmf', args = c('--set-config-value', '[MPM]AutoInstall=1'), echo = TRUE, windows_verbatim_args = TRUE, error_on_status = TRUE)" ; Check-Output $?
|
||||
conda install -q -y --no-deps pandoc
|
||||
}
|
||||
|
||||
Write-Output "Building R package"
|
||||
|
|
|
@ -120,6 +120,8 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 5
|
||||
submodules: true
|
||||
- name: Install pandoc
|
||||
uses: r-lib/actions/setup-pandoc@v1
|
||||
- name: Setup and run tests on Linux and macOS
|
||||
if: matrix.os == 'macOS-latest' || matrix.os == 'ubuntu-latest'
|
||||
shell: bash
|
||||
|
@ -135,17 +137,10 @@ jobs:
|
|||
export R_LINUX_VERSION=3.6.3-1bionic
|
||||
fi
|
||||
export BUILD_DIRECTORY="$GITHUB_WORKSPACE"
|
||||
export CONDA="$HOME/miniconda"
|
||||
export PATH="$CONDA/bin:${HOME}/.local/bin:$PATH"
|
||||
export R_VERSION="${{ matrix.r_version }}"
|
||||
export R_BUILD_TYPE="${{ matrix.build_type }}"
|
||||
$GITHUB_WORKSPACE/.ci/setup.sh
|
||||
$GITHUB_WORKSPACE/.ci/test.sh
|
||||
- name: Use conda on Windows
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
uses: conda-incubator/setup-miniconda@v1.7.0
|
||||
with:
|
||||
auto-update-conda: false
|
||||
- name: Setup and run tests on Windows
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
shell: pwsh -command ". {0}"
|
||||
|
@ -157,7 +152,6 @@ jobs:
|
|||
$env:COMPILER = "${{ matrix.compiler }}"
|
||||
$env:GITHUB_ACTIONS = "true"
|
||||
$env:TASK = "${{ matrix.task }}"
|
||||
conda init powershell
|
||||
& "$env:GITHUB_WORKSPACE/.ci/test_windows.ps1"
|
||||
test-r-sanitizers:
|
||||
name: r-package (ubuntu-latest, R-devel, GCC ASAN/UBSAN)
|
||||
|
|
Загрузка…
Ссылка в новой задаче