Commit 8531b809 authored by hm-lehmberg's avatar hm-lehmberg

Merge branch 'configure_ci_setup' of gitlab.lrz.de:vadere/vadere into configure_ci_setup

parents 797d0d71 b3e77b71
Pipeline #89252 passed with stages
in 1 minute and 50 seconds
......@@ -3,6 +3,9 @@
# Goal: Run all jobs defined here on all available runners (GNU/Linux and
# Windows).
#
# Procedure: Use GitLab job templates in and use them in the job description by
# using the "extend" keyword.
#
# ## Job Description Syntax
#
# <job_name>: # Job name which is displayed in web interface.
......@@ -20,21 +23,129 @@
# Variable Definitions
variables:
VADERE_DEPLOYMENT_BASE_URL: "http://www.vadere.org/builds"
VADERE_PACKAGE_NAME: "vadere.${CI_COMMIT_REF_NAME}.${CI_ENVIRONMENT_NAME}"
VADERE_PACKAGE_NAME: "vadere.${CI_COMMIT_REF_NAME}.${CI_ENVIRONMENT_NAME}.zip"
# Stage Definitions
stages:
- unit_test
- integration_test
- deploy
include: .gitlab/ci/templates/deploy_stage_templates.yml
# include: .gitlab/ci/templates/test_stage_templates.yml
# PLEASE, OMIT FOLLOWING GITLAB PITFALLS:
#
# 1. "include:" statement does not work properly and seems really buggy.
# Therefore, define all job templates and jobs directly here.
# "include: .gitlab/ci/templates/test_stage_templates.yml" does not work!
# 2. Variables from "variables" section are not expanded correctly in "url"
# section of an "environment".
# Job Template Definitions
.template_unit_tests:
stage: unit_test
# Skip OpenCL tests by using "-Dtest=!Test1,!Test2,..." because GitLab
# runners do not support OpenCL.
script:
- mvn clean
- mvn -Dtest=!TestConvolution,!TestBitonicSort,!TestCLLinkedList,!TestCLOptimalStepsModel test
- python3 Tools/ContinuousIntegration/collect_line_and_branch_coverage.py
artifacts:
when: on_success
paths:
- "*/target/site/coverage-reports"
expire_in: 1 week
.template_scenario_files:
stage: integration_test
script:
- mvn clean
- mvn -Dmaven.test.skip=true package
- python3 Tools/ContinuousIntegration/run_vadere_console_with_all_scenario_files.py
artifacts:
when: on_failure
paths:
- "log_dir"
expire_in: 1 week
when: manual
.template_seed_test:
stage: integration_test
script:
- mvn clean
- mvn -Dmaven.test.skip=true package
- python3 Tools/VadereAnalysisTools/VadereAnalysisTool/setup.py install --user
- python3 Tools/ContinuousIntegration/run_seed_comparison_test.py
artifacts:
when: on_failure
paths:
- "Tools/ContinuousIntegration/run_seed_comparison_test.d/output"
expire_in: 1 week
when: manual
.template_deploy_branch:
stage: deploy
script:
- mvn clean
- mvn -Dmaven.test.skip=true package
- python3 -m zipfile -c ${VADERE_PACKAGE_NAME} VadereModelTests/ VadereGui/target/vadere.jar VadereSimulator/target/vadere-console.jar
- scp ${VADERE_PACKAGE_NAME} di49mur@webdev-mwn.lrz.de:~/webserver/htdocs/builds/branches/${VADERE_PACKAGE_NAME}
when: manual
# Job Definitions
## Jobs for GNU/Linux runner (which is labelled with tag "linux")
run_unit_tests_on_linux:
extends: .template_unit_tests
tags:
- linux
run_scenario_files_on_linux:
extends: .template_scenario_files
tags:
- linux
run_seed_test_on_linux:
extends: .template_seed_test
tags:
- linux
deploy_branch_on_linux:
extends: .template_deploy_branch
tags:
- linux
environment:
name: linux
url: ${VADERE_DEPLOYMENT_BASE_URL}/branches/vadere.${CI_COMMIT_REF_NAME}.${CI_ENVIRONMENT_NAME}.zip
## Jobs for Windows runner (which is labelled with tag "windows")
run_unit_tests_on_windows:
extends: .template_unit_tests
tags:
- windows
run_scenario_files_on_windows:
extends: .template_scenario_files
tags:
- windows
run_seed_test_on_windows:
extends: .template_seed_test
tags:
- windows
deploy_branch_on_windows:
extends: .template_deploy_branch
tags:
- windows
- windows
environment:
name: windows
url: ${VADERE_DEPLOYMENT_BASE_URL}/branches/vadere-console.${CI_COMMIT_REF_NAME}.${CI_COMMIT_SHA}.${CI_ENVIRONMENT_NAME}.jar"
url: ${VADERE_DEPLOYMENT_BASE_URL}/branches/vadere.${CI_COMMIT_REF_NAME}.${CI_ENVIRONMENT_NAME}.zip
# # GitLab CI Job Templates
#
# These templates can be used to execute jobs on different runners.
#
# Use GitLab's "include" keyword to include this file and the "extends" to
# extend a template below.
#
# For more details, see https://docs.gitlab.com/ee/ci/yaml/README.html#using-extends-and-include-together
.template_deploy_branch:
stage: deploy
script:
- export
- mvn clean
- mvn -Dmaven.test.skip=true package
- python3 -m zipfile --create ${VADERE_PACKAGE_NAME}.zip VadereModelTests/ VadereGui/target/vadere.jar VadereSimulator/target/vadere-console.jar
- scp ${VADERE_PACKAGE_NAME}.zip di49mur@webdev-mwn.lrz.de:~/webserver/htdocs/builds/branches/${VADERE_PACKAGE_NAME}.zip
when: manual
# # GitLab CI Job Templates
#
# These templates can be used to execute jobs on different runners.
#
# Use GitLab's "include" keyword to include this file and the "extends" to
# extend a template below.
#
# For more details, see https://docs.gitlab.com/ee/ci/yaml/README.html#using-extends-and-include-together
.template_unit_tests:
stage: unit_test
# Skip OpenCL tests by using "-Dtest=!Test1,!Test2,..." because GitLab
# runners do not support OpenCL.
script:
- mvn clean
- mvn -Dtest=!TestConvolution,!TestBitonicSort,!TestCLLinkedList,!TestCLOptimalStepsModel test
- python3 Tools/ContinuousIntegration/collect_line_and_branch_coverage.py
artifacts:
when: on_success
paths:
- "*/target/site/coverage-reports"
expire_in: 1 week
.template_scenario_files:
stage: integration_test
script:
- mvn clean
- mvn -Dmaven.test.skip=true package
- python3 Tools/ContinuousIntegration/run_vadere_console_with_all_scenario_files.py
artifacts:
when: on_failure
paths:
- "log_dir"
expire_in: 1 week
.template_seed_test:
stage: integration_test
script:
- mvn clean
- mvn -Dmaven.test.skip=true package
- python3 Tools/VadereAnalysisTools/VadereAnalysisTool/setup.py install --user
- python3 Tools/ContinuousIntegration/run_seed_comparison_test.py
artifacts:
when: on_failure
paths:
- "Tools/ContinuousIntegration/run_seed_comparison_test.d/output"
expire_in: 1 week
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment