forked from kymatio/kymatio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
74 lines (70 loc) · 1.77 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
70
71
72
73
74
pipeline {
agent none
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '8', daysToKeepStr: '20'))
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('torch') {
agent {
dockerfile {
dir 'tools'
}
}
environment {
HOME = "$WORKSPACE/build"
}
steps {
sh 'python3 -c "import torch; torch.cuda.current_device()"'
sh 'python3 -m venv --system-site-packages --without-pip $HOME'
sh '''#!/bin/bash -ex
source $HOME/bin/activate
python3 setup.py develop
KYMATIO_BACKEND=$STAGE_NAME python3 -m pytest --cov=kymatio
python3 -m coverage xml
bash <(curl -s https://codecov.io/bash) -t 3941b784-370b-4e50-a162-e5018b7c2861 -F jenkins_$STAGE_NAME -s $WORKSPACE
'''
}
}
stage('skcuda') {
agent {
dockerfile {
dir 'tools'
}
}
environment {
HOME = "$WORKSPACE/build"
}
steps {
sh 'python3 -m venv --system-site-packages --without-pip $HOME'
sh '''#!/bin/bash -ex
source $HOME/bin/activate
python3 setup.py develop
KYMATIO_BACKEND=$STAGE_NAME python3 -m pytest --cov=kymatio
python3 -m coverage xml
bash <(curl -s https://codecov.io/bash) -t 3941b784-370b-4e50-a162-e5018b7c2861 -F jenkins_$STAGE_NAME -s $WORKSPACE
'''
}
}
}
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]'
}
}
}