-
Notifications
You must be signed in to change notification settings - Fork 6
712 lines (601 loc) · 26.1 KB
/
CI.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
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
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
name: CI/CD
on: [push, workflow_dispatch]
jobs:
ci_ubuntu:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-20.04']
steps:
- uses: actions/checkout@v2
- name: Install python
uses: actions/setup-python@v2
with:
python-version: '2.7.18'
- name: Install libraries on ubuntu 20
if: ${{ (matrix.os == 'ubuntu-20.04') }}
run: |
sudo apt-get update
sudo apt-get install netcdf-bin libnetcdf-dev python-dev libgtk2.0-0 libgtk2.0-dev
- name: Install dependencies
run: |
python2 -m pip install numpy==1.16.6 matplotlib==2.2.5 Cython==0.29.24 Pyro stdeb pyyaml h5py psutil
sudo cp /usr/include/netcdf.h $RUNNER_TOOL_CACHE/Python/2.7.18/x64/include/python2.7
- name: Install netCDF4 python package
run: |
sudo conda create -p ~/tempenv python=2.7
sudo conda install -p ~/tempenv netcdf4
sudo cp -rfv ~/tempenv/lib/python2.7/site-packages/cftime $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib/python2.7/site-packages
sudo cp -rfv ~/tempenv/lib/python2.7/site-packages/netCDF4/ $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib/python2.7/site-packages/
sudo cp -rfv ~/tempenv/lib/libhdf5* $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib
sudo cp -rfv ~/tempenv/lib/libnetcdf* $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib
sudo cp -rfv ~/tempenv/lib/libmfhdf* $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib
sudo cp -rfv ~/tempenv/lib/libdf* $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib
sudo cp -rfv ~/tempenv/lib/libjpeg* $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib
- name: Install ScientificPython
run: |
cd $HOME
git clone https://code.ill.fr/scientific-software/scientific-python.git
cd scientific-python/
sudo $RUNNER_TOOL_CACHE/Python/2.7.18/x64/bin/python setup.py install
- name: Install MMTK
run: |
cd $HOME
git clone https://code.ill.fr/scientific-software/mmtk.git
cd mmtk
sudo cp -fv $GITHUB_WORKSPACE/BuildServer/Unix/setup.py ~/mmtk
sudo $RUNNER_TOOL_CACHE/Python/2.7.18/x64/bin/python setup.py install
- name: Install MDANSE
run: |
cd $GITHUB_WORKSPACE
$RUNNER_TOOL_CACHE/Python/2.7.18/x64/bin/python setup.py install
- name: Run tests
run: |
export PATH=$PATH:/usr/lib/x86_64-linux-gnu
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/definitions.sh
$GITHUB_WORKSPACE/BuildServer/Unix/tests.sh
- name: Tar artifacts
if: |
contains( github.ref, 'main' ) ||
contains( github.ref, 'develop' ) ||
contains( github.ref, 'release-' ) ||
contains( github.ref, 'hotfix-' ) ||
contains( github.ref, 'build-' ) ||
contains( github.ref, 'tags' )
run: |
cd $RUNNER_TOOL_CACHE/Python/2.7.18
mv x64 python
tar -czf python.tar.gz python
- name: Upload artifacts
if: |
contains( github.ref, 'main' ) ||
contains( github.ref, 'develop' ) ||
contains( github.ref, 'release-' ) ||
contains( github.ref, 'hotfix-' ) ||
contains( github.ref, 'build-' ) ||
contains( github.ref, 'tags' )
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}_artifacts
path: ${{ runner.tool_cache }}/Python/2.7.18/python.tar.gz
retention-days: 1
deploy_ubuntu:
needs: ci_ubuntu
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-20.04']
if: |
contains( github.ref, 'main' ) ||
contains( github.ref, 'develop' ) ||
contains( github.ref, 'release-' ) ||
contains( github.ref, 'hotfix-' ) ||
contains( github.ref, 'build-' ) ||
contains( github.ref, 'tags' )
steps:
- uses: actions/checkout@v2
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: ${{ matrix.os }}_artifacts
path: ~/
- name: Untar artifacts
run: tar -xzf ~/python.tar.gz -C $HOME
- name: Install netcdf
run: |
sudo apt-get update
sudo apt-get install netcdf-bin libnetcdf-dev
- name: Install wx
run: |
sudo conda create -p ~/tempenv python=2.7
sudo conda install -p ~/tempenv -c daf wxpython
sudo cp -r ~/tempenv/lib/python2.7/site-packages/wx-3.0-gtk2/wx ~/python/lib/python2.7/site-packages
sudo cp -r ~/tempenv/lib/wx ~/python/lib
sudo cp -r ~/tempenv/include/wx-3.0/wx ~/python/include
sudo cp ~/tempenv/lib/libwx* ~/python/lib
- name: Install vtk
run: |
sudo conda install -p ~/tempenv -c ccordoba12 vtk
sudo cp -r ~/tempenv/lib/python2.7/site-packages/vtk ~/python/lib/python2.7/site-packages
sudo cp ~/tempenv/lib/libvtk* ~/python/lib
- run: sudo apt-get install dos2unix graphviz
- name: Deploy
run: |
sudo ~/python/bin/python -m pip install sphinx==1.6.7 stdeb docutils==0.17.1 graphviz
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/definitions.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/setup_ci.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/deploy.sh
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}_installer
path: ${{ github.workspace }}/*.deb
retention-days: 90
- name: Edit postinst
if: ${{ (matrix.os == 'ubuntu-20.04') }}
run: sed -i '$ a ln -s /usr/lib/x86_64-linux-gnu/libnetcdf.so.18 /usr/local/lib/libnetcdf.so.15' $GITHUB_WORKSPACE/BuildServer/Unix/Debian/Resources/DEBIAN/postinst
- name: Deploy for ubuntu 21
if: ${{ (matrix.os == 'ubuntu-20.04') }}
run: |
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/definitions.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/setup_ci.sh
export DISTRO=ubuntu-21.04
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/deploy.sh
- name: Upload ubuntu21 artifacts
if: ${{ (matrix.os == 'ubuntu-20.04') }}
uses: actions/upload-artifact@v2
with:
name: ubuntu-21.04_installer
path: ${{ github.workspace }}/*21*.deb
retention-days: 90
ci_ubuntu22:
runs-on: 'ubuntu-22.04'
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Install libraries
run: |
sudo apt-get update
sudo apt-get install netcdf-bin libnetcdf-dev libgtk2.0-0 libgtk2.0-dev
- name: Create conda environment
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 2.7.18
activate-environment: mdanse
- name: Install python netCDF4 package
run: conda install netCDF4 -n mdanse
- name: Install python packages
run: |
$CONDA/envs/mdanse/bin/python -m pip install numpy matplotlib Cython Pyro stdeb pyyaml h5py psutil
- name: Install ScientificPython
run: |
cd $HOME
git clone https://code.ill.fr/scientific-software/scientific-python.git
cd scientific-python/
sudo $CONDA/envs/mdanse/bin/python setup.py install
- name: Install MMTK
run: |
cd $HOME
git clone https://code.ill.fr/scientific-software/mmtk.git
cd mmtk
sudo cp -fv $GITHUB_WORKSPACE/BuildServer/Unix/setup.py ~/mmtk
sudo $CONDA/envs/mdanse/bin/python setup.py install
- name: Install MDANSE
run: |
cd $GITHUB_WORKSPACE
$CONDA/envs/mdanse/bin/python setup.py install
- name: Run unit tests
run: |
cd $GITHUB_WORKSPACE/Tests/UnitTests
$CONDA/envs/mdanse/bin/python AllTests.py
- name: Run dependency tests
run: |
cd $GITHUB_WORKSPACE/Tests/DependenciesTests
$CONDA/envs/mdanse/bin/python AllTests.py
- name: Run functional tests
run: |
cd $GITHUB_WORKSPACE/Tests/FunctionalTests/Jobs
$CONDA/envs/mdanse/bin/python BuildJobTests.py
$CONDA/envs/mdanse/bin/python AllTests.py
- name: Tar python
if: |
contains( github.ref, 'main' ) ||
contains( github.ref, 'develop' ) ||
contains( github.ref, 'release-' ) ||
contains( github.ref, 'hotfix-' ) ||
contains( github.ref, 'build-' ) ||
contains( github.ref, 'tags' )
run: |
cd $CONDA/envs
tar -czf python.tar.gz mdanse
- name: Upload artifacts
if: |
contains( github.ref, 'main' ) ||
contains( github.ref, 'develop' ) ||
contains( github.ref, 'release-' ) ||
contains( github.ref, 'hotfix-' ) ||
contains( github.ref, 'build-' ) ||
contains( github.ref, 'tags' )
uses: actions/upload-artifact@v2
with:
name: ubuntu-22.04_artifacts
path: /usr/share/miniconda/envs/python.tar.gz
retention-days: 1
deploy_ubuntu22:
needs: ci_ubuntu22
runs-on: 'ubuntu-22.04'
strategy:
fail-fast: false
if: |
contains( github.ref, 'main' ) ||
contains( github.ref, 'develop' ) ||
contains( github.ref, 'release-' ) ||
contains( github.ref, 'hotfix-' ) ||
contains( github.ref, 'build-' ) ||
contains( github.ref, 'tags' )
steps:
- uses: actions/checkout@v2
- name: Initialise conda environment
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 2.7.18
activate-environment: mdanse
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: ubuntu-22.04_artifacts
path: /usr/share/miniconda/envs
- name: Untar python
run: |
cd $CONDA/envs
tar -xzf python.tar.gz
- name: Install netcdf
run: |
sudo apt-get update
sudo apt-get install netcdf-bin libnetcdf-dev
- name: Install wxPython and VTK python packages
run: |
sudo conda install -n mdanse -c daf wxpython
sudo conda install -n mdanse -c ccordoba12 vtk
- run: sudo apt-get install dos2unix graphviz
- run: conda remove ncurses --force
- name: Deploy
run: |
sudo $CONDA/envs/mdanse/bin/python -m pip install sphinx==1.6.7 docutils==0.17.1 graphviz
sed -i 's|PYTHONEXE=$HOME/python|PYTHONEXE=$CONDA/envs/mdanse|' $GITHUB_WORKSPACE/BuildServer/Unix/Debian/deploy.sh
sudo rm $CONDA/envs/mdanse/lib/libtinfo*
sudo rm $CONDA/envs/mdanse/lib/libncurses*
sudo rm -v $CONDA/envs/mdanse/lib/libstdc*
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/definitions.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/setup_ci.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/Debian/deploy.sh
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: ubuntu-22.04_installer
path: ${{ github.workspace }}/*.deb
retention-days: 90
# OSX
ci_osx:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['macos-11', 'macos-12']
steps:
- uses: actions/checkout@v2
- name: Install python
uses: actions/setup-python@v2
with:
python-version: '2.7.18'
- name: Install dependencies with pip
run: |
python2 -m pip install numpy==1.16.6 matplotlib==2.2.5 Cython==0.29.24 Pyro stdeb pyyaml h5py psutil
- name: Install netCDF4 python package
run: |
sudo conda create -p ~/tempenv python=2.7
sudo conda install -p ~/tempenv netcdf4
sudo cp -rfv ~/tempenv/lib/python2.7/site-packages/cftime $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib/python2.7/site-packages
sudo cp -rfv ~/tempenv/lib/python2.7/site-packages/netCDF4 $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib/python2.7/site-packages
sudo cp -rfv ~/tempenv/lib/libhdf5* $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib
sudo cp -rfv ~/tempenv/lib/libnetcdf* $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib
sudo cp -rfv ~/tempenv/lib/libmfhdf* $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib
sudo cp -rfv ~/tempenv/lib/libdf* $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib
sudo cp -rfv ~/tempenv/lib/libjpeg* $RUNNER_TOOL_CACHE/Python/2.7.18/x64/lib
- name: Install NetCDF
run: |
brew install netcdf
sudo cp -r /usr/local/opt/netcdf/include $RUNNER_TOOL_CACHE/Python/2.7.18/x64/include/netcdf
- name: Install ScientificPython
run: |
cd $HOME
git clone https://code.ill.fr/scientific-software/scientific-python.git
cd scientific-python
sudo python2 setup.py install
- name: Install MMTK
run: |
cd $HOME
git clone https://code.ill.fr/scientific-software/mmtk.git
cd mmtk
sudo cp -fv $GITHUB_WORKSPACE/BuildServer/Unix/setup.py $HOME/mmtk
sudo python2 setup.py install
- name: Install MDANSE
run: |
cd $GITHUB_WORKSPACE
sudo cp -fv $GITHUB_WORKSPACE/BuildServer/setup.py $GITHUB_WORKSPACE
python2 setup.py install
- name: Run dependency tests
run: |
cd $GITHUB_WORKSPACE/Tests/DependenciesTests
python2 AllTests.py
- name: Run unit tests
run: |
cd $GITHUB_WORKSPACE/Tests/UnitTests
python2 AllTests.py
- name: Run functional tests
run: |
cd $GITHUB_WORKSPACE/Tests/FunctionalTests/Jobs
python2 BuildJobTests.py
python2 AllTests.py
- name: Tar python
if: ${{ (matrix.os == 'macos-12') && ( contains( github.ref, 'main' ) || contains( github.ref, 'develop' ) || contains( github.ref, 'release-' ) || contains( github.ref, 'hotfix-' ) || contains( github.ref, 'build-' ) || contains( github.ref, 'tags' ) || contains( github.ref, 'web' ) ) }}
run: |
cd $RUNNER_TOOL_CACHE/Python/2.7.18
mv x64 Resources
tar -czf python.tar.gz Resources
- name: Upload artifacts
if: ${{ (matrix.os == 'macos-12') && ( contains( github.ref, 'main' ) || contains( github.ref, 'develop' ) || contains( github.ref, 'release-' ) || contains( github.ref, 'hotfix-' ) || contains( github.ref, 'build-' ) || contains( github.ref, 'tags' ) || contains( github.ref, 'web' ) ) }}
uses: actions/upload-artifact@v2
with:
name: MacOS_artifacts
path: ${{ runner.tool_cache }}/Python/2.7.18/python.tar.gz
retention-days: 1
deploy_osx:
needs: ci_osx
runs-on: macos-12
if: |
contains( github.ref, 'main' ) ||
contains( github.ref, 'develop' ) ||
contains( github.ref, 'release-' ) ||
contains( github.ref, 'hotfix-' ) ||
contains( github.ref, 'build-' ) ||
contains( github.ref, 'tags' ) ||
contains( github.ref, 'web' )
steps:
- uses: actions/checkout@v2
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: MacOS_artifacts
path: ~/
- run: brew install netcdf graphviz
- name: Untar python
run: |
mkdir -p ~/Contents
tar -xzf ~/python.tar.gz -C $HOME/Contents
sudo install_name_tool -change /Users/runner/hostedtoolcache/Python/2.7.18/x64/lib/libpython2.7.dylib /Users/runner/Contents/Resources/lib/libpython2.7.dylib /Users/runner/Contents/Resources/bin/python2.7
sudo install_name_tool -change /Users/runner/hostedtoolcache/Python/2.7.18/x64/lib/libpython2.7.dylib /Users/runner/Contents/Resources/lib/libpython2.7.dylib /Users/runner/Contents/Resources/bin/python
- name: Install wx
run: |
sudo conda create -p $HOME/tempenv python=2.7
sudo conda install -p $HOME/tempenv -c david_baddeley wxpython
sudo cp -rv $HOME/tempenv/lib/python2.7/site-packages/wx-3.0-osx_cocoa/* ~/Contents/Resources/lib/python2.7/site-packages
sudo cp -v $HOME/tempenv/lib/libwx* ~/Contents/Resources/lib
- name: Install vtk
run: |
sudo conda install -p $HOME/tempenv -c free vtk
sudo cp -r $HOME/tempenv/lib/python2.7/site-packages/vtk ~/Contents/Resources/lib/python2.7/site-packages
sudo cp $HOME/tempenv/lib/libvtk* ~/Contents/Resources/lib
- name: Deploy MDANSE
run: |
source $GITHUB_WORKSPACE/BuildServer/Unix/MacOS/definitions.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/setup_ci.sh
source $GITHUB_WORKSPACE/BuildServer/Unix/MacOS/deploy.sh
sudo cp -fv $GITHUB_WORKSPACE/BuildServer/Unix/MacOS/Resources/README.txt $GITHUB_WORKSPACE
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: MacOS executable
path: |
${{ github.workspace }}/*.dmg
${{ github.workspace }}/README.txt
retention-days: 90
# WINDOWS
ci_windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Restore VS2008 from cache
id: vs2008-cache
uses: actions/cache@v2
with:
path: |
C:\Program Files (x86)\Microsoft Visual Studio 9.0
C:\Program Files\Microsoft SDKs\Windows\v6.0A
key: vs2008
- name: Install VS2008 if not cached
if: steps.vs2008-cache.outputs.cache-hit != 'true'
run: |
cd $env:HOME
Invoke-WebRequest http://download.microsoft.com/download/8/1/d/81d3f35e-fa03-485b-953b-ff952e402520/VS2008ProEdition90dayTrialENUX1435622.iso -UseBasicParsing -Outfile $env:HOME\vs2008.iso
Mount-DiskImage -ImagePath $env:HOME\vs2008.iso
Start-Process E:\Setup\setup.exe -ArgumentList "/q /full /norestart" -Wait
- name: Restore cached VC++ For Python2.7
id: vcpython-cache
uses: actions/cache@v2
with:
path: ${{ github.workspace }}\vcpython.msi
key: vcpython
- name: Download VC++ For Python2.7 if not cached
if: steps.vcpython-cache.outputs.cache-hit != 'true'
run: |
Invoke-WebRequest https://web.archive.org/web/20210106040224/https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi -UseBasicParsing -Outfile $env:GITHUB_WORKSPACE\vcpython.msi
- name: Install VC++ For Python2.7
run: Start-Process $env:GITHUB_WORKSPACE\vcpython.msi -ArgumentList "/quiet /passive /norestart" -Wait
- name: Create conda environment
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 2.7.18
activate-environment: mdanse
- name: Install h5py and netCDF4
run: conda install h5py netCDF4
shell: cmd /C CALL {0}
- name: Install backend dependencies
run: |
%CONDA%\envs\mdanse\python.exe -m pip install numpy==1.16.6 matplotlib Cython pyyaml Pyro
shell: cmd /C CALL {0}
- name: Install ScientificPython
run: |
cd %GITHUB_WORKSPACE%
git clone https://code.ill.fr/scientific-software/scientific-python.git
copy /y %GITHUB_WORKSPACE%\BuildServer\Windows\scientific-setup.py %GITHUB_WORKSPACE%\scientific-python\
cd scientific-python
%CONDA%\envs\mdanse\python.exe scientific-setup.py build --netcdf_prefix="%CONDA%\envs\mdanse\Library\include" --netcdf_dll="%CONDA%\envs\mdanse\Library\bin"
%CONDA%\envs\mdanse\python.exe setup.py install --netcdf_prefix="%CONDA%\envs\mdanse\Library\include" --netcdf_dll="%CONDA%\envs\mdanse\Library\bin"
copy "%CONDA%\envs\mdanse\Library\bin\netcdf.dll" "%CONDA%\envs\mdanse\Lib\site-packages\Scientific"
copy "%CONDA%\envs\mdanse\Library\lib\netcdf.lib" "%CONDA%\envs\mdanse\Lib\site-packages\Scientific"
copy "%CONDA%\envs\mdanse\Library\include\netcdf.h" "%CONDA%\envs\mdanse\Include\Scientific"
shell: cmd /C CALL {0}
- name: Install MMTK
run: |
cd /D %GITHUB_WORKSPACE%
git clone https://code.ill.fr/scientific-software/mmtk.git
copy /y %GITHUB_WORKSPACE%\BuildServer\Windows\mmtk-setup.py %GITHUB_WORKSPACE%\mmtk
cd mmtk
%CONDA%\envs\mdanse\python.exe mmtk-setup.py build
%CONDA%\envs\mdanse\python.exe setup.py install
shell: cmd /C CALL {0}
- name: Install MDANSE
run: |
set PATH="C:\Program Files (x86)\Microsoft Visual Studio 9.0\";"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\x86_amd64";%PATH%
cd %GITHUB_WORKSPACE%
copy /y "%GITHUB_WORKSPACE%\BuildServer\setup.py" %GITHUB_WORKSPACE%
%CONDA%\envs\mdanse\python.exe setup.py install
shell: cmd /C CALL {0}
- name: Run dependencies tests
run: |
cd %GITHUB_WORKSPACE%\Tests\DependenciesTests
%CONDA%\envs\mdanse\python.exe AllTests.py
shell: cmd /C CALL {0}
- name: Run unit tests
run: |
cd %GITHUB_WORKSPACE%\Tests\UnitTests\
%CONDA%\envs\mdanse\python.exe AllTests.py
shell: cmd /C CALL {0}
- name: Run functional tests
run: |
cd %GITHUB_WORKSPACE%\Tests\FunctionalTests\Jobs
%CONDA%\envs\mdanse\python.exe BuildJobTests.py
%CONDA%\envs\mdanse\python.exe AllTests.py
shell: cmd /C CALL {0}
- name: Tar artifacts
if: |
contains( github.ref, 'main' ) ||
contains( github.ref, 'develop' ) ||
contains( github.ref, 'release-' ) ||
contains( github.ref, 'hotfix-' ) ||
contains( github.ref, 'build-' ) ||
contains( github.ref, 'tags' )
run: |
cd /D %CONDA%\envs
tar -czf mdanse.tar.gz mdanse
shell: cmd /C CALL {0}
- name: Upload artifacts
if: |
contains( github.ref, 'main' ) ||
contains( github.ref, 'develop' ) ||
contains( github.ref, 'release-' ) ||
contains( github.ref, 'hotfix-' ) ||
contains( github.ref, 'build-' ) ||
contains( github.ref, 'tags' )
uses: actions/upload-artifact@v2
with:
name: windows_artifacts
path: C:\Miniconda\envs\mdanse.tar.gz
retention-days: 1
deploy_windows:
runs-on: windows-2019
needs: ci_windows
if: |
contains( github.ref, 'main' ) ||
contains( github.ref, 'develop' ) ||
contains( github.ref, 'release-' ) ||
contains( github.ref, 'hotfix-' ) ||
contains( github.ref, 'build-' ) ||
contains( github.ref, 'tags' )
steps:
- uses: actions/checkout@v2
- name: Restore VS2008 from cache
id: vs2008-cache
uses: actions/cache@v2
with:
path: |
C:\Program Files (x86)\Microsoft Visual Studio 9.0
C:\Program Files\Microsoft SDKs\Windows\v6.0A
key: vs2008
- name: Install VS2008 if not cached
if: steps.vs2008-cache.outputs.cache-hit == 'false'
run: |
cd $env:HOME
Invoke-WebRequest http://download.microsoft.com/download/8/1/d/81d3f35e-fa03-485b-953b-ff952e402520/VS2008ProEdition90dayTrialENUX1435622.iso -UseBasicParsing -Outfile $env:HOME\vs2008.iso
Mount-DiskImage -ImagePath $env:HOME\vs2008.iso
Start-Process E:\Setup\setup.exe -ArgumentList "/q /full /norestart" -Wait
- name: Restore cached VC++ For Python2.7
id: vcpython-cache
uses: actions/cache@v2
with:
path: ${{ github.workspace }}\vcpython.msi
key: vcpython
- name: Download VC++ For Python2.7 if not cached
if: steps.vcpython-cache.outputs.cache-hit != 'true'
run: |
Invoke-WebRequest https://web.archive.org/web/20210106040224/https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi -UseBasicParsing -Outfile $env:GITHUB_WORKSPACE\vcpython.msi
- name: Install VC++ For Python2.7
run: Start-Process $env:GITHUB_WORKSPACE\vcpython.msi -ArgumentList "/quiet /passive /norestart" -Wait
- name: Initialise conda environment
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 2.7.18
activate-environment: mdanse
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: windows_artifacts
path: C:\Miniconda\envs
- name: Untar python
run: |
cd /D C:\Miniconda\envs
tar -xkf mdanse.tar.gz
shell: cmd /C CALL {0}
- name: Install packages required for documentation and psutil
run: |
%CONDA%\envs\mdanse\python.exe -m pip install docutils==0.17.1 sphinx==1.6.7 stdeb psutil
conda install graphviz
shell: cmd /C CALL {0}
- name: Install GUI dependencies
run: |
cd "%GITHUB_WORKSPACE%\BuildServer\Windows\Dependencies\"
%CONDA%\envs\mdanse\python.exe -m pip install PyQt4‑4.11.4‑cp27‑cp27m‑win_amd64.whl VTK‑6.3.0‑cp27‑cp27m‑win_amd64.whl wxPython_common‑3.0.2.0‑py2‑none‑any.whl wxPython‑3.0.2.0‑cp27‑none‑win_amd64.whl
shell: cmd /C CALL {0}
- name: Alter conf_api.py for correct sphinx build
run: |
Set-Location $Env:GITHUB_WORKSPACE\Doc\
(gc conf_api.py) -replace '#graphviz_dot', 'graphviz_dot' | Out-File -encoding UTF8 conf_api.py
- name: Deploy
run: |
mkdir %GITHUB_WORKSPACE%\BuildServer\Windows\Build
cd %GITHUB_WORKSPACE%\BuildServer\Windows\Build\
call "%GITHUB_WORKSPACE%\BuildServer\Windows\definitions.bat"
call "%GITHUB_WORKSPACE%\BuildServer\Windows\setup_ci.bat"
call "%GITHUB_WORKSPACE%\BuildServer\Windows\deploy.bat"
shell: cmd /C CALL {0}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Windows_executable
path: ${{ github.workspace }}\*.exe
retention-days: 90