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

113 lines
2.5 KiB
YAML

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