-
Notifications
You must be signed in to change notification settings - Fork 24
209 lines (185 loc) · 6.31 KB
/
performance.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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
name: Performance
on:
pull_request:
types:
- labeled
workflow_run:
workflows:
- CI
branches:
- main
types:
- completed
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
CONDA_SOLVER: libmamba
jobs:
linux:
if: |
(github.event_name == 'pull_request' &&
github.event.label.name == 'performance::run') ||
(github.event.workflow_run.conclusion == 'success')
name: Linux, Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
env:
OS: "linux"
PYTHON: ${{ matrix.python-version }}
steps:
- name: Checkout our source
uses: actions/checkout@v3
with:
path: conda-libmamba-solver
fetch-depth: 0
- name: Checkout conda
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: conda/conda
path: conda
- name: Run performance tests
run: >
docker run
--rm
-v ${GITHUB_WORKSPACE}/conda:/opt/conda-src
-v ${GITHUB_WORKSPACE}/conda-libmamba-solver:/opt/conda-libmamba-solver-src
-e TEST_SPLITS
-e TEST_GROUP
-e CONDA_SOLVER
ghcr.io/conda/conda-ci:main-linux-python${{ matrix.python-version }}
bash -c "sudo /opt/conda/condabin/conda install -p /opt/conda \
--file /opt/conda-libmamba-solver-src/dev/requirements.txt &&
/opt/conda/bin/python -m pip install /opt/conda-libmamba-solver-src \
--no-deps -vvv &&
source /opt/conda-src/dev/linux/bashrc.sh &&
/opt/conda/bin/python -m pytest /opt/conda-libmamba-solver-src \
-vv --durations=0 --timeout=1800 -m 'slow'"
macos:
if: |
(github.event_name == 'pull_request' &&
github.event.label.name == 'performance::run') ||
(github.event.workflow_run.conclusion == 'success')
name: MacOS, Python ${{ matrix.python-version }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
env:
OS: "macos"
PYTHON: ${{ matrix.python-version }}
steps:
- name: Checkout our source
uses: actions/checkout@v3
with:
path: conda-libmamba-solver
fetch-depth: 0
- name: Checkout conda
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: conda/conda
ref: libmamba
path: conda
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: conda-test-env
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Setup environment
shell: bash -l {0}
working-directory: conda
run: |
set -euxo pipefail
# restoring the default for changeps1 to have parity with dev
conda config --set changeps1 true
# make sure the caching works correctly
conda config --set use_only_tar_bz2 true
# install all test requirements
conda install --yes \
--file tests/requirements.txt \
--file ../conda-libmamba-solver/dev/requirements.txt \
python=${{ matrix.python-version }}
conda update openssl ca-certificates certifi
conda info
python -c "from mamba import __version__; print('mamba', __version__)"
- name: Install conda-libmamba-solver
shell: bash -l {0}
working-directory: conda-libmamba-solver
run: |
python -m pip install . -vv --no-deps
- name: Run performance tests
shell: bash -l {0}
working-directory: conda
run: |
eval "$(sudo ${CONDA_PREFIX}/bin/python -m conda init bash --dev)"
python -m pytest ${GITHUB_WORKSPACE}/conda-libmamba-solver -vv --durations=0 --timeout=1800 -m "slow"
windows:
if: |
(github.event_name == 'pull_request' &&
github.event.label.name == 'performance::run') ||
(github.event.workflow_run.conclusion == 'success')
name: Windows, Python ${{ matrix.python-version }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
env:
OS: "windows"
PYTHON: ${{ matrix.python-version }}
steps:
- name: Checkout our source
uses: actions/checkout@v3
with:
path: conda-libmamba-solver
fetch-depth: 0
- name: Checkout conda
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: conda/conda
ref: libmamba
path: conda
- name: Set temp dirs correctly
# https://github.com/actions/virtual-environments/issues/712
run: |
echo "TMPDIR=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
echo "TMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
- name: Setup environment
shell: cmd
working-directory: conda
run: |
:: add mamba to requirements
type ..\conda-libmamba-solver\dev\requirements.txt >> .\tests\requirements.txt
if errorlevel 1 exit 1
:: initialize conda dev
call .\dev\windows\setup.bat
if errorlevel 1 exit 1
call .\dev-init.bat
if errorlevel 1 exit 1
python -c "from mamba import __version__; print('mamba', __version__)"
if errorlevel 1 exit 1
conda info -a
if errorlevel 1 exit 1
- name: Install conda-libmamba-solver
shell: cmd
working-directory: conda
run: |
call .\dev-init.bat
if errorlevel 1 exit 1
python -m pip install --no-deps -vv "%GITHUB_WORKSPACE%\conda-libmamba-solver"
if errorlevel 1 exit 1
- name: Run performance tests
shell: cmd
working-directory: conda
run: |
CALL dev-init.bat
if errorlevel 1 exit 1
python -m pytest "%GITHUB_WORKSPACE%\conda-libmamba-solver" -vv --durations=0 --timeout=1800 -m "slow"
if errorlevel 1 exit 1