forked from mdlpstsci/hstcal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JenkinsfileRT
61 lines (53 loc) · 2.33 KB
/
JenkinsfileRT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Obtain files from source control system.
// [skip ci] and [ci skip] have no effect here.
if (utils.scm_checkout(['skip_disable':true])) return
// Allow modification of the job configuration, affects all relevant build configs.
// Pass this object in the argument list to the`run()` function below to apply these settings to the job's execution.
jobconfig = new JobConfig()
jobconfig.post_test_summary = true
// Config data to share between builds.
CFLAGS = ''
LDFLAGS = ''
DEFAULT_FLAGS = "${CFLAGS} ${LDFLAGS}"
// Some waf flags cause a prompt for input during configuration, hence the 'yes'.
configure_cmd = "yes '' | ./waf configure --prefix=./_install ${DEFAULT_FLAGS}"
// Configure artifactory ingest
data_config = new DataConfig()
data_config.server_id = 'bytesalad'
data_config.root = 'tests_output'
data_config.match_prefix = '(.*)_result' // .json is appended automatically
// Run nightly tests, which include the slow ones.
bc = new BuildConfig()
bc.nodetype = "RHEL-7"
bc.name = "release"
// Note: The source tree is placed in the 'clone' subdir by the CI system.
bc.env_vars = ['PATH=./clone/_install/bin:$PATH',
'OMP_NUM_THREADS=4',
'TEST_BIGDATA=https://bytesalad.stsci.edu/artifactory',
'jref=/grp/hst/cdbs/jref/',
'iref=/grp/hst/cdbs/iref/',
'oref=/grp/hst/cdbs/oref/']
bc.conda_channels = ['http://conda.anaconda.org/conda-forge/']
bc.conda_packages = ['python=3.9',
'cfitsio',
'pkg-config',
'astropy']
bc.build_cmds = ["${configure_cmd} --release-with-symbols",
"./waf build",
"./waf install",
"calacs.e --version",
"calwf3.e --version",
"cs0.e --version",
"pip install pytest ci-watson"]
bc.test_cmds = ["pytest tests --basetemp=tests_output --junitxml results.xml --bigdata --slow -v"]
bc.failedUnstableThresh = 1
bc.failedFailureThresh = 6
// Upload artifacts
bc.test_configs = [data_config]
bc1 = utils.copy(bc)
bc1.name = "linux"
bc1.nodetype = "linux"
// Iterate over configurations that define the (distributed) build matrix.
// Spawn a host of the given nodetype for each combination and run in parallel.
// Also apply the job configuration defined in `jobconfig` above.
utils.run([bc, bc1, jobconfig])