Skip to content

Commit

Permalink
GitLab CI: set cmake parameter alpaka_DEBUG=2 if cmake build type is …
Browse files Browse the repository at this point in the history
…DEBUG
  • Loading branch information
SimeonEhrig committed Sep 6, 2023
1 parent 75fc32d commit a49b74d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions script/job_generator/generate_job_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Create GitLab-CI job description written in yaml from the job matrix."""

from typing import List, Dict, Tuple
from typing import List, Dict, Tuple, Union
from typeguard import typechecked
import os, yaml
import gitlab
Expand Down Expand Up @@ -221,7 +221,7 @@ def verify_image(

@typechecked
def append_backend_variables(
variables: Dict[str, str], job: Dict[str, Tuple[str, str]]
variables: Dict[str, Union[str, int]], job: Dict[str, Tuple[str, Union[str, int]]]
):
"""Searches for enabled back-ends in the job parameters and appends the back-end
variable to variables to enable it in the CI job.
Expand All @@ -237,7 +237,7 @@ def append_backend_variables(


@typechecked
def job_variables(job: Dict[str, Tuple[str, str]]) -> Dict[str, str]:
def job_variables(job: Dict[str, Tuple[str, str]]) -> Dict[str, Union[str, int]]:
"""Add variables to the job depending of the job dict.
Args:
Expand All @@ -246,7 +246,7 @@ def job_variables(job: Dict[str, Tuple[str, str]]) -> Dict[str, str]:
Returns:
Dict[str, str]: Dict of {variable name : variable value}.
"""
variables: Dict[str, str] = {}
variables: Dict[str, Union[str, int]] = {}

################################################################################################
### job independent environment variables
Expand Down Expand Up @@ -288,6 +288,11 @@ def job_variables(job: Dict[str, Tuple[str, str]]) -> Dict[str, str]:
variables["ALPAKA_CI_CMAKE_VER"] = job[CMAKE][VERSION]
variables["ALPAKA_BOOST_VERSION"] = job[BOOST][VERSION]

if job[BUILD_TYPE][VERSION] == CMAKE_DEBUG:
variables["alpaka_DEBUG"] = 2
else:
variables["alpaka_DEBUG"] = 0

# all back-ends are disabled by default
# back-ends are conditionally enabled depending on the job parameters
variables[ALPAKA_ACC_CPU_B_OMP2_T_SEQ_ENABLE] = "OFF"
Expand Down

0 comments on commit a49b74d

Please sign in to comment.