This repository has been archived by the owner on Aug 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-template.yml
101 lines (74 loc) · 3.62 KB
/
azure-template.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
jobs:
- ${{ each env in parameters.envs }}:
- ${{ each pair in env }}:
- job: ${{ pair.key }}_${{ pair.value }}
pool:
${{ if eq(pair.key, 'macosx') }}:
vmImage: macOS 10.13
${{ if eq(pair.key, 'linux') }}:
vmImage: Ubuntu 16.04
${{ if eq(pair.key, 'windows') }}:
vmImage: vs2017-win2016
steps:
- ${{ if eq(pair.key, 'macosx') }}:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
# On Hosted macOS, the agent user doesn't have ownership of Miniconda's installation directory/
# We need to take ownership if we want to update conda or install packages globally
- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation
- ${{ if eq(pair.key, 'linux') }}:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- ${{ if eq(pair.key, 'windows') }}:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- ${{ if eq(pair.value, 'pkg') }}:
- bash: ./prepare_pkg.sh
displayName: Patch construct.yaml for MacOS X pkg
- bash: conda config --set always_yes yes --set changeps1 no
displayName: Configure conda
- bash: conda install constructor=3
displayName: Installing constructor v3
- ${{ if eq(pair.key, 'windows') }}:
- bash: |
conda uninstall pillow --force
pip install pillow
displayName: Patch pillow installation
- ${{ if eq(pair.key, 'macosx') }}:
# There seems to be a race condition that means sometimes the cache
# directory is not set up in time or is not set up with the correct
# dependencies, so we create it here in advance and give it the correct
# permissions
- bash: |
mkdir -p ${{ pair.key }}_${{ pair.value }}/osx-64
sudo chown -R $USER ${{ pair.key }}_${{ pair.value }}
displayName: Set up cache
- bash: constructor . --cache-dir=${{ pair.key }}_${{ pair.value }}
displayName: Running constructor
- bash: pip install awscli
displayName: Install awscli
- ${{ if and(eq(pair.key, 'macosx'),eq(pair.value, 'pkg')) }}:
- bash: aws s3 cp --content-type application/vnd.apple.installer+xml glueconda-stable-MacOSX-x86_64.pkg s3://www.glueviz.org/glueconda/
displayName: Upload to S3
env:
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
- ${{ if and(eq(pair.key, 'macosx'),eq(pair.value, 'sh')) }}:
- bash: aws s3 cp --content-type application/x-sh glueconda-stable-MacOSX-x86_64.sh s3://www.glueviz.org/glueconda/
displayName: Upload to S3
env:
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
- ${{ if eq(pair.key, 'linux') }}:
- bash: aws s3 cp --content-type application/x-sh glueconda-stable-Linux-x86_64.sh s3://www.glueviz.org/glueconda/
displayName: Upload to S3
env:
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
- ${{ if eq(pair.key, 'windows') }}:
- bash: aws s3 cp --content-type application/octet-stream glueconda-stable-Windows-x86_64.exe s3://www.glueviz.org/glueconda/
displayName: Upload to S3
env:
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)