aboutsummaryrefslogtreecommitdiff
path: root/JenkinsfileRT
blob: aac2be44feccaaef4f40116940707401ea923fc4 (plain) (blame)
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
// 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-6"
bc.name = "release"
bc.env_vars = ['PATH=./_install/bin:$PATH',
                'OMP_NUM_THREADS=8',
                '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://ssb.stsci.edu/astroconda']
bc.conda_packages = ['python=3.6',
                     'cfitsio',
                     'pkg-config',
                     'pytest',
                     'requests',
                     'astropy',
                     'ci-watson']

bc.build_cmds = [//"pip install git+https://github.com/spacetelescope/ci_watson.git@master",
                  "${configure_cmd} --release-with-symbols",
                  "./waf build",
                  "./waf install",
                  "calacs.e --version"]
//bc.test_cmds = ["pytest tests --basetemp=tests_output --junitxml results.xml --bigdata --slow -v"]
bc.test_cmds = ["pytest tests/acs/test_hrc_single.py --basetemp=tests_output --junitxml results.xml --bigdata --slow -v"]
bc.failedUnstableThresh = 1
bc.failedFailureThresh = 6

// Upload artifacts
bc.test_configs = [data_config]

// 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, jobconfig])