diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml new file mode 100644 index 00000000000..02ac3c7f571 --- /dev/null +++ b/azure-pipelines-ci.yml @@ -0,0 +1,54 @@ +# https://dev.azure.com/home-assistant + +trigger: + batch: true + branches: + include: + - dev +pr: none + + +jobs: + +- job: 'Pip_Install_Demo' + pool: + vmImage: 'ubuntu-latest' + strategy: + 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)'