-
Notifications
You must be signed in to change notification settings - Fork 137
341 lines (309 loc) · 10.1 KB
/
quick.yml
File metadata and controls
341 lines (309 loc) · 10.1 KB
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# Quick checks that run the defaults for bootstrap.py for linux, macOS and Windows
name: quick
on: [push, workflow_dispatch]
jobs:
download_source:
name: Check out sources
runs-on: ubuntu-latest
steps:
- name: Initial setup
run: |
set -xe
pwd
echo ${{ github.workspace }}
mkdir -p ./modules
mkdir -p ~/tmp
- name: Setup source cache
id: modules-cache
uses: actions/cache@v5
with:
path: ./modules
enableCrossOsArchive: true
key: modules-${{ github.sha }}
restore-keys: |
modules
- name: Check out cctbx_project
uses: actions/checkout@v6
with:
path: ./modules/cctbx_project_checkout
- name: Update other sources and keep cctbx_project checkout
run: |
set -xe
pwd
ls
mv ./modules/cctbx_project_checkout ~/tmp/cctbx_project
cp ~/tmp/cctbx_project/libtbx/auto_build/bootstrap.py .
python bootstrap.py hot update
cd modules
rm -fr cctbx_project
mv ~/tmp/cctbx_project .
cd ..
rm bootstrap.py
# -----------------------------------------------------------------------------
quick_unix_checks:
needs: download_source
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
name: Default bootstrap on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Initial setup
run: |
set -xe
pwd
echo ${{ github.workspace }}
mkdir -p ./build
- name: Setup source cache
id: modules-cache
uses: actions/cache@v5
with:
path: ./modules
enableCrossOsArchive: true
fail-on-cache-miss: true
key: modules-${{ github.sha }}
- name: Setup build cache
id: build-cache
uses: actions/cache@v5
with:
path: ./build
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build
- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
channels: conda-forge
conda-remove-defaults: "true"
- name: Setup conda package cache
id: cache-conda-packages
uses: actions/cache@v5
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-cache-${{ hashFiles('./modules/cctbx_project/libtbx/auto_build/conda_envs') }}
- name: Download phenix_examples, phenix_regression
run: |
set -xe
source ${CONDA}/etc/profile.d/conda.sh
conda activate base
cd ./modules
curl -O https://raw.githubusercontent.com/cctbx/cctbx/refs/heads/master/scripts/download-azure-artifact.py
for artifact in phenix_examples phenix_regression; do
python download-azure-artifact.py \
--organization cctbx \
--project cctbx_project \
--definitions 4 \
--artifact-name $artifact \
--local-filename ${artifact}.zip
unzip ${artifact}.zip
rm ${artifact}.zip
done
- name: Base environment info
run: |
set -xe
source ${CONDA}/etc/profile.d/conda.sh
conda info
conda list
pwd
ls
ls ./modules
df -h
- name: Skip build cache, if requested
if: contains(github.event.head_commit.message, '[skip cache]')
run: |
set -xe
rm -fr ./build
ls
- name: Run bootstrap.py
run: |
set -xe
pwd
ln -s ./modules/cctbx_project/libtbx/auto_build/bootstrap.py .
python ./modules/cctbx_project/libtbx/auto_build/bootstrap.py base build --nproc=4
source ./build/setpaths.sh
libtbx.configure \
cma_es \
fable \
rstbx \
spotfinder \
cbflib_adaptbx \
phenix_regression \
phenix_examples
cd build
libtbx.scons -j 4
libtbx.scons -j 4
- name: Run tests
run: |
set -xe
pwd
source ./build/setpaths.sh
rm -fr tests
mkdir tests
cd tests
export PYTHONDEVMODE=1
export PYTHONTRACEMALLOC=1
libtbx.run_tests_parallel \
module=annlib_adaptbx \
module=boost_adaptbx \
module=cbflib_adaptbx \
module=cctbx \
module=cctbx_website \
module=cma_es \
module=fable \
module=gltbx \
module=iotbx \
module=libtbx \
module=rstbx \
module=scitbx \
module=crys3d \
module=smtbx \
module=spotfinder \
module=xcif \
nproc=4
# -----------------------------------------------------------------------------
quick_win_checks:
needs: download_source
strategy:
fail-fast: false
matrix:
os: [windows-latest]
name: Default bootstrap on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Initial setup
shell: bash
run: |
set -xe
pwd
echo ${{ github.workspace }}
mkdir -p ./build
mkdir -p ./modules
- name: Setup source cache
id: modules-cache
uses: actions/cache@v5
with:
path: ./modules
enableCrossOsArchive: true
fail-on-cache-miss: true
key: modules-${{ github.sha }}
- name: Setup build cache
id: build-cache
uses: actions/cache@v5
with:
path: ./build
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build
- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
channels: conda-forge
conda-remove-defaults: "true"
- name: Setup conda package cache
id: cache-conda-packages
uses: actions/cache@v5
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-cache-${{ hashFiles('.\\modules\\cctbx_project\\libtbx\\auto_build\\conda_envs') }}
- name: Download phenix_examples, phenix_regression
shell: cmd
run: |
call %CONDA%\condabin\conda.bat activate base
call %CONDA%\condabin\conda.bat install -y curl
cd ./modules
curl -O https://raw.githubusercontent.com/cctbx/cctbx/refs/heads/master/scripts/download-azure-artifact.py
python download-azure-artifact.py ^
--organization cctbx ^
--project cctbx_project ^
--definitions 4 ^
--artifact-name phenix_examples ^
--local-filename phenix_examples.zip
if %errorlevel% neq 0 exit /b %errorlevel%
unzip phenix_examples.zip
if %errorlevel% neq 0 exit /b %errorlevel%
del phenix_examples.zip
if %errorlevel% neq 0 exit /b %errorlevel%
python download-azure-artifact.py ^
--organization cctbx ^
--project cctbx_project ^
--definitions 4 ^
--artifact-name phenix_regression ^
--local-filename phenix_regression.zip
if %errorlevel% neq 0 exit /b %errorlevel%
unzip phenix_regression.zip
if %errorlevel% neq 0 exit /b %errorlevel%
del phenix_regression.zip
if %errorlevel% neq 0 exit /b %errorlevel%
- name: Base environment info
shell: cmd
run: |
call %CONDA%\condabin\conda.bat info
if %errorlevel% neq 0 exit /b %errorlevel%
call %CONDA%\condabin\conda.bat list
if %errorlevel% neq 0 exit /b %errorlevel%
dir ${{ github.workspace }}
dir ${{ github.workspace }}\modules
- name: Fix broken cache
continue-on-error: true
shell: cmd
run: |
del /S /Q .\build\lib\_pycbf.pyd 2> nul
- name: Skip build cache, if requested
if: contains(github.event.head_commit.message, '[skip cache]')
shell: cmd
run: |
rmdir /s /q .\build
dir
- name: Run bootstrap.py
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
call %CONDA%\condabin\activate.bat base
copy .\modules\cctbx_project\libtbx\auto_build\bootstrap.py .
python .\modules\cctbx_project\libtbx\auto_build\bootstrap.py base build --nproc=4
if %errorlevel% neq 0 exit /b %errorlevel%
call .\build\setpaths.bat
call libtbx.configure ^
cma_es ^
fable ^
rstbx ^
spotfinder ^
cbflib_adaptbx
if %errorlevel% neq 0 exit /b %errorlevel%
cd build
call libtbx.scons -j 4
if %errorlevel% neq 0 exit /b %errorlevel%
call libtbx.scons -j 4
if %errorlevel% neq 0 exit /b %errorlevel%
- name: Run tests
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
call .\build\setpaths.bat
rmdir /S /Q tests
mkdir tests
cd tests
set PYTHONDEVMODE=1
set PYTHONTRACEMALLOC=1
libtbx.run_tests_parallel ^
module=annlib_adaptbx ^
module=boost_adaptbx ^
module=cbflib_adaptbx ^
module=cctbx ^
module=cctbx_website ^
module=cma_es ^
module=fable ^
module=gltbx ^
module=iotbx ^
module=libtbx ^
module=rstbx ^
module=scitbx ^
module=crys3d ^
module=smtbx ^
module=spotfinder ^
module=xcif ^
nproc=4
if %errorlevel% neq 0 exit /b %errorlevel%