Skip to content

Commit

Permalink
CI: Reduce number of conda builds for commits outside of release bran…
Browse files Browse the repository at this point in the history
…ches
  • Loading branch information
Kennedy Ricardo authored and Kennedy Ricardo committed Sep 16, 2020
1 parent 7492ee8 commit 2de03b2
Showing 1 changed file with 53 additions and 2 deletions.
55 changes: 53 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,70 @@ stages:
summaryFileLocation: '$(System.DefaultWorkingDirectory)/facet/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/facet/htmlcov'

# THOROUGH CONDA ENV BUILD TEST
# CONDA ENV BUILD TEST
# TESTING MATRIX OF PYTHON & SKLEARN VERSIONS
# - FOR RELEASE BRANCH: 3 BUILD TESTS
# - OTHERWISE: 1 BUILD TEST
- stage: 'Conda_build_test'
dependsOn:
- 'Quick_env_test'
displayName: 'Test multiple conda environment builds'

jobs:
- job:
displayName: 'Setup & testing'
displayName: 'Setup & testing: Single build'
condition: not(contains(variables['build.sourceBranch'], 'refs/heads/release'))

pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Maximum dependencies:
FACET_V_PYTHON_BUILD: '3.8'
FACET_V_SKLEARN: '==0.23'
FACET_V_PANDAS: '==1.0.0'
FACET_V_NUMPY: '=>1.16'
FACET_V_SHAP: '==0.35'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(FACET_V_PYTHON_BUILD)'
displayName: 'Use Python $(FACET_V_PYTHON_BUILD)'

- checkout: self
- checkout: sklearndf
- checkout: pytools
- script: dir $(Build.SourcesDirectory)

- task: Bash@3
inputs:
targetType: 'inline'
script: |
eval "$(conda shell.bash hook)"
export PYTHONPATH=$(System.DefaultWorkingDirectory)/facet/src/
export FACET_V_PYTHON_BUILD=$(FACET_V_PYTHON_BUILD)
export FACET_V_PANDAS=$(FACET_V_PANDAS)
export FACET_V_SKLEARN=$(FACET_V_SKLEARN)
export FACET_V_JOBLIB=$(FACET_V_JOBLIB)
export FACET_V_NUMPY=$(FACET_V_NUMPY)
export FACET_V_SHAP=$(FACET_V_SHAP)
conda activate facet-develop
conda install -y conda-build
cd $(System.DefaultWorkingDirectory)/pytools/
make package
cd $(System.DefaultWorkingDirectory)/sklearndf/
make package
cd $(System.DefaultWorkingDirectory)/facet/
make package
displayName: "Build conda package"

- job:
displayName: 'Setup & testing: Full build matrix'
condition: contains(variables['build.sourceBranch'], 'refs/heads/release')

pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Minimum dependencies:
Expand Down

0 comments on commit 2de03b2

Please sign in to comment.