-
Notifications
You must be signed in to change notification settings - Fork 20
/
install-libraries.yml
37 lines (31 loc) · 1.34 KB
/
install-libraries.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
parameters:
- name: 'libraries'
type: object
default: {}
- name: 'env_key'
type: string
default: ''
- name: 'docker_name'
type: string
default: ''
- name: 'setarch'
type: string
default: ''
steps:
- ${{ each tool_pair in parameters.libraries }}:
- ${{ each library in tool_pair.value }}:
- ${{ if and(eq(tool_pair.key, 'brew'), eq(parameters.env_key, 'macos')) }}:
- script: brew install ${{ library }}
displayName: Installing ${{ library }} with brew
- ${{ if and(eq(tool_pair.key, 'brew-cask'), eq(parameters.env_key, 'macos')) }}:
- script: brew cask install ${{ library }}
displayName: Installing ${{ library }} with brew cask
- ${{ if and(eq(tool_pair.key, 'apt'), eq(parameters.env_key, 'linux')) }}:
- script: sudo apt-get install -y ${{ library }}
displayName: Installing ${{ library }} with apt
- ${{ if and(eq(tool_pair.key, 'yum'), or(eq(parameters.env_key, 'linux32'), eq(parameters.env_key, 'manylinux'))) }}:
- script: docker exec -i -w /project ${{ parameters.docker_name }} ${{ parameters.setarch }} yum install -y ${{ library }}
displayName: Installing ${{ library }} with yum
- ${{ if and(eq(tool_pair.key, 'choco'), eq(parameters.env_key, 'windows')) }}:
- script: choco install ${{ library }}
displayName: Installing ${{ library }} with choco