{ "$id": "settings.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "buildtest configuration schema", "type": "object", "required": [ "system" ], "additionalProperties": false, "properties": { "system": { "type": "object", "patternProperties": { "^.*$": { "$ref": "#/definitions/system" } } } }, "definitions": { "terse": { "type": "boolean", "description": "A boolean to determine whether to enable terse mode" }, "format": { "type": "string", "description": "Determine the format fields to display when viewing table results" }, "count": { "type": "integer", "minimum": 1, "description": "Determine number of records to display in a table" }, "system": { "required": [ "executors", "moduletool", "hostnames", "compilers", "buildspecs", "report" ], "additionalProperties": false, "type": "object", "properties": { "hostnames": { "type": "array", "description": "Specify a list of hostnames to check where buildtest can run for the given system record", "items": { "type": "string" } }, "description": { "type": "string", "description": "system description field" }, "poolsize": { "type": "integer", "minimum": 1, "description": "Specify size of Process Pool for parallel processing using ``multiprocessing.Pool``" }, "max_jobs": { "type": "integer", "minimum": 1, "description": "Maximum number of jobs that can be run at a given time for a particular executor" }, "testdir": { "type": "string", "description": "Specify full path to test directory where buildtest will write tests." }, "logdir": { "type": "string", "description": "Specify location where buildtest will write log files" }, "moduletool": { "type": "string", "description": "Specify modules tool used for interacting with ``module`` command. ", "enum": [ "environment-modules", "lmod", "none" ] }, "timeout": { "type": "integer", "minimum": 1, "description": "Specify timeout duration in number of seconds" }, "pager": { "type": "boolean", "description": "A boolean to determine whether to enable paging when viewing buildspec cache" }, "buildspecs": { "type": "object", "description": "Specify configuration for ``buildtest buildspec`` command", "additionalProperties": false, "properties": { "rebuild": { "type": "boolean", "description": "A boolean to determine whether to rebuild buildspec cache" }, "count": { "$ref": "#/definitions/count" } , "format": { "$ref": "#/definitions/format" }, "terse": { "$ref": "#/definitions/terse" }, "root": { "type": "array", "items": { "type": "string" }, "description": "Specify a list of directory paths to search buildspecs. This field can be used with ``buildtest buildspec find`` to rebuild buildspec cache or build tests using ``buildtest build`` command" } } }, "report": { "type": "object", "additionalProperties": false, "description": "Specify configuration for ``buildtest report`` command", "properties": { "terse": { "$ref": "#/definitions/terse" }, "format": { "$ref": "#/definitions/format" }, "count": { "$ref": "#/definitions/count" } } }, "processor": { "type": "object", "description": "Specify processor information", "additionalProperties": false, "properties": { "numcpus": {"type": "integer", "minimum": 1, "description": "Specify Total Number of CPUs"}, "sockets": {"type": "integer", "minimum": 1, "description": "Specify Number of CPU Sockets"}, "cores": {"type": "integer", "minimum": 1, "description": "Specify Number of Physical Cores"}, "threads_per_core": {"type": "integer", "minimum": 1, "description": "Specify Threads per Core" }, "core_per_socket": {"type": "integer", "minimum": 1, "description": "Specify Cores per Socket"}, "model": {"type": "string", "description": "Specify Processor Model" }, "arch": {"type": "string", "description": "Specify processor architecture"}, "vendor": {"type": "string", "description": "Vendor Name"} } }, "compilers": { "type": "object", "description": "Declare compiler section for defining system compilers that can be referenced in buildspec.", "additionalProperties": false, "properties": { "enable_prgenv": { "type": "boolean", "description": "Enable support for Programming Environment" }, "modulepath": {"$ref": "definitions.schema.json#/definitions/list_of_strings"}, "purge": {"type": "boolean", "description": "A boolean to determine whether to purge modules via ``module purge`` when generating compiler declaration"}, "prgenv_modules": { "type": "object", "additionalProperties": false, "properties": { "gcc": { "type": "string", "description": "Specify name of Programming Environment module for gcc", "enum": [ "PrgEnv-gnu" ] }, "intel": { "type": "string", "description": "Specify name of Programming Environment module for intel", "enum": [ "PrgEnv-intel" ] }, "cray": { "type": "string", "description": "Specify name of Programming Environment module for cray", "enum": [ "PrgEnv-cray" ] }, "nvhpc": { "type": "string", "description": "Specify name of Programming Environment module for nvhpc", "enum": [ "PrgEnv-nvhpc", "PrgEnv-nvidia" ] } } }, "find": { "type": "object", "additionalProperties": false, "description": "Find compilers by specifying regular expression that is applied to modulefile names", "properties": { "gcc": { "type": "string", "description": "Specify a regular expression to search for gcc compilers from your module stack" }, "intel": { "type": "string", "description": "Specify a regular expression to search for intel compilers from your module stack" }, "cray": { "type": "string", "description": "Specify a regular expression to search for cray compilers from your module stack" }, "clang": { "type": "string", "description": "Specify a regular expression to search for clang compilers from your module stack" }, "cuda": { "type": "string", "description": "Specify a regular expression to search for cuda compilers from your module stack" }, "pgi": { "type": "string", "description": "Specify a regular expression to search for pgi compilers from your module stack" }, "upcxx": { "type": "string", "description": "Specify a regular expression to search for upcxx compilers from your module stack" }, "nvhpc": { "type": "string", "description": "Specify a regular expression to search for nvhpc compilers from your module stack" } } }, "compiler": { "type": "object", "additionalProperties": false, "description": "Start of compiler declaration", "properties": { "gcc": { "description": "Declaration of one or more GNU compilers.", "type": "object", "patternProperties": { "^.*$": { "$ref": "#/definitions/compiler_section" } } }, "intel": { "description": "Declaration of one or more Intel compilers. ", "type": "object", "patternProperties": { "^.*$": { "$ref": "#/definitions/compiler_section" } } }, "cray": { "description": "Declaration of one or more Cray compilers.", "type": "object", "patternProperties": { "^.*$": { "$ref": "#/definitions/compiler_section" } } }, "pgi": { "description": "Declaration of one or more PGI compilers.", "type": "object", "patternProperties": { "^.*$": { "$ref": "#/definitions/compiler_section" } } }, "clang": { "description": "Declaration of one or more Clang compilers.", "type": "object", "patternProperties": { "^.*$": { "$ref": "#/definitions/compiler_section" } } }, "cuda": { "description": "Declaration of one or more CUDA compilers.", "type": "object", "patternProperties": { "^.*$": { "$ref": "#/definitions/compiler_section" } } }, "upcxx": { "description": "Declaration of one or more UPCXX compilers.", "type": "object", "patternProperties": { "^.*$": { "$ref": "#/definitions/compiler_section" } } }, "nvhpc": { "description": "Declaration of one or more NVHPC compilers.", "type": "object", "patternProperties": { "^.*$": { "$ref": "#/definitions/compiler_section" } } } } } } }, "executors": { "type": "object", "additionalProperties": false, "description": "The executor section is used for declaring your executors that are responsible for running jobs. The executor section can be ``local``, ``lsf``, ``slurm``, ``cobalt``. The executors are referenced in buildspec using ``executor`` field.", "required": ["local"], "properties": { "defaults": { "type": "object", "description": "Specify default executor settings for all executors", "additionalProperties": false, "properties": { "pollinterval": { "type": "integer", "description": "Specify poll interval in seconds after job submission, where buildtest will sleep and poll all jobs for job states. This field can be configured based on your preference. Excessive polling every few seconds can result in system degradation. ", "minimum": 1, "default": 30 }, "maxpendtime": { "$ref": "#/definitions/maxpendtime" }, "account": { "$ref": "#/definitions/account" } } }, "local": { "type": "object", "description": "The ``local`` section is used for declaring local executors for running jobs on local machine", "propertyNames": { "pattern": "^[A-Za-z0-9_.-]+$" }, "additionalProperties": { "$ref": "#/definitions/local" }, "minProperties": 1 }, "lsf": { "type": "object", "description": "The ``lsf`` section is used for declaring LSF executors for running jobs using LSF scheduler", "propertyNames": { "pattern": "^[A-Za-z0-9_.-]+$" }, "additionalProperties": { "$ref": "#/definitions/lsf" } }, "slurm": { "type": "object", "description": "The ``slurm`` section is used for declaring Slurm executors for running jobs using Slurm scheduler", "propertyNames": { "pattern": "^[A-Za-z0-9_.-]+$" }, "additionalProperties": { "$ref": "#/definitions/slurm" } }, "cobalt": { "type": "object", "description": "The ``cobalt`` section is used for declaring Cobalt executors for running jobs using Cobalt scheduler", "propertyNames": { "pattern": "^[A-Za-z0-9_.-]+$" }, "additionalProperties": { "$ref": "#/definitions/cobalt" } }, "pbs": { "type": "object", "description": "The ``pbs`` section is used for declaring PBS executors for running jobs using PBS scheduler", "propertyNames": { "pattern": "^[A-Za-z0-9_.-]+$" }, "additionalProperties": { "$ref": "#/definitions/pbs" } }, "torque": { "type": "object", "description": "The ``torque`` section is used for declaring PBS/Torque executors for running jobs using Torque scheduler", "propertyNames": { "pattern": "^[A-Za-z0-9_.-]+$" }, "additionalProperties": { "$ref": "#/definitions/pbs" } }, "container": { "type": "object", "description": "The ``container`` section is used for declaring container executors for running jobs using container technology", "propertyNames": { "pattern": "^[A-Za-z0-9_.-]+$" }, "additionalProperties": { "$ref": "#/definitions/container" } } } }, "cdash": { "type": "object", "description": "Specify CDASH configuration used to upload tests via 'buildtest cdash' command", "required": ["url", "project", "site"], "properties": { "url": { "type": "string", "description": "Url to CDASH server" }, "project": { "type": "string", "description": "Name of CDASH project" }, "site": { "type": "string", "description": "Site Name reported in CDASH" } } }, "profiles": { "type": "object", "description": "The profiles section is used for declaring one or more profiles that can be used to run ``buildtest build`` that are captured as command options ", "propertyNames": { "pattern": "^[A-Za-z0-9_.-]+$" }, "additionalProperties": { "$ref": "#/definitions/profiles" } } } }, "cc": { "description": "Specify path to C compiler wrapper. You may specify a compiler wrapper such as ``gcc`` assuming its in $PATH or you can use ``modules`` property to resolve path to compiler wrapper.", "type": "string" }, "cxx": { "type": "string", "description": "Specify path to C++ compiler wrapper. You may specify a compiler wrapper such as ``g++`` assuming its in $PATH or you can use ``modules`` property to resolve path to compiler wrapper." }, "fc": { "type": "string", "description": "Specify path to Fortran compiler wrapper. You may specify a compiler wrapper such as ``gfortran`` assuming its in $PATH or you can use ``modules`` property to resolve path to compiler wrapper." }, "compiler_section": { "description": "A compiler section is composed of ``cc``, ``cxx`` and ``fc`` wrapper these are required when you need to specify compiler wrapper.", "type": "object", "additionalProperties": false, "required": [ "cc", "cxx", "fc" ], "properties": { "cc": { "$ref": "#/definitions/cc" }, "cxx": { "$ref": "#/definitions/cxx" }, "fc": { "$ref": "#/definitions/fc" }, "module": { "$ref": "#/definitions/module" } } }, "unique_string_array": { "type": "array", "uniqueItems": true, "items": { "type": "string" } }, "disable": {"type": "boolean", "description": "Disable an executor"}, "module": { "type": "object", "additionalProperties": false, "properties": { "purge": { "type": "boolean", "description": "Run ``module purge`` if purge is set" }, "load": { "$ref": "definitions.schema.json#/definitions/list_of_strings", "description": "Load one or more modules via ``module load``" }, "swap": { "description": "Swap modules using ``module swap``. The swap property expects 2 unique modules.", "type": "array", "uniqueItems": true, "minItems": 2, "maxItems": 2, "items": { "type": "string" } }, "restore": { "description": "Load a collection name via ``module restore``", "type": "string" } } }, "script": { "type": "array", "additionalProperties": false, "items": { "type": "string" } }, "maxpendtime": { "type": "integer", "description": "Cancel job if it is still pending in queue beyond maxpendtime", "minimum": 1, "default": 86400 }, "account": { "type": "string", "description": "Specify Job Account for charging resources" }, "local": { "type": "object", "description": "An instance object of local executor", "additionalProperties": false, "required": [ "shell" ], "properties": { "description": { "$ref": "#/definitions/description" }, "shell": { "type": "string", "description": "Specify the shell launcher you want to use when running tests locally" }, "before_script": { "#ref": "#/definitions/script" }, "disable": {"$ref": "#/definitions/disable"}, "module": { "$ref": "#/definitions/module" } } }, "slurm": { "type": "object", "additionalProperties": false, "description": "An instance object of slurm executor", "properties": { "description": { "$ref": "#/definitions/description" }, "options": { "type": "array", "items": { "type": "string" }, "description": "Specify any other options for ``sbatch`` used by this executor for running all jobs." }, "cluster": { "type": "string", "description": "Specify the slurm cluster you want to use ``-M ``" }, "partition": { "type": "string", "description": "Specify the slurm partition you want to use ``-p ``" }, "qos": { "type": "string", "description": "Specify the slurm qos you want to use ``-q ``" }, "before_script": { "description": "The ``before_script`` section can be used to specify commands before start of test. The script will be sourced in active shell.", "#ref": "#/definitions/script" }, "maxpendtime": { "description": "overrides default ``maxpendtime`` value", "$ref": "#/definitions/maxpendtime" }, "account": { "description": "overrides default ``account`` value", "$ref": "#/definitions/account" }, "disable": {"$ref": "#/definitions/disable"}, "module": { "$ref": "#/definitions/module" } } }, "lsf": { "type": "object", "description": "An instance object of lsf executor", "additionalProperties": false, "required": [ "queue" ], "properties": { "description": { "type": "string", "description": "description field for documenting your executor" }, "options": { "type": "array", "items": { "type": "string" }, "description": "Specify any options for ``bsub`` for this executor when running all jobs associated to this executor" }, "queue": { "type": "string", "description": "Specify the lsf queue you want to use ``-q ``" }, "before_script": { "description": "The ``before_script`` section can be used to specify commands before start of test. The script will be sourced in active shell.", "#ref": "#/definitions/script" }, "maxpendtime": { "description": "overrides default ``maxpendtime`` value", "$ref": "#/definitions/maxpendtime" }, "account": { "description": "overrides default ``account`` value", "$ref": "#/definitions/account" }, "disable": {"$ref": "#/definitions/disable"}, "module": { "$ref": "#/definitions/module" } } }, "cobalt": { "type": "object", "description": "An instance object of cobalt executor", "additionalProperties": false, "required": [ "queue" ], "properties": { "description": { "$ref": "#/definitions/description" }, "options": { "type": "array", "items": { "type": "string" }, "description": "Specify any options for ``qsub`` for this executor when running all jobs associated to this executor" }, "queue": { "type": "string", "description": "Specify the lsf queue you want to use ``-q ``" }, "before_script": { "description": "The ``before_script`` section can be used to specify commands before start of test. The script will be sourced in active shell.", "#ref": "#/definitions/script" }, "maxpendtime": { "description": "overrides default ``maxpendtime`` value", "$ref": "#/definitions/maxpendtime" }, "account": { "description": "overrides default ``account`` value", "$ref": "#/definitions/account" }, "disable": {"$ref": "#/definitions/disable"}, "module": { "$ref": "#/definitions/module" } } }, "pbs": { "type": "object", "description": "An instance object of pbs executor", "additionalProperties": false, "required": [ "queue" ], "properties": { "description": { "$ref": "#/definitions/description" }, "options": { "type": "array", "items": { "type": "string" }, "description": "Specify any options for ``qsub`` for this executor when running all jobs associated to this executor" }, "queue": { "type": "string", "description": "Specify the lsf queue you want to use ``-q ``" }, "before_script": { "description": "The ``before_script`` section can be used to specify commands before start of test. The script will be sourced in active shell.", "#ref": "#/definitions/script" }, "maxpendtime": { "description": "overrides default ``maxpendtime`` value", "$ref": "#/definitions/maxpendtime" }, "account": { "description": "overrides default ``account`` value", "$ref": "#/definitions/account" }, "disable": {"$ref": "#/definitions/disable"}, "module": { "$ref": "#/definitions/module" } } }, "container": { "type": "object", "additionalProperties": false, "properties": { "description": { "$ref": "#/definitions/description" }, "before_script": { "description": "The ``before_script`` section can be used to specify commands before start of test. The script will be sourced in active shell.", "#ref": "#/definitions/script" }, "platform": { "type": "string", "description": "Specify container platform to use for container. ", "enum": [ "docker", "singularity", "podman" ] }, "image": { "type": "string", "description": "Specify container image to use for container. " }, "mounts": { "type": "string", "description": "Specify a list of directory paths to bind mount into the container" }, "options": { "type": "string", "description": "Specify a list of options to pass to container runtime. " }, "disable": {"$ref": "#/definitions/disable"} } }, "profiles": { "type": "object", "properties": { "buildspecs": {"$ref": "definitions.schema.json#/definitions/list_of_strings"}, "exclude-buildspecs": {"$ref": "definitions.schema.json#/definitions/list_of_strings"}, "tags": {"$ref": "definitions.schema.json#/definitions/list_of_strings"}, "exclude-tags": {"$ref": "definitions.schema.json#/definitions/list_of_strings"}, "executors": {"$ref": "definitions.schema.json#/definitions/list_of_strings"}, "filter": { "type": "object", "additionalProperties": false, "properties": { "type": { "type": "array", "description": "Specify the `type` field to determine which schema to use during filtering", "uniqueItems": true, "minItems": 1, "items": { "type": "string", "enum": ["script", "spack"] } }, "tags": { "description": "Filter by tags", "$ref": "definitions.schema.json#/definitions/list_of_strings" }, "maintainers": { "description": "Filter by maintainers", "$ref": "definitions.schema.json#/definitions/list_of_strings" } } }, "module": {"type": "string"}, "unload-modules": {"type": "string"}, "module-purge": {"type": "boolean"}, "validate": {"type": "boolean", "description": "Validate given buildspecs and buildtest will stop after parse stage"}, "dry-run": {"type": "boolean", "description": "Show a list of tests that will potentially be run"}, "rebuild": {"type": "integer", "minimum": 1, "maximum": 50, "description": "Specify number of tests to rebuild"}, "limit": {"type": "integer", "minimum": 1, "description": "Limit number of tests to build"}, "account": {"$ref": "#/definitions/account"}, "maxpendtime": { "$ref": "#/definitions/maxpendtime" }, "pollinterval": {"type": "integer", "minimum": 1, "description": "Specify poll interval in seconds"}, "procs": {"$ref": "definitions.schema.json#/definitions/list_of_positive_integers"}, "nodes": {"$ref": "definitions.schema.json#/definitions/list_of_positive_integers"}, "testdir": {"type": "string", "description": "Specify test directory where buildtest will write tests."}, "timeout": {"type": "integer", "minimum": 1}, "executor-type": { "type": "string", "description": "Specify the `executor-type` field used by ``--executor-type`` option which determines if test will run by local or batch executor", "enum": ["local", "batch"] }, "remove-stagedir": {"type": "boolean", "description": "Remove stage directory after test completes"}, "max-jobs": {"type": "integer", "minimum": 1, "description": "Maximum number of jobs that can be run at a given time for a particular executor"} } }, "description": { "type": "string", "description": "description field for documenting your executor" } } }