Skip to content
Snippets Groups Projects
Commit 7855ae68 authored by Soeren Peters's avatar Soeren Peters
Browse files

Change output folder name. Remove colon from CI jobs.

parent f932ef3e
No related branches found
No related tags found
1 merge request!218dynamically create CI pipeline for regression tests.
...@@ -261,7 +261,7 @@ build-regression-tests-ci: ...@@ -261,7 +261,7 @@ build-regression-tests-ci:
needs: [] needs: []
trigger:regression-tests: trigger-regression-tests:
stage: test stage: test
needs: needs:
- build-regression-tests-ci - build-regression-tests-ci
......
...@@ -13,9 +13,8 @@ download_reference_data () { ...@@ -13,9 +13,8 @@ download_reference_data () {
# 1. REFERENCE_DATA_DIR - to download the reference data and compare against # 1. REFERENCE_DATA_DIR - to download the reference data and compare against
# 2. CMAKE_FLAGS - cmake flags for the build of VirtualFluids # 2. CMAKE_FLAGS - cmake flags for the build of VirtualFluids
# 3. APPLICATION - the application to be executed # 3. APPLICATION - the application to be executed
# 4. PATH_TO_DIR - the path to the produced data to be compared # 4. RESULT_DATA_DIR - the path to the produced data to be compared
run_regression_test () { run_regression_test () {
download_reference_data $1 download_reference_data $1
rm -rf build && mkdir -p build rm -rf build && mkdir -p build
...@@ -27,5 +26,4 @@ run_regression_test () { ...@@ -27,5 +26,4 @@ run_regression_test () {
# execute fieldcompare (A more comprehensive manual can be found here https://gitlab.com/dglaeser/fieldcompare) # execute fieldcompare (A more comprehensive manual can be found here https://gitlab.com/dglaeser/fieldcompare)
fieldcompare dir $4 reference_data/$1 --include-files "*.vtu" fieldcompare dir $4 reference_data/$1 --include-files "*.vtu"
} }
\ No newline at end of file
...@@ -12,8 +12,8 @@ CMAKE_FLAGS="--preset=make_gpu -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECT ...@@ -12,8 +12,8 @@ CMAKE_FLAGS="--preset=make_gpu -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECT
APPLICATION=./build/bin/DrivenCavity APPLICATION=./build/bin/DrivenCavity
# 4. set the path to the produced data # 4. set the path to the produced data
PATH_TO_DIR=output/DrivenCavity RESULT_DATA_DIR=output/DrivenCavity
run_regression_test "$REFERENCE_DATA_DIR" "$CMAKE_FLAGS" "$APPLICATION" "$PATH_TO_DIR" run_regression_test "$REFERENCE_DATA_DIR" "$CMAKE_FLAGS" "$APPLICATION" "$RESULT_DATA_DIR"
...@@ -13,7 +13,7 @@ CMAKE_FLAGS="--preset=make_gpu -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECT ...@@ -13,7 +13,7 @@ CMAKE_FLAGS="--preset=make_gpu -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECT
APPLICATION=./build/bin/DrivenCavityUniform APPLICATION=./build/bin/DrivenCavityUniform
# 4. set the path to the produced data # 4. set the path to the produced data
PATH_TO_DIR=output/DrivenCavity_uniform RESULT_DATA_DIR=output/DrivenCavity_uniform
run_regression_test "$REFERENCE_DATA_DIR" "$CMAKE_FLAGS" "$APPLICATION" "$PATH_TO_DIR" run_regression_test "$REFERENCE_DATA_DIR" "$CMAKE_FLAGS" "$APPLICATION" "$RESULT_DATA_DIR"
from dataclasses import dataclass
from jinja2 import Template from jinja2 import Template
from pathlib import Path from pathlib import Path
...@@ -6,7 +5,7 @@ TEMPLATES_DIR = Path(__file__).parent ...@@ -6,7 +5,7 @@ TEMPLATES_DIR = Path(__file__).parent
REGRESSION_CI_TEMPLATE = TEMPLATES_DIR / "regression-tests-ci.yml.j2" REGRESSION_CI_TEMPLATE = TEMPLATES_DIR / "regression-tests-ci.yml.j2"
GENERATED_DIR = Path("generated") GENERATED_DIR = Path("generated")
REGRESSION_CI_FILE = GENERATED_DIR / "regression-tests-ci.yml" REGRESSION_CI_FILE = GENERATED_DIR / "regression-tests-ci.yml"
TEST_FILE_DIR = Path("regression-tests")
def build_regression_job_string(regression_tests: list[str]) -> str: def build_regression_job_string(regression_tests: list[str]) -> str:
...@@ -15,13 +14,7 @@ def build_regression_job_string(regression_tests: list[str]) -> str: ...@@ -15,13 +14,7 @@ def build_regression_job_string(regression_tests: list[str]) -> str:
def main(): def main():
regression_tests_files = [item.stem for item in TEST_FILE_DIR.glob("*_test.sh")]
root_dir = "regression-tests"
root_dir_instance = Path(root_dir)
regression_tests_files = [item.stem for item in root_dir_instance.glob("*_test.sh")]
print(regression_tests_files)
regression_tests_ci_file = build_regression_job_string(regression_tests_files) regression_tests_ci_file = build_regression_job_string(regression_tests_files)
REGRESSION_CI_FILE.write_text(regression_tests_ci_file) REGRESSION_CI_FILE.write_text(regression_tests_ci_file)
......
...@@ -17,7 +17,7 @@ stages: ...@@ -17,7 +17,7 @@ stages:
- pip install fieldcompare - pip install fieldcompare
{% for regression_test in regression_tests %} {% for regression_test in regression_tests %}
regression-test:{{ regression_test }}: run-regression-test-{{ regression_test }}:
extends: .regression-test extends: .regression-test
script: script:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment