2019-06-07 16:38:05 +00:00
|
|
|
# https://dev.azure.com/home-assistant
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
batch: true
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- dev
|
|
|
|
pr: none
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
- job: 'Pip_Install_Demo'
|
|
|
|
pool:
|
|
|
|
vmImage: 'ubuntu-latest'
|
|
|
|
strategy:
|
2019-06-07 16:42:47 +00:00
|
|
|
maxParallel: 1
|
2019-06-07 16:38:05 +00:00
|
|
|
matrix:
|
|
|
|
Python35:
|
|
|
|
python.version: '3.5'
|
|
|
|
Python36:
|
|
|
|
python.version: '3.6'
|
|
|
|
Python37:
|
|
|
|
python.version: '3.7'
|
|
|
|
steps:
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
displayName: 'Use Python $(python.version)'
|
|
|
|
inputs:
|
|
|
|
versionSpec: '$(python.version)'
|
|
|
|
- script: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y --no-install-recommends \
|
|
|
|
libudev-dev libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev
|
|
|
|
displayName: 'Set up docker prerequisite requirement'
|
|
|
|
|
|
|
|
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
|
|
displayName: 'Restore artifacts based on Requirements'
|
|
|
|
inputs:
|
|
|
|
keyfile: 'requirements_all.txt'
|
|
|
|
targetfolder: ./venv
|
|
|
|
vstsFeed: '$(ArtifactFeed)'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
python3 -m venv venv
|
|
|
|
. venv/bin/activate
|
|
|
|
pip install -q -U pip setuptools
|
|
|
|
pip3 install -q -r requirements_all.txt -c homeassistant/package_constraints.txt
|
|
|
|
displayName: 'Create Virtual Environment & Install Requirements'
|
|
|
|
|
|
|
|
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
|
|
displayName: 'Save artifacts based on Requirements'
|
|
|
|
inputs:
|
|
|
|
keyfile: 'requirements_all.txt'
|
|
|
|
targetfolder: ./venv
|
|
|
|
vstsFeed: '$(ArtifactFeed)'
|