-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
113 lines (100 loc) · 2.46 KB
/
.gitlab-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
image: python:3.9
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
GIT_SUBMODULE_STRATEGY: recursive # fetch submodule
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache/pip
- venv/
before_script:
- python -V # Print out python version for debugging
- pip install poetry
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- poetry install --no-dev
- curl -O -u gitlabci:$COLLISION_SECRETS https://lw1.at/s/astro/collision-secrets/rsmc_dataset.jsonl
- mkdir initcon
- curl -o initcon/conditions_many.input -u gitlabci:$COLLISION_SECRETS https://lw1.at/s/astro/collision-secrets/conditions_many.input
mypy:
needs: [ ]
stage: tests
script:
- pip install mypy
- mypy *.py
allow_failure: true
simulation_run:
stage: simulation
needs: [ ]
script:
- cd heartbeat
- poetry run python symlinks.py
- ./build.sh
- cd ..
- poetry run python water_sim.py test_simulationrun test
artifacts:
paths:
- "test_simulationrun*"
expire_in: 60 days
analyze:
stage: visualisation
needs:
- simulation_run
script:
- mkdir plots
- poetry run python analyze.py test_simulationrun
collisionhistory:
stage: visualisation
needs:
- simulation_run
script:
- mkdir plots
- poetry run python collisionhistory.py test_simulationrun
collisionstats:
stage: visualisation
needs:
- simulation_run
script:
- mkdir plots
- poetry run python collisionstats.py test_simulationrun
particle_numbers:
stage: visualisation
needs:
- simulation_run
script:
- mkdir plots
- poetry run python particle_numbers.py test_simulationrun
final_results:
stage: visualisation
needs:
- simulation_run
script:
- mkdir plots
- poetry run python final_results.py test_simulationrun
graph:
stage: visualisation
needs:
- simulation_run
script:
- poetry run python graph.py test_simulationrun
artifacts:
paths:
- test_simulationrun.gv
expire_in: 30 days
video:
stage: visualisation
needs:
- simulation_run
script:
- poetry run python timeplot.py test_simulationrun
stages:
- tests
- simulation
- visualisation