-
Notifications
You must be signed in to change notification settings - Fork 29
/
JenkinsfileRT
74 lines (66 loc) · 2.99 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
62
63
64
65
66
67
68
69
70
71
72
73
74
// 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.
configure_cmd = "cmake . -DCMAKE_INSTALL_PREFIX=./_install"
// 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 = "linux"
bc.name = "release"
// Note: The source tree is placed in the 'clone' subdir by the CI system.
bc.env_vars = ['PATH=/usr/local/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',
'compilers',
'bzip2',
'cfitsio',
'pkg-config',
'astropy',
'cmake']
bc.build_cmds = ["${configure_cmd} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=\$CONDA_PREFIX",
"make",
"make install",
"calacs.e --version",
"calwf3.e --version",
"cs0.e --version"]
bc.test_cmds = ["pip install pytest ci-watson",
"pytest tests --basetemp=tests_output --junitxml results.xml --bigdata --slow -v"]
bc.failedUnstableThresh = 1
bc.failedFailureThresh = 6
// Upload artifacts
bc.test_configs = [data_config]
// MacOS is report-only: short tests, no artifact upload
bc1 = utils.copy(bc)
bc1.name = "quick"
bc1.nodetype = "macos"
bc1.env_vars += ['LDFLAGS=-L/usr/local/opt/libomp/lib -Wl,-rpath,/usr/local/opt/libomp/lib -Wl,-rpath,\$CONDA_PREFIX/lib -Wl,-rpath,/usr/local/lib',
'CFLAGS=-I/usr/local/opt/libomp/include',
'CC=/usr/local/bin/gcc-13',
'CXX=/usr/local/bin/g++-13',
'FC=/usr/local/bin/gfortran-13']
bc1.conda_packages = ['python=3.9',
'bzip2',
'cfitsio',
'pkg-config',
'astropy',
'cmake']
bc1.test_cmds[1] = "pytest tests --basetemp=tests_output --junitxml results.xml -v"
bc1.test_configs = []
// 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([jobconfig, bc, bc1])