-
Notifications
You must be signed in to change notification settings - Fork 15
/
JenkinsfileRT_dev
57 lines (56 loc) · 2.8 KB
/
JenkinsfileRT_dev
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
pipeline {
agent { label 'macos' }
environment {
HOME="${WORKSPACE}"
TEST_BIGDATA="https://bytesalad.stsci.edu/artifactory/romanisim"
CRDS_SERVER_URL = "https://roman-crds.stsci.edu"
CRDS_PATH = "${WORKSPACE}/crds_cache"
PYSYN_CDBS="${WORKSPACE}/cdbs"
PATH ="${WORKSPACE}/miniconda3/bin:${PATH}"
TMPDIR="${WORKSPACE}/tmp"
XDG_CACHE_HOME="${WORKSPACE}/tmp/.cache"
}
stages {
stage('Setup') {
steps {
deleteDir()
checkout scm
sh("curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o installer.sh")
sh("bash installer.sh -b -p ${WORKSPACE}/miniconda3")
sh("conda init bash")
sh("conda create -n romanisim python -y")
}
}
stage('Install') {
steps {
sh("""#!/usr/bin/env bash
source $WORKSPACE/miniconda3/etc/profile.d/conda.sh
conda activate romanisim
pip install -e .[test] pytest-xdist
"""
)
}
}
stage('Test') {
steps {
sh("mkdir ${WORKSPACE}/data")
sh("curl -L https://stsci.box.com/shared/static/0ojjfg3cieqdpd18vl1bjnpe63r82dx8.gz -o ${WORKSPACE}/data/webbpsf-data.tar.gz")
sh("tar -xzvf ${WORKSPACE}/data/webbpsf-data.tar.gz -C ${WORKSPACE}/data")
sh("mkdir ${WORKSPACE}/data/galsim-data")
sh("curl -L https://github.com/GalSim-developers/GalSim/raw/releases/2.4/examples/data/real_galaxy_catalog_23.5_example.fits -o ${WORKSPACE}/data/galsim-data/real_galaxy_catalog_23.5_example.fits")
sh("curl -L https://github.com/GalSim-developers/GalSim/raw/releases/2.4/examples/data/real_galaxy_catalog_23.5_example_selection.fits -o ${WORKSPACE}/data/galsim-data/real_galaxy_catalog_23.5_example_selection.fits")
sh("curl -L https://github.com/GalSim-developers/GalSim/raw/releases/2.4/examples/data/real_galaxy_catalog_23.5_example_fits.fits -o ${WORKSPACE}/data/galsim-data/real_galaxy_catalog_23.5_example_fits.fits")
sh("""#!/usr/bin/env bash
source ${WORKSPACE}/miniconda3/etc/profile.d/conda.sh
export WEBBPSF_PATH="${WORKSPACE}/data/webbpsf-data"
export GALSIM_CAT_PATH="${WORKSPACE}/data/galsim-data/real_galaxy_catalog_23.5_example.fits"
conda activate romanisim
pytest romanisim \
--bigdata --slow --basetemp=test_outputs \
-n 0 # -n 8 causes problems with CRDS runs?
"""
)
}
}
}
}