forked from tpaviot/pythonocc-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conda-build.yml
59 lines (50 loc) · 2.01 KB
/
conda-build.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
47
48
49
50
51
52
53
54
55
56
57
58
59
parameters:
name: 'Conda build job'
vmImage: 'Ubuntu-18.04'
py_maj: '3'
py_min: '6'
jobs:
- job: ${{ parameters.name }}
timeoutInMinutes: 360
pool:
vmImage: ${{ parameters.vmImage }}
steps:
#activate conda
- ${{ if or(contains(parameters.vmImage, 'macOS'),contains(parameters.vmImage, 'Ubuntu')) }}:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: 'Add conda to PATH'
- ${{ if contains(parameters.vmImage, 'win') }}:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: 'Add conda to PATH'
# Ubuntu install opengl items and remove swig packages that conflict with anaconda
- ${{ if contains(parameters.vmImage, 'Ubuntu') }}:
- bash: |
sudo apt-get update && \
sudo apt-get -q -y install libglu1-mesa-dev libgl1-mesa-dev libxmu-dev libxi-dev && \
sudo apt list --installed && \
sudo apt remove swig swig4.0
displayName: 'Install OpenGL headers'
- bash: |
conda config --set always_yes yes --set changeps1 no && \
conda update -q conda && \
conda info -a && \
conda config --add channels https://conda.anaconda.org/conda-forge
displayName: 'Conda config and info'
# on windows, set arch if ever 32 is in the build name
- ${{ if contains(parameters.name, '32') }}:
- bash: |
set CONDA_SUBDIR=win-32 && \
conda config --env --set subdir win-32
displayName: 'Windows force 32 bit build'
- bash: conda create --yes --quiet --name build_env conda-build conda-verify libarchive python=${{ parameters.py_maj }}.${{ parameters.py_min }} anaconda-client
displayName: Create Anaconda environment
- bash: |
source activate build_env && \
conda-build --no-remove-work-dir --dirty ci/conda
displayName: 'Run conda build'
failOnStderr: false
env:
PYTHONBUFFERED: 1
PYTHON_VERSION: ${{ parameters.py_maj }}.${{ parameters.py_min }}
PACKAGE_VERSION: $(Build.SourceBranchName)
TOKEN: $(anaconda.TOKEN)