forked from conda-forge/cdt-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
90 lines (77 loc) · 2.47 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
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
jobs:
- job: build
pool:
vmImage: 'Ubuntu-16.04'
timeoutInMinutes: 360
strategy:
matrix:
cos6_x86_64_legacy:
DISTARCH: 'cos6-x86_64'
LEGACYCDT: '--legacy'
cos7_aarch64_legacy:
DISTARCH: 'cos7-aarch64'
LEGACYCDT: '--legacy'
cos7_ppc64le_legacy:
DISTARCH: 'cos7-ppc64le'
LEGACYCDT: '--legacy'
cos6_x86_64:
DISTARCH: 'cos6-x86_64'
LEGACYCDT: ''
cos7_x86_64:
DISTARCH: 'cos7-x86_64'
LEGACYCDT: ''
cos7_aarch64:
DISTARCH: 'cos7-aarch64'
LEGACYCDT: ''
cos7_ppc64le:
DISTARCH: 'cos7-ppc64le'
LEGACYCDT: ''
maxParallel: 0
steps:
- checkout: self
clean: true
- bash: |
sudo apt-get remove -y --auto-remove gcc
sudo apt-get purge -y --auto-remove gcc
sed -h
echo `uname -s`
displayName: removing system compilers
- bash: .ci_scripts/install_miniconda.sh
displayName: install miniconda
- bash: |
set -e
source $HOME/miniforge3/etc/profile.d/conda.sh
conda activate base
cat .ci_scripts/condarc > $HOME/.condarc
mkdir -p build_logs
echo "cmd args: ${DISTARCH} ${LEGACYCDT}"
python build_cdt_recipes.py ${DISTARCH} ${LEGACYCDT}
displayName: build CDTs
- bash: |
set -e
source $HOME/miniforge3/etc/profile.d/conda.sh
conda activate base
cat .ci_scripts/condarc > $HOME/.condarc
echo "is fork: ${IS_FORK}"
echo "branch: ${BUILD_SOURCEBRANCHNAME}"
echo "cdts built:"
for pth in $(compgen -G "$HOME/miniforge3/conda-bld/*/*.tar.bz2" | sort); do
echo ${pth#$HOME/miniforge3/conda-bld/}
done
echo " "
if [[ ${ANACONDA_TOKEN} ]] && [[ "$BUILD_SOURCEBRANCHNAME" == "master" ]] && [[ "${IS_FORK}" == "False" ]]; then
if [[ $(compgen -G "$HOME/miniforge3/conda-bld/*/*.tar.bz2" | sort) ]]; then
echo "uploading the CDTs"
anaconda --token ${ANACONDA_TOKEN} upload --skip-existing $HOME/miniforge3/conda-bld/*/*.tar.bz2
else
echo "no CDTs built so not uploading anything"
fi
else
echo "skipping uploads since on fork or non-master branch"
fi
displayName: upload CDTs
env:
ANACONDA_TOKEN: $(anaconda.token)
IS_FORK: $(System.PullRequest.IsFork)
- publish: build_logs/
artifact: build-logs-$(DISTARCH)$(LEGACYCDT)-azurejob$(system.JobId)