Update azure-pipelines-ci.yml for Azure Pipelines

This commit is contained in:
Pascal Vizeli 2019-06-09 12:28:51 +02:00
parent 6a4bf1f817
commit b3b2e8ffb7

View File

@ -7,21 +7,11 @@ trigger:
- dev - dev
pr: none pr: none
resources:
containers:
- container: 35
image: python:3.5
- container: 36
image: python:3.6
- container: 37
image: python:3.7
variables: variables:
- name: ArtifactFeed - name: ArtifactFeed
value: '2df3ae11-3bf6-49bc-a809-ba0d340d6a6d' value: '2df3ae11-3bf6-49bc-a809-ba0d340d6a6d'
- name: PythonMain - name: PythonMain
value: '35' value: '3.5'
jobs: jobs:
@ -29,8 +19,11 @@ jobs:
- job: 'Lint' - job: 'Lint'
pool: pool:
vmImage: 'ubuntu-latest' vmImage: 'ubuntu-latest'
container: $[ variables['PythonMain'] ]
steps: steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(PythonMain)'
- script: | - script: |
python -m venv lint python -m venv lint
@ -51,19 +44,19 @@ jobs:
matrix: matrix:
Python35: Python35:
python.version: '3.5' python.version: '3.5'
python.container: '35'
Python36: Python36:
python.version: '3.6' python.version: '3.6'
python.container: '36'
Python37: Python37:
python.version: '3.7' python.version: '3.7'
python.container: '37'
container: $[ variables['python.container'] ]
steps: steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
- script: | - script: |
apt-get update sudo add-apt-repository ppa:jonathonf/ffmpeg-4
apt-get install -y --no-install-recommends \ sudo apt-get update
libudev libavformat libavcodec libavdevice libavutil libswscale libswresample libavfilter sudo apt-get install -y --no-install-recommends \
libudev libsqlite3 libavformat libavcodec libavdevice libavutil libswscale libswresample libavfilter
echo "$(python.version)" > .cache echo "$(python.version)" > .cache
displayName: 'Set up docker prerequisite requirement' displayName: 'Set up docker prerequisite requirement'
@ -77,8 +70,8 @@ jobs:
- script: | - script: |
# Install build env # Install build env
apt-get install -y --no-install-recommends \ sudo apt-get install -y --no-install-recommends \
libudev-dev libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev libudev-dev libsqlite3-dev libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev
# Setup venv # Setup venv
python -m venv venv python -m venv venv
@ -112,4 +105,4 @@ jobs:
pylint homeassistant pylint homeassistant
displayName: 'Run pylint' displayName: 'Run pylint'
condition: eq(variables['python.container'], variables['PythonMain']) condition: eq(variables['python.version'], variables['PythonMain'])