Skip to content
Snippets Groups Projects
ci-templates.yml 9.14 KiB
#### Copyright (c) HySoP 2011-2024
##
## This file is part of HySoP software.
## See "https://particle_methods.gricad-pages.univ-grenoble-alpes.fr/hysop-doc/"
## for further info.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
##     http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##

# This file contains common definitions and templates for
# continuous integration job of hysop project.
#
# Usage :
# add in .gitlab-ci.yml :

# include: <path-to-this-file>/ci-templates.yml

# -- default values for ci variables --
# May be used to switch between config ...
variables:
  # Default path to  build the library
  BUILD_DIR: $CI_PROJECT_DIR/builddir/
  # Default path to predefined simulations and examples
  EXAMPLE_DIR: $CI_PROJECT_DIR/hysop_examples/examples
  # Path to the public registry
  HYSOP_PUBLIC_REGISTRY: $CI_REGISTRY/particle_methods/hysop
  # Path to the registry of the current project
  HYSOP_CURRENT_REGISTRY: $CI_REGISTRY/$CI_PROJECT_PATH
  # Path to hysop registry - We use the public one for all docker images
  # except the "hysop ready-to-use" one for "sandbox" branches.
  HYSOP_REGISTRY: $CI_REGISTRY/particle_methods/hysop

stages:
  # --- Docker build stage ---
  # The first stage contains jobs used to build
  # docker images 'ready to use' for build/install.
  # Requirement for jobs in this stage :
  # - should build and push a docker image to the project registry
  # - should be allowed to failed (in order to avoid blocking of last stage jobs)
  # - should run only when commit message contains [docker build]
  # - use Dockerfile from ci/docker_images/<image-name>
  #
  # Templates for these jobs : .docker-build (see below).
  # We use different layers because some of the generated images are used
  # as a starting point for other images.
  - docker-build
  # --- Build stage ---
  - env
  # To execute cmake and configure the project
  - configure
  # To execute make and build the project
  - build
  # To install software, generate a "hysop-ready" docker image and asave it in the registry.
  - install
  - release
  # To run all tests
  - test
  # To create a Dockerfile with Hysop installed
  - hysop_img_binder 
  - hysop_img_lab