STASIS
A pipeline delivery generator
Loading...
Searching...
No Matches
core.h
Go to the documentation of this file.
1
2#ifndef STASIS_CORE_H
3#define STASIS_CORE_H
4
5#include <stdio.h>
6#include <stdlib.h>
7#include <stdbool.h>
8#include <string.h>
9#include <limits.h>
10#include <unistd.h>
11#include <time.h>
12#include <sys/statvfs.h>
13#include "version.h"
14
15#define STASIS_BANNER_HEADER "------------------------------------------------------------------------"
16#define STASIS_BUFSIZ 8192
17#define STASIS_NAME_MAX 255
18#define STASIS_DIRSTACK_MAX 1024
19#define STASIS_TIME_STR_MAX 128
20#define HTTP_ERROR(X) (X >= 400 || X < 0)
21
22#include "config.h"
23#include "core_mem.h"
24#include "core_message.h"
25
26#define COE_CHECK_ABORT(COND, MSG) \
27 do {\
28 if (!globals.continue_on_error && (COND)) { \
29 msg(STASIS_MSG_ERROR, MSG ": Aborting execution (--continue-on-error/-C is not enabled)\n"); \
30 exit(1); \
31 } \
32 } while (0)
33
35 bool verbose;
48 long cpu_limit;
53 char *tmpdir;
55 char *sysconfdir;
56 int task_timeout;
59 struct {
60 char *tox_posargs;
61 char *conda_reactivate;
63 struct Jfrog {
64 char *jfrog_artifactory_base_url;
65 char *jfrog_artifactory_product;
66 char *cli_major_ver;
67 char *version;
68 char *os;
69 char *arch;
70 char *remote_filename;
71 char *repo;
72 char *url;
73 } jfrog;
74 struct EnvCtl *envctl;
75};
76extern struct STASIS_GLOBAL globals;
77
78extern const char *VERSION;
79extern const char *AUTHOR;
80extern const char *BANNER;
81
85void globals_free();
86
87#endif //STASIS_CORE_H
void globals_free()
Definition globals.c:50
Definition envctl.h:24
Definition core.h:63
Definition core.h:34
bool continue_on_error
Do not stop on test failures.
Definition core.h:37
long cpu_limit
Limit parallel processing to n cores (default: max - 1)
Definition core.h:48
struct STASIS_GLOBAL::@315130210337004362151227236046070067320260054071 workaround
!< Image to use for a Manylinux build
char * sysconfdir
Path where STASIS reads its configuration files (mission directory, etc)
Definition core.h:55
struct StrList * pip_packages
Pip packages to install after initial activation.
Definition core.h:52
bool enable_rewrite_spec_stage_2
Enable automatic @STR@ replacement in output files.
Definition core.h:45
char * tmpdir
Path to temporary storage directory.
Definition core.h:53
char * wheel_builder
!< Time in seconds before task is terminated
Definition core.h:57
char * wheel_builder_manylinux_image
!< Backend to build wheels (build, cibuildwheel, manylinux)
Definition core.h:58
bool enable_artifactory_build_info
Enable build info (best disabled for pure test runs)
Definition core.h:41
bool enable_artifactory_upload
Enable artifactory file upload (dry-run when false)
Definition core.h:42
bool always_update_base_environment
Update base environment immediately after activation.
Definition core.h:36
char * conda_install_prefix
Path to install conda.
Definition core.h:54
bool enable_overwrite
Enable release file clobbering.
Definition core.h:44
bool enable_task_logging
Enable logging task output to a file.
Definition core.h:47
bool enable_docker
Enable docker image builds.
Definition core.h:39
long parallel_fail_fast
Fail immediately on error.
Definition core.h:49
int pool_status_interval
Report "Task is running" every n seconds.
Definition core.h:50
bool conda_fresh_start
Always install a new copy of Conda.
Definition core.h:38
struct StrList * conda_packages
Conda packages to install after initial activation.
Definition core.h:51
bool enable_testing
Enable package testing.
Definition core.h:43
bool enable_artifactory
Enable artifactory uploads.
Definition core.h:40
bool enable_parallel
Enable testing in parallel.
Definition core.h:46
bool verbose
Enable verbose output.
Definition core.h:35
Definition strlist.h:16