-
Notifications
You must be signed in to change notification settings - Fork 341
136 lines (125 loc) · 4.28 KB
/
installation.yaml
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
name: installation
on:
pull_request:
paths:
- 'src/**'
- '.github/workflows/installation.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'
push:
paths:
- 'src/**'
- '.github/workflows/installation.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'
workflow_dispatch:
jobs:
main:
name: ${{ matrix.os }} - ${{ matrix.python-version }} - ${{ matrix.method }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-2019
python-version:
- '2.7'
- '3.7'
method:
- 'install'
- 'pip'
include:
# ubuntu
- os: ubuntu-latest
method: install
REZ_SET_PATH_COMMAND: 'export PATH=${PATH}:/opt/rez/bin/rez'
REZ_INSTALL_COMMAND: |
set -ex
if [[ "${MATRIX_PYTHON_VERSION}" == "2.7" ]]; then
eval "$(conda shell.bash hook)"
conda activate python
fi
python ./install.py /opt/rez
- os: ubuntu-latest
method: pip
REZ_SET_PATH_COMMAND: 'export PATH=${PATH}:/opt/rez/bin PYTHONPATH=${PYTHONPATH}:/opt/rez'
REZ_INSTALL_COMMAND: |
set -ex
if [[ "${MATRIX_PYTHON_VERSION}" == "2.7" ]]; then
eval "$(conda shell.bash hook)"
conda activate python
fi
pip install --target /opt/rez .
# macOS
- os: macos-latest
method: install
REZ_SET_PATH_COMMAND: 'export PATH=${PATH}:~/rez/bin/rez'
REZ_INSTALL_COMMAND: |
set -e
if [[ "${MATRIX_PYTHON_VERSION}" == "2.7" ]]; then
eval "$(conda shell.bash hook)"
conda activate python
echo "otool -L $(dirname $(which python))/../lib/libpython2.7.dylib"
otool -L $(dirname $(which python))/../lib/libpython2.7.dylib
echo "otool -l $(dirname $(which python))/../lib/libpython2.7.dylib"
otool -l $(dirname $(which python))/../lib/libpython2.7.dylib
fi
python ./install.py ~/rez
- os: macos-latest
method: pip
REZ_SET_PATH_COMMAND: 'export PATH="$PATH:~/rez/bin" PYTHONPATH=$PYTHONPATH:$HOME/rez'
REZ_INSTALL_COMMAND: |
set -ex
if [[ "${MATRIX_PYTHON_VERSION}" == "2.7" ]]; then
eval "$(conda shell.bash hook)"
conda activate python
fi
pip install --target ~/rez .
# windows
- os: windows-2019
method: install
REZ_SET_PATH_COMMAND: '$env:PATH="$env:PATH;C:\ProgramData\rez\Scripts\rez"'
REZ_INSTALL_COMMAND: |
if ($env:MATRIX_PYTHON_VERSION -eq "2.7") {
& 'C:\Miniconda\shell\condabin\conda-hook.ps1'
conda activate python
}
python ./install.py C:\ProgramData\rez
- os: windows-2019
method: pip
REZ_SET_PATH_COMMAND: '[System.Environment]::SetEnvironmentVariable("PATH","$env:PATH;C:\ProgramData\rez\bin"); $env:PYTHONPATH="$env:PYTHONPATH;C:\ProgramData\rez"'
REZ_INSTALL_COMMAND: |
if ($env:MATRIX_PYTHON_VERSION -eq "2.7") {
& 'C:\Miniconda\shell\condabin\conda-hook.ps1'
conda activate python
}
pip install --target C:\ProgramData\rez .
exclude:
- method: install
python-version: '2.7'
steps:
- uses: actions/checkout@v3
- name: Setup python ${{ matrix.python-version }}
uses: ./.github/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
- name: Install
env:
MATRIX_PYTHON_VERSION: ${{ matrix.python-version }}
run: |
${{ matrix.REZ_INSTALL_COMMAND }}
- name: Run rez-status
env:
MATRIX_PYTHON_VERSION: ${{ matrix.python-version }}
run: |
${{ matrix.REZ_SET_PATH_COMMAND }}
rez-status
- name: Install rez with rez-pip
env:
MATRIX_PYTHON_VERSION: ${{ matrix.python-version }}
run: |
${{ matrix.REZ_SET_PATH_COMMAND }}
rez-pip --install .