From ebe2d5a6e7f7d4879eb6b6c4dea1298d1dfb5ae1 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sun, 22 Mar 2020 19:39:57 -0500 Subject: [PATCH] fixed quotes and removed some unnecessary stuff --- .appveyor.yml | 10 +++++----- .ci/test_windows.ps1 | 5 ----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 36b467e4001d..0fbd8d88f8c1 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -26,11 +26,11 @@ install: - set PYTHON_VERSION=%CONFIGURATION% - ps: >- switch ($env:PYTHON_VERSION) { - "2.7" {$env:MINICONDA = """C:\Miniconda-x64"""} - "3.5" {$env:MINICONDA = """C:\Miniconda35-x64"""} - "3.6" {$env:MINICONDA = """C:\Miniconda36-x64"""} - "3.7" {$env:MINICONDA = """C:\Miniconda37-x64"""} - default {$env:MINICONDA = """C:\Miniconda37-x64"""} + "2.7" {$env:MINICONDA = "C:\Miniconda-x64"} + "3.5" {$env:MINICONDA = "C:\Miniconda35-x64"} + "3.6" {$env:MINICONDA = "C:\Miniconda36-x64"} + "3.7" {$env:MINICONDA = "C:\Miniconda37-x64"} + default {$env:MINICONDA = "C:\Miniconda37-x64"} } $env:PATH="$env:MINICONDA;$env:MINICONDA\Scripts;$env:PATH" - ps: $env:LGB_VER = (Get-Content VERSION.txt).trim() diff --git a/.ci/test_windows.ps1 b/.ci/test_windows.ps1 index 3f533b247264..2cc654809604 100644 --- a/.ci/test_windows.ps1 +++ b/.ci/test_windows.ps1 @@ -22,7 +22,6 @@ if ($env:TASK -ne "r-package") { } if ($env:TASK -eq "regular") { - activate $env:CONDA_ENV mkdir $env:BUILD_SOURCESDIRECTORY/build; cd $env:BUILD_SOURCESDIRECTORY/build cmake -A x64 .. ; cmake --build . --target ALL_BUILD --config Release ; Check-Output $? cd $env:BUILD_SOURCESDIRECTORY/python-package @@ -31,7 +30,6 @@ if ($env:TASK -eq "regular") { cp $env:BUILD_SOURCESDIRECTORY/Release/lightgbm.exe $env:BUILD_ARTIFACTSTAGINGDIRECTORY } elseif ($env:TASK -eq "sdist") { - activate $env:CONDA_ENV cd $env:BUILD_SOURCESDIRECTORY/python-package python setup.py sdist --formats gztar ; Check-Output $? cd dist; pip install @(Get-ChildItem *.gz) -v ; Check-Output $? @@ -46,7 +44,6 @@ elseif ($env:TASK -eq "sdist") { cp $env:BUILD_SOURCESDIRECTORY/build/lightgbmlib.jar $env:BUILD_ARTIFACTSTAGINGDIRECTORY/lightgbmlib_win.jar } elseif ($env:TASK -eq "bdist") { - activate $env:CONDA_ENV cd $env:BUILD_SOURCESDIRECTORY/python-package python setup.py bdist_wheel --plat-name=win-amd64 --universal ; Check-Output $? cd dist; pip install @(Get-ChildItem *.whl) ; Check-Output $? @@ -61,13 +58,11 @@ elseif ($env:TASK -eq "bdist") { } if ($env:TASK -ne "r-package") { - conda activate $env:CONDA_ENV $tests = $env:BUILD_SOURCESDIRECTORY + $(If (($env:TASK -eq "sdist") -or ($env:TASK -eq "appveyor-python")) {"/tests/python_package_test"} Else {"/tests"}) # cannot test C API with "sdist" task pytest $tests ; Check-Output $? } if (($env:TASK -eq "regular") -or ($env:TASK -eq "appveyor-python")) { - activate $env:CONDA_ENV cd $env:BUILD_SOURCESDIRECTORY/examples/python-guide @("import matplotlib", "matplotlib.use('Agg')") + (Get-Content "plot_example.py") | Set-Content "plot_example.py" (Get-Content "plot_example.py").replace('graph.render(view=True)', 'graph.render(view=False)') | Set-Content "plot_example.py" # prevent interactive window mode