forked from Petlja/PSIML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
46 lines (43 loc) · 1.6 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
# Kick off build just on master branch.
trigger:
- master
variables:
CONDA_ENV_NAME: test_env
jobs:
# Linux build.
- job: Linux
displayName: 'Run workshops build on Linux'
pool:
vmImage: 'ubuntu-16.04'
steps:
# 1) Add conda to path.
- bash: echo "##vso[task.prependpath]$CONDA/bin"
# 2) Create conda environment based on checked in yaml file.
# 3) Activate created environment.
# 4) Build using make.
- script: |
conda env create --quiet --file workshops/environment.yml --name $(CONDA_ENV_NAME)
source activate $(CONDA_ENV_NAME)
make --directory workshops
# Windows build.
- job: Windows
displayName: 'Run workshops build on Windows'
pool:
vmImage: 'vs2017-win2016'
steps:
# 1) Add conda to path.
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
# 2) Create conda environment based on checked in yaml file.
# 3) Activate created environment.
# 4) Figure out msbuild location using vswhere unitility (install it using chocolatey).
# 5) Build using msbuild.
- script: |
conda env create --quiet --file workshops/environment.yml --name $(CONDA_ENV_NAME)
call activate $(CONDA_ENV_NAME)
choco install vswhere
for /f "tokens=*" %%i in ('vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe -nologo') do set msbuildpath="%%i"
call %msbuildpath% workshops\workshops.sln /p:Platform="Any CPU";Configuration=Debug