From 2c6be6d0efb7fb89a99beb9010ee2fc4f5f48b12 Mon Sep 17 00:00:00 2001 From: Alan Coleman <alanc@udel.edu> Date: Tue, 5 Mar 2024 11:42:55 +0100 Subject: [PATCH] Add python examples to CI --- .gitlab-ci.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6a5606c68..82fb6f6c1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -222,7 +222,7 @@ build_test-clang-14: junit: - ${CI_PROJECT_DIR}/build/test_outputs/junit*.xml paths: - - ${CI_PROJECT_DIR}/build/build_examples/example_outputs #python tests need this + - ${CI_PROJECT_DIR}/build/build_examples/example_outputs #python tests/examples need this - ${CI_PROJECT_DIR}/build/test_outputs/junit*.xml - ${CI_PROJECT_DIR}/build/CMakeCache.txt #python tests need this - ${CI_PROJECT_DIR}/build/bin #python tests need this @@ -409,3 +409,23 @@ python-tests: paths: - ${CI_PROJECT_DIR}/python/python-test.log allow_failure: false + +python-examples: + extends: .pthon + image: corsika/devel:u-22.04 + needs: + - job: build_test_example-u-22_04 + artifacts: true + artifacts: + when: always + expire_in: 1 month + paths: + - ${CI_PROJECT_DIR}/python/examples/example_plots + script: + - export EXAMPLE_SHOWER_DIR=${CI_PROJECT_DIR}/build/build_examples/example_outputs/radio_em_shower_outputs + - cd ${CI_PROJECT_DIR}/python + - pip3 install --user -e '.[test,examples]' + - cd ${CI_PROJECT_DIR}/python/examples + - python3 particle_distribution.py --input-dir $EXAMPLE_SHOWER_DIR + - python3 shower_profile.py --input-dir $EXAMPLE_SHOWER_DIR + - python3 radio_emission.py --input-dir $EXAMPLE_SHOWER_DIR -- GitLab