forked from bioconda/bioconda-recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipeline-nightly.yml
141 lines (119 loc) · 4.45 KB
/
azure-pipeline-nightly.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
schedules:
- cron: "0 0 * * *"
displayName: Nightly uploader
branches:
include:
- master
always: true
pr: none
trigger:
branches:
exclude:
- '*'
jobs:
- job: 'build_and_push_linux'
pool:
vmImage: 'ubuntu-latest'
strategy:
maxParallel: 8
timeoutInMinutes: 360
steps:
- script: |
git checkout master
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: |
wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/common.sh
displayName: Fetch common.sh
- task: Cache@2
inputs:
path: "/usr/share/miniconda/envs/bioconda"
key: '"$(Agent.OS)" | **/common.sh'
cacheHitVar: CACHE_RESTORED
displayName: Restore cache
- script: .azure-pipelines/createEnv.py
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: Install bioconda-utils
- bash: |
set -e
rm -f "${HOME}/.condarc"
# Activate our Conda installation as "base".
. /usr/share/miniconda/envs/bioconda/etc/profile.d/conda.sh
conda activate base
conda config --system --add channels defaults
conda config --system --add channels bioconda
conda config --system --add channels conda-forge
docker pull quay.io/dpryan79/mulled_container:latest
mkdir -p ${CONDA_PREFIX}/conda-bld
export OSTYPE="linux-gnu"
export CI="true"
bioconda-utils build recipes config.yml \
--docker --mulled-test --anaconda-upload --mulled-upload-target biocontainers \
--prelint
docker rmi quay.io/dpryan79/mulled_container:latest
env:
QUAY_OAUTH_TOKEN: $(QUAY_OAUTH_TOKEN)
ANACONDA_TOKEN: $(ANACONDA_TOKEN)
INVOLUCRO_AUTH: $(INVOLUCRO_AUTH)
displayName: Build_and_push
- job: 'build_and_push_osx'
pool:
vmImage: 'macOS-latest'
strategy:
maxParallel: 4
timeoutInMinutes: 360
steps:
- script: |
git checkout master
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation
- bash: |
wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/common.sh
displayName: Fetch common.sh
- task: Cache@2
inputs:
path: "/usr/local/miniconda/envs/bioconda"
key: '"$(Agent.OS)" | **/common.sh'
cacheHitVar: CACHE_RESTORED
displayName: Restore cache
- script: .azure-pipelines/createEnv.py
condition: ne(variables.CACHE_RESTORED, 'true')
displayName: Install bioconda-utils
- script: |
# download SDK and setup sysroot on macOS
# primarily, run_conda_forge_build_setup does the following:
# - download/setup SDK:
# https://github.com/conda-forge/conda-forge-ci-setup-feedstock/blob/a1026adb523b6562c16329170e7e304a25ed4033/recipe/run_conda_forge_build_setup_osx#L21-L26
# - add activation script to set MACOSX_DEPLOYMENT_TARGET and CONDA_BUILD_SYSROOT:
# https://github.com/conda-forge/conda-forge-ci-setup-feedstock/blob/a1026adb523b6562c16329170e7e304a25ed4033/recipe/run_conda_forge_build_setup_osx#L60-L63
# use "CONFIG=" to avoid writing ./.ci_support/${CONFIG}.yaml which we don't need/use.
. /usr/local/miniconda/envs/bioconda/etc/profile.d/conda.sh
conda activate base
CONFIG= OSX_FORCE_SDK_DOWNLOAD=1 MACOSX_DEPLOYMENT_TARGET=10.13 run_conda_forge_build_setup
conda_forge_ci_setup_activate_sh="${CONDA_PREFIX}/etc/conda/activate.d/conda-forge-ci-setup-activate.sh"
sed -Ei.bak "s/^(export MACOSX_DEPLOYMENT_TARGET)=.*$/\\1='10.9'/" "${conda_forge_ci_setup_activate_sh}"
rm "${conda_forge_ci_setup_activate_sh}".bak
cat "${conda_forge_ci_setup_activate_sh}"
grep -qFx "export MACOSX_DEPLOYMENT_TARGET='10.9'" "${conda_forge_ci_setup_activate_sh}"
conda list
displayName: OSX setup
- bash: |
set -e
. /usr/local/miniconda/envs/bioconda/etc/profile.d/conda.sh
conda activate base
conda config --system --add channels defaults
conda config --system --add channels bioconda
conda config --system --add channels conda-forge
mkdir -p ${CONDA_PREFIX}/conda-bld
export OSTYPE="darwin"
export CI="true"
bioconda-utils build recipes config.yml \
--anaconda-upload \
--prelint
env:
QUAY_OAUTH_TOKEN: $(QUAY_OAUTH_TOKEN)
ANACONDA_TOKEN: $(ANACONDA_TOKEN)
INVOLUCRO_AUTH: $(INVOLUCRO_AUTH)
displayName: Build_and_push