-
-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MRG+2] Fix conda deployments (#300)
* Use git url * Change windows * Remove extra curly brace * Temp changes for local testing * Specify python version * Use curly braces... * Add root path back * Add string back * Add check step * Activate env * Update string * Try double quotes * Add echo * Try adding ls to mac * Change gitignore * Try bld files? * Try removing ignore installed * Use double quotes * Update Conda * Add yes flag * Add it on mac build too... * Try dollar python * Try dollar prefix * Revert previous change * Try setup.py * Remove preprocessing on mac * Try setting INLCUDE and LIBRARY paths * Consolidate a bunch of stuff * Try bld.sh * Added echo statements * Apparently it is build.sh * Install dependencies * Try dollar python * Add cat step * Try removing stuff from build section * Add conda render step * Use conda's versioning * Fix render_meta * Try overwriting? * Remove numpy from build section * Don't use dollar python * Add set flags * Don't use build.sh * Make build env before building... * Try source activate * Try isntalling twice? * Bring windows back * Don't activate on unix for some reason * Add comment * Remove activate on windows * Try conda-build * Add check for lib on unix * Fix check for lib * Try fix windows * Ditch lib check * Ensure VERSION is created before building * Clarifiying comment * Add lib check back in * Remove brackets * Add lib check on all three platforms * Fix deploy variable * Fix for windows * Try which * Try 7zip on windows * Use 7z instead of 7zip * Try force-local * lib -> Lib * Ensure lib is created before deploying * Execute file, now that we have a previous step
- Loading branch information
1 parent
486e0f3
commit 942f284
Showing
11 changed files
with
111 additions
and
133 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 |
---|---|---|
|
@@ -128,4 +128,4 @@ ENV/ | |
VERSION | ||
|
||
# Since we use a Jinja Template, we only want this to be created as build time | ||
/conda/ | ||
meta.yaml |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
steps: | ||
- script: conda update conda --yes | ||
displayName: 'Updating Conda' | ||
|
||
- script: conda install python=$(python.version) --yes | ||
displayName: 'Fixing conda Python version' | ||
|
||
- script: conda install conda-build anaconda-client --yes | ||
displayName: 'Installing conda-build and anaconda-client' | ||
|
||
- bash: | | ||
mkdir conda | ||
python -m pip install jinja2 | ||
python build_tools/azure/render_meta.py | ||
# This line is purely for debugging | ||
conda render --python=$(python.version) conda/ | ||
displayName: 'Rendering meta.yaml file' | ||
- bash: make version | ||
condition: contains(variables['Build.SourceBranch'], 'refs/tags') | ||
displayName: 'Ensuring VERSION file is created' |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
steps: | ||
# A lot of our requirements don't exist on conda (scipy>1.3.3, for instance), so we pip install all of them | ||
- bash: | | ||
conda create --name build-env python=$(python.version) --yes | ||
python -m pip install -r requirements.txt | ||
displayName: 'Creating build environment' | ||
- bash: | | ||
source activate build-env | ||
conda build --python=$(python.version) conda/ | ||
displayName: 'Building and testing conda distribution' | ||
- bash: | | ||
output_file=$(conda-build --output --python=$(python.version) conda/) | ||
if tar -tf "$output_file" | grep "lib"; then | ||
echo "##vso[task.setvariable variable=LIB_CREATED]true" | ||
echo "Lib directory created properly" | ||
else | ||
echo "Lib directory not created" | ||
exit 1 | ||
fi | ||
displayName: 'Looking for lib folder' |
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,33 +1,20 @@ | ||
steps: | ||
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" | ||
displayName: 'Add conda to PATH' | ||
|
||
- script: conda install conda-build anaconda-client --yes | ||
displayName: 'Installing conda-build and anaconda-client' | ||
|
||
- script: make version | ||
displayName: 'Ensuring VERSION file is created' | ||
condition: contains(variables['Build.SourceBranch'], 'refs/tags') | ||
|
||
- bash: | | ||
mkdir conda | ||
python -m pip install jinja2 | ||
python build_tools/azure/render_meta.py | ||
displayName: 'Rendering meta.yaml file' | ||
# A lot of our requirements don't exist on conda (scipy>1.3.3, for instance), so we pip install all of them | ||
# Windows is weird and fails if we try to do these as separate steps | ||
- script: | | ||
conda create --name build-env python=$(python.version) --yes | ||
call activate build-env | ||
pip install -r requirements.txt | ||
python -m pip install -r requirements.txt | ||
conda-build --python=$(python.version) conda/ | ||
displayName: 'Building and testing conda distribution' | ||
# Run pmdarima.show_versions() because I don't 100% trust the conda builder | ||
# Have to cd .. because pmdarima doesn't like importing from own dir | ||
- bash: | | ||
source activate build-env | ||
cd .. | ||
conda install --use-local pmdarima --yes | ||
python -c "import pmdarima; pmdarima.show_versions()" | ||
displayName: 'Testing conda installation' | ||
output_file=$(conda-build --output --python=$(python.version) conda/) | ||
# Windows has to use --force-local to ignore colons, and `Lib` has to be capitalized | ||
if tar -tf "$output_file" --force-local | grep "Lib"; then | ||
echo "##vso[task.setvariable variable=LIB_CREATED]true" | ||
echo "Lib directory created properly" | ||
else | ||
echo "Lib directory not created" | ||
exit 1 | ||
fi | ||
displayName: 'Looking for lib folder' |
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