Update azure-pipelines-ci.yml for Azure Pipelines

This commit is contained in:
Pascal Vizeli 2019-06-09 14:26:42 +02:00
parent 628264be4e
commit 0db27f1cef

View File

@ -7,11 +7,21 @@ trigger:
- dev - dev
pr: none pr: none
resources:
containers:
- container: 35
image: homeassistant/ci-azure:3.5
- container: 36
image: homeassistant/ci-azure:3.6
- container: 37
image: homeassistant/ci-azure: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: '3.5' value: '35'
jobs: jobs:
@ -19,10 +29,8 @@ 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
@ -43,20 +51,16 @@ 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: |
set -e
sudo add-apt-repository ppa:jonathonf/ffmpeg-4
sudo apt-get update
echo "$(python.version)" > .cache echo "$(python.version)" > .cache
displayName: 'Set up docker prerequisite requirement' displayName: 'Set up docker prerequisite requirement'
@ -69,12 +73,6 @@ jobs:
- script: | - script: |
set -e set -e
# Install build env
sudo apt-get install -y --no-install-recommends \
libudev-dev libsqlite3-dev libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev
# Setup venv
python -m venv venv python -m venv venv
. venv/bin/activate . venv/bin/activate
@ -106,4 +104,4 @@ jobs:
pylint homeassistant pylint homeassistant
displayName: 'Run pylint' displayName: 'Run pylint'
condition: and(succeeded(), eq(variables['python.version'], variables['PythonMain'])) condition: and(succeeded(), eq(variables['python.container'], variables['PythonMain']))