Skip to content
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

[ci] fixed conda #2016

Merged
merged 1 commit into from Feb 18, 2019
Merged

[ci] fixed conda #2016

merged 1 commit into from Feb 18, 2019

Conversation

StrikerRUS
Copy link
Collaborator

Fixed #2010. Refer to ContinuumIO/anaconda-issues#10629.

Multiple minor additions of -q and -y options for conda and wget commands.

The main idea of this PR is about that CondaEnvironment task on Azure Pipelines has been deprecated recently. Now users should manage conda environments by their own scripts. As it was discovered from the conversation in ContinuumIO/anaconda-issues#10629, Azure Pipelines used their own "activation" of conda environments which is not correct and doesn't work with the latest conda's Python patch.

Also, we cannot rely on the preinstalled conda on Linux and macOS because it's installed in the folder which requires to execute every conda-command with sudo, what is strongly discouraged by conda itself (refer to our ordeals in #1849). So, this PR adds conda installation into $AGENT_HOMEDIRECTORY/miniconda folder and overwrites environmental variable CONDA.

- script: |
conda update -q -y conda
conda create -q -y -n %CONDA_ENV% python=%PYTHON_VERSION% matplotlib nose numpy pandas psutil pytest python-graphviz scikit-learn scipy
cmd /c "activate %CONDA_ENV% & powershell -ExecutionPolicy Bypass -File %BUILD_SOURCESDIRECTORY%/.ci/test_windows.ps1"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, despite the fact that conda>=4.6 supports environment managing in PowerShell, I can't get it work neither on my home machine, nor at CI side. So, I included this hack.

I've tested notebook with error, example with error, and, of course, impassable test. All cases expectedly fail a CI job, so, I hope that LastExitCode is handled properly here.

@guolinke guolinke merged commit b447a7b into master Feb 18, 2019
@StrikerRUS StrikerRUS deleted the ci-conda branch February 18, 2019 12:18
@lock lock bot locked as resolved and limited conversation to collaborators Mar 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

current master CI fails
2 participants