-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
94 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,45 @@ | ||
build: false | ||
|
||
platform: x64 | ||
|
||
environment: | ||
ANACONDA_TOKEN: | ||
secure: iTF8kOBGKYYFOx5c0inHuvqyiTzjxM68i4bfZjgEpdmYCIhTwwtGj8NWWFf9AbFV | ||
PROJECT_NAME: surficial | ||
GITHUB_REPO_NAME: mrahnis/surficial | ||
|
||
matrix: | ||
- PYTHON_VERSION: 3.6 | ||
PYTHON_ARCH: 64 | ||
MINICONDA: C:\Miniconda36-x64 | ||
|
||
init: | ||
- "ECHO %PYTHON_VERSION% %MINICONDA%" | ||
- ps: Write-Host $Env:PYTHON_VERSION | ||
- ps: Write-Host $Env:MINICONDA | ||
- ps: Write-Host $Env:GITHUB_REPO_NAME | ||
- ps: Write-Host $Env:PLATFORM | ||
- ps: Write-Host $Env:APPVEYOR_REPO_TAG | ||
- ps: Write-Host $Env:APPVEYOR_REPO_TAG_NAME | ||
- ps: Write-Host $Env:APPVEYOR_REPO_NAME | ||
|
||
install: | ||
- "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%" | ||
- '"%MINICONDA%\Scripts\activate.bat"' | ||
- conda config --set always_yes yes --set changeps1 no | ||
- conda update -q conda | ||
- conda install conda-build anaconda-client | ||
- conda install conda-build conda-verify anaconda-client pytest | ||
- conda config --add channels conda-forge phlya | ||
- conda info -a | ||
- conda config --add channels conda-forge | ||
- conda config --add channels phlya | ||
- conda config --add channels mrahnis | ||
- "conda create -q -n test-environment python=%PYTHON_VERSION% fiona rasterio shapely click networkx adjusttext drapery pytest" | ||
- activate test-environment | ||
- conda build . | ||
- conda install surficial --use-local | ||
|
||
artifacts: | ||
- path: 'conda-packages\*.tar.bz2' | ||
build: false | ||
|
||
test_script: | ||
- conda build . | ||
- conda install %PROJECT_NAME% --use-local | ||
- pytest | ||
- cmd: mkdir conda-packages | ||
- cmd: 'copy /Y C:\Miniconda36-x64\conda-bld\win-64\*.tar.bz2 conda-packages || cmd /c "exit /b 0"' | ||
- cmd: 'copy /Y C:\Miniconda36-x64\conda-bld\noarch\*.tar.bz2 conda-packages || cmd /c "exit /b 0"' | ||
|
||
deploy_script: | ||
- powershell ci/appveyor/deploy_to_anaconda.ps1 | ||
after_test: | ||
- ps: Copy-Item $Env:MINICONDA\conda-bld -Destination . -Recurse | ||
|
||
artifacts: | ||
- path: 'conda-bld\noarch\*.tar.bz2' | ||
|
||
on_success: | ||
- ps: ci\appveyor\deploy_to_anaconda.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
if (($env:appveyor_repo_tag -eq "true") -and ($env:appveyor_repo_tag_name.StartsWith("v"))) { | ||
write-output "Deploying to anaconda main channel..." | ||
$channel = "main" | ||
} else { | ||
write-output "Deploying to anaconda dev channel..." | ||
$channel = "dev" | ||
$env:BUILD_STR = "dev" | ||
} | ||
|
||
Invoke-Expression "conda config --set anaconda_upload no" | ||
If (($Env:APPVEYOR_REPO_TAG -eq "true") -and | ||
($Env:APPVEYOR_REPO_NAME -eq ${Env:GITHUB_REPO_NAME})) { | ||
|
||
$file_to_upload = (conda build --output .) | Out-String | ||
$file_to_upload = (conda build --output .) | Out-String | ||
|
||
write-output "Uploading $file_to_upload..." | ||
Invoke-Expression "anaconda -t $env:ANACONDA_TOKEN upload --force --user mrahnis --channel $channel $file_to_upload" | ||
|
||
write-output "Upload success" | ||
If ($Env:APPVEYOR_REPO_TAG_NAME.StartsWith("v")) { | ||
If ($Env:APPVEYOR_REPO_TAG_NAME.EndsWith("-dev")) { | ||
$labels = "dev" | ||
} ElseIf ($Env:APPVEYOR_REPO_TAG_NAME.EndsWith("-beta")) { | ||
$labels = "beta" | ||
} else { | ||
$labels = "main" | ||
} | ||
} Else { | ||
Write-Host "Tag not for deployment, skipping conda package deployment." | ||
Return | ||
} | ||
Write-Host "Deploying package $file_to_upload with label $labels" | ||
Invoke-Expression "anaconda -t $Env:ANACONDA_TOKEN upload --label $labels --force --no-progress $file_to_upload" | ||
} Else { | ||
Write-Host "Not tagged, skipping conda package deployment." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters