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;
49 long cpu_limit;
54 char *tmpdir;
56 char *sysconfdir;
57 int task_timeout;
61 struct {
62 char *tox_posargs;
63 char *conda_reactivate;
65 struct Jfrog {
66 char *jfrog_artifactory_base_url;
67 char *jfrog_artifactory_product;
68 char *cli_major_ver;
69 char *version;
70 char *os;
71 char *arch;
72 char *remote_filename;
73 char *repo;
74 char *url;
75 } jfrog;
76 struct EnvCtl *envctl;
77};
78extern struct STASIS_GLOBAL globals;
79
80extern const char *VERSION;
81extern const char *AUTHOR;
82extern const char *BANNER;
83
87void globals_free();
88
89#endif //STASIS_CORE_H
void globals_free()
Definition globals.c:51
Definition envctl.h:24
Definition core.h:65
Definition core.h:34
char * micromamba_download_url
Override download URL for micromamba.
Definition core.h:38
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:49
struct STASIS_GLOBAL::@315130210337004362151227236046070067320260054071 workaround
!< Reduces surface area of random changes between builds
char * sysconfdir
Path where STASIS reads its configuration files (mission directory, etc).
Definition core.h:56
struct StrList * pip_packages
Pip packages to install after initial activation.
Definition core.h:53
bool enable_rewrite_spec_stage_2
Enable automatic @STR@ replacement in output files.
Definition core.h:46
char * tmpdir
Path to temporary storage directory.
Definition core.h:54
char * wheel_builder
!< Time in seconds before task is terminated
Definition core.h:58
char * wheel_builder_manylinux_image
!< Backend to build wheels (build, cibuildwheel, manylinux)
Definition core.h:59
bool enable_artifactory_build_info
Enable build info (best disabled for pure test runs).
Definition core.h:42
bool enable_artifactory_upload
Enable artifactory file upload (dry-run when false).
Definition core.h:43
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:55
bool enable_overwrite
Enable release file clobbering.
Definition core.h:45
bool force_repeatable
!< Image to use for a Manylinux build
Definition core.h:60
bool enable_task_logging
Enable logging task output to a file.
Definition core.h:48
bool enable_docker
Enable docker image builds.
Definition core.h:40
long parallel_fail_fast
Fail immediately on error.
Definition core.h:50
int pool_status_interval
Report "Task is running" every n seconds.
Definition core.h:51
bool conda_fresh_start
Always install a new copy of Conda.
Definition core.h:39
struct StrList * conda_packages
Conda packages to install after initial activation.
Definition core.h:52
bool enable_testing
Enable package testing.
Definition core.h:44
bool enable_artifactory
Enable artifactory uploads.
Definition core.h:41
bool enable_parallel
Enable testing in parallel.
Definition core.h:47
bool verbose
Enable verbose output.
Definition core.h:35
Definition strlist.h:16