image: python:3.7 # 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 - pip install mypy - 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: - mypy *.py allow_failure: true simulation_run: stage: simulation needs: [ ] script: - 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 --save artifacts: paths: - test_simulationrun.mp4 expire_in: 30 days stages: - tests - simulation - visualisation