-
Notifications
You must be signed in to change notification settings - Fork 19
/
Jenkinsfile
56 lines (52 loc) · 1.29 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
pipeline {
agent none
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '8', daysToKeepStr: '20'))
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('main') {
agent {
dockerfile {
filename 'ci/docker/cuda10.1/Dockerfile-x86_64'
args '--gpus 1'
}
}
environment {
HOME = "$WORKSPACE/build"
PYBIN = "/opt/python/cp38-cp38/bin"
}
steps {
sh '${PYBIN}/python3 -m venv $HOME'
sh '''#!/bin/bash -ex
source $HOME/bin/activate
LIBRARY_PATH=/io/lib python3 -m pip install -e .
python3 -m pip install --upgrade "numpy<1.22"
python3 -m pip install pytest
python3 -m pytest
'''
sh 'make check'
}
}
}
post {
failure {
emailext subject: '$PROJECT_NAME - Build #$BUILD_NUMBER - $BUILD_STATUS',
body: '''$PROJECT_NAME - Build #$BUILD_NUMBER - $BUILD_STATUS
Check console output at $BUILD_URL to view full results.
Building $BRANCH_NAME for $CAUSE
$JOB_DESCRIPTION
Chages:
$CHANGES
End of build log:
${BUILD_LOG,maxLines=200}
''',
recipientProviders: [
[$class: 'DevelopersRecipientProvider'],
],
replyTo: '$DEFAULT_REPLYTO',
to: '[email protected]'
}
}
}