forked from mit-ll/em-pairing-uncor-importancesampling
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
69 lines (60 loc) · 3.23 KB
/
Jenkinsfile
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
// Copyright 2018 – 2020, MIT Lincoln Laboratory
// SPDX-License-Identifier: X11
pipeline {
agent any
stages {
stage('all') {
// Set system environment variables
// These will be overwritten
environment {
outname = "foo"
// AEM_DIR_CORE = "${env.WORKSPACE}/em-core"
// AEM_DIR_BAYES = "${env.WORKSPACE}/em-model-manned-bayes"
// AEM_DIR_DAAENC = "${env.WORKSPACE}/em-pairing-uncor-importancesampling"
}
steps {
node('master') {
dir('em-core') {
git 'git://llcad-github.llan.ll.mit.edu/airspace-encounter-models-internal/em-core.git'
script {
env.AEM_DIR_CORE = "${env.WORKSPACE}/em-core"
}
sh label: '', script: 'bash ./script/bootstrap.sh'
//sh label: '', script: 'bash ./script/setup.sh'
}
dir('em-model-manned-bayes') {
git 'git://llcad-github.llan.ll.mit.edu/airspace-encounter-models-internal/em-model-manned-bayes.git'
script {
env.AEM_DIR_BAYES = "${env.WORKSPACE}/em-model-manned-bayes"
}
}
dir('em-pairing-uncor-importancesampling') {
git 'git://llcad-github.llan.ll.mit.edu/airspace-encounter-models-internal/em-pairing-uncor-importancesampling'
script {
env.AEM_DIR_DAAENC = "${env.WORKSPACE}/em-pairing-uncor-importancesampling"
}
// debugging
sh 'printenv'
// mex
sh label: '', script: '/opt/matlab/2018a/bin/matlab -nodisplay -r "mex Encounter_Generation_Tool/run_dynamics_fast.c;mex Tests/Code/Helper_Functions/run_dynamics_fast_test.c;exit"'
// This would be a good place to check if a mex file exists
// Test on different versions of matlab
sh label: '', script: '/opt/matlab/2019a/bin/matlab -nodisplay -r "cd Tests/Unit_Tests/;RUN_tests;exit"'
///sh label: '', script: '/opt/matlab/2018b/bin/matlab -nodisplay -r "cd Tests/Unit_Tests/;RUN_tests;exit"'
// Archive Arifacts
// https://stackoverflow.com/q/40597655/363829
archiveArtifacts artifacts: 'Tests/**/*.*', followSymlinks: false
} // dir
} //node
} // steps
} //stage
} //stages
post {
always {
// Clean up workspace
deleteDir()
// https://stackoverflow.com/a/47882245/363829
mail body: "<br>Project: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> Build URL: ${env.BUILD_URL}", charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "JENKINS, Job Name: ${env.JOB_NAME}, Build #: ${env.BUILD_NUMBER}", to: "[email protected],[email protected]", cc: '', bcc: '';
}
}
} //pipeline