mirror of
https://github.com/Findus23/rebound-collisions.git
synced 2024-09-19 15:53:48 +02:00
81 lines
1.9 KiB
YAML
81 lines
1.9 KiB
YAML
image: python:3.8
|
|
|
|
# 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
|
|
- curl -O -u gitlabci:$COLLISION_SECRETS https://lw1.at/s/astro/collision-secrets/save.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
|
|
|
|
visualisation:
|
|
stage: visualisation
|
|
needs:
|
|
- simulation_run
|
|
script:
|
|
- poetry run python analyze.py test_simulationrun
|
|
- poetry run python collisionhistory.py test_simulationrun
|
|
- poetry run python collisionstats.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
|