1
0
Fork 0
mirror of https://github.com/Findus23/rebound-collisions.git synced 2024-09-19 15:53:48 +02:00
rebound-collisions/.gitlab-ci.yml

114 lines
2.5 KiB
YAML
Raw Permalink Normal View History

2021-08-16 13:05:11 +02:00
image: python:3.9
2021-01-25 22:50:43 +01:00
# 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"
2021-02-03 22:48:06 +01:00
GIT_SUBMODULE_STRATEGY: recursive # fetch submodule
2021-01-25 22:50:43 +01:00
# 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
2021-03-08 18:07:40 +01:00
- poetry install --no-dev
2021-03-08 15:51:46 +01:00
- curl -O -u gitlabci:$COLLISION_SECRETS https://lw1.at/s/astro/collision-secrets/rsmc_dataset.jsonl
2021-02-03 22:51:20 +01:00
- mkdir initcon
- curl -o initcon/conditions_many.input -u gitlabci:$COLLISION_SECRETS https://lw1.at/s/astro/collision-secrets/conditions_many.input
2021-01-25 22:50:43 +01:00
mypy:
2021-02-03 23:02:41 +01:00
needs: [ ]
2021-02-03 22:40:35 +01:00
stage: tests
2021-01-25 22:50:43 +01:00
script:
2021-02-08 21:21:22 +01:00
- pip install mypy
2021-02-03 22:36:39 +01:00
- mypy *.py
2021-02-03 22:43:50 +01:00
allow_failure: true
2021-01-25 22:50:43 +01:00
2021-02-03 22:36:39 +01:00
simulation_run:
2021-02-03 22:40:35 +01:00
stage: simulation
2021-02-03 23:02:41 +01:00
needs: [ ]
2021-02-08 21:21:22 +01:00
script:
2021-02-08 21:11:42 +01:00
- cd heartbeat
- poetry run python symlinks.py
- ./build.sh
- cd ..
2021-02-03 22:43:50 +01:00
- poetry run python water_sim.py test_simulationrun test
2021-02-03 22:36:39 +01:00
artifacts:
paths:
- "test_simulationrun*"
expire_in: 60 days
2022-01-30 20:09:45 +01:00
analyze:
2021-02-03 22:40:35 +01:00
stage: visualisation
2021-02-03 22:38:52 +01:00
needs:
- simulation_run
2021-02-03 22:36:39 +01:00
script:
2021-03-03 15:26:16 +01:00
- mkdir plots
2021-02-03 22:43:50 +01:00
- poetry run python analyze.py test_simulationrun
2022-01-30 20:09:45 +01:00
collisionhistory:
stage: visualisation
needs:
- simulation_run
script:
- mkdir plots
2021-02-03 22:43:50 +01:00
- poetry run python collisionhistory.py test_simulationrun
2022-01-30 20:09:45 +01:00
collisionstats:
stage: visualisation
needs:
- simulation_run
script:
- mkdir plots
2021-02-03 22:43:50 +01:00
- poetry run python collisionstats.py test_simulationrun
2022-01-30 20:09:45 +01:00
particle_numbers:
stage: visualisation
needs:
- simulation_run
script:
- mkdir plots
2021-05-03 16:00:51 +02:00
- poetry run python particle_numbers.py test_simulationrun
2022-01-30 20:09:45 +01:00
final_results:
stage: visualisation
needs:
- simulation_run
script:
- mkdir plots
2021-05-03 16:00:51 +02:00
- poetry run python final_results.py test_simulationrun
2021-02-03 23:07:00 +01:00
2022-01-30 20:09:45 +01:00
2021-02-03 23:07:00 +01:00
graph:
stage: visualisation
needs:
- simulation_run
script:
2021-02-03 22:43:50 +01:00
- poetry run python graph.py test_simulationrun
2021-02-03 23:07:00 +01:00
artifacts:
paths:
- test_simulationrun.gv
expire_in: 30 days
2021-02-03 23:02:41 +01:00
video:
stage: visualisation
needs:
- simulation_run
script:
2021-02-03 23:22:36 +01:00
- poetry run python timeplot.py test_simulationrun
2021-01-25 22:50:43 +01:00
2021-02-03 22:40:35 +01:00
stages:
- tests
- simulation
- visualisation