diff --git a/.ci/setup.sh b/.ci/setup.sh index 6f2597a8f8b9..752158ff3952 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -43,13 +43,13 @@ else # Linux chmod +x cmake.sh ./cmake.sh --prefix=/usr/local --exclude-subdir fi - if [[ $TRAVIS == "true" ]] || [[ $GITHUB_ACTIONS == "true" ]]; then + if [[ $SETUP_CONDA != "false" ]]; then wget -q -O conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh fi fi if [[ "${TASK:0:9}" != "r-package" ]]; then - if [[ $TRAVIS == "true" ]] || [[ $OS_NAME == "macos" ]]; then + if [[ $SETUP_CONDA != "false" ]]; then sh conda.sh -b -p $CONDA fi conda config --set always_yes yes --set changeps1 no diff --git a/.ci/test.sh b/.ci/test.sh index a32be65a93ed..63c6e4af6c05 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -18,7 +18,7 @@ source activate $CONDA_ENV cd $BUILD_DIRECTORY -if [[ $TRAVIS == "true" ]] && [[ $TASK == "check-docs" ]]; then +if [[ $TASK == "check-docs" ]]; then cd $BUILD_DIRECTORY/docs conda install -q -y -n $CONDA_ENV -c conda-forge doxygen pip install --user -r requirements.txt rstcheck git+git://github.com/linkchecker/linkchecker.git@b9390c9ef63f7e1e210b48bc7fe97f76e8d39501 @@ -41,7 +41,7 @@ if [[ $TRAVIS == "true" ]] && [[ $TASK == "check-docs" ]]; then exit 0 fi -if [[ $TRAVIS == "true" ]] && [[ $TASK == "lint" ]]; then +if [[ $TASK == "lint" ]]; then conda install -q -y -n $CONDA_ENV \ pycodestyle \ pydocstyle \ diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 6fbf6c5a5767..e08694c7bac2 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -8,6 +8,7 @@ trigger: pr: - master variables: + AZURE: 'true' PYTHON_VERSION: 3.8 CONDA_ENV: test-env resources: @@ -20,6 +21,7 @@ jobs: ########################################### variables: COMPILER: gcc + SETUP_CONDA: 'false' pool: vmImage: 'ubuntu-latest' container: ubuntu1404 @@ -46,7 +48,6 @@ jobs: - script: | echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY" echo "##vso[task.setvariable variable=OS_NAME]linux" - echo "##vso[task.setvariable variable=AZURE]true" echo "##vso[task.setvariable variable=LGB_VER]$(head -n 1 VERSION.txt)" echo "##vso[task.prependpath]$CONDA/bin" AMDAPPSDK_PATH=$BUILD_SOURCESDIRECTORY/AMDAPPSDK @@ -86,7 +87,6 @@ jobs: - script: | echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY" echo "##vso[task.setvariable variable=OS_NAME]macos" - echo "##vso[task.setvariable variable=AZURE]true" echo "##vso[task.setvariable variable=LGB_VER]$(head -n 1 VERSION.txt)" CONDA=$AGENT_HOMEDIRECTORY/miniconda echo "##vso[task.setvariable variable=CONDA]$CONDA" @@ -122,7 +122,6 @@ jobs: steps: - powershell: | Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" - Write-Host "##vso[task.setvariable variable=AZURE]true" displayName: 'Set Variables' - script: | cmd /c "powershell -ExecutionPolicy Bypass -File %BUILD_SOURCESDIRECTORY%/.ci/install_opencl.ps1"