-
-
Notifications
You must be signed in to change notification settings - Fork 205
/
Jenkinsfile
101 lines (99 loc) · 4.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
pipeline {
agent {
label 'docker'
}
stages {
stage ('Docker') {
agent {
dockerfile {
args '-e HOME=/tmp -e BUILD_CONTEXT=ci'
additionalBuildArgs '--target build-tests'
reuseNode true
}
}
stages {
stage ('Create venvs') {
parallel{
stage ('Python 3.11') {
steps {
sh 'python3.11 -m venv venv-3.11 && VENV_DIR=venv3.11 scripts/activate-venv.sh'
}
}
stage ('Python 3.10') {
steps {
sh 'python3.10 -m venv venv-3.10 && VENV_DIR=venv3.10 scripts/activate-venv.sh'
}
}
stage ('Python 3.9') {
steps {
sh 'python3.9 -m venv venv-3.9 && VENV_DIR=venv3.9 scripts/activate-venv.sh'
}
}
stage ('Python 3.8') {
steps {
sh 'python3.8 -m venv venv-3.8 && VENV_DIR=venv3.8 scripts/activate-venv.sh'
}
}
stage ('Python 3.7') {
steps {
sh 'python3.7 -m venv venv-3.7 && VENV_DIR=venv3.7 scripts/activate-venv.sh'
}
}
}
}
stage('Testing'){
parallel{
stage ('Python 3.11') {
steps {
sh '''
VENV_DIR=venv-3.11 scripts/with-venv.sh scripts/check-python-version.sh 3.11
VENV_DIR=venv-3.11 COVERAGE_SUFFIX=3.11 scripts/with-venv.sh scripts/runtests.sh
'''
}
}
stage ('Python 3.10') {
steps {
sh '''
VENV_DIR=venv-3.10 scripts/with-venv.sh scripts/check-python-version.sh 3.10
VENV_DIR=venv-3.10 COVERAGE_SUFFIX=3.10 scripts/with-venv.sh scripts/runtests.sh
'''
}
}
stage ('Python 3.9') {
steps {
sh '''
VENV_DIR=venv-3.9 scripts/with-venv.sh scripts/check-python-version.sh 3.9
VENV_DIR=venv-3.9 COVERAGE_SUFFIX=3.9 scripts/with-venv.sh scripts/runtests.sh
'''
}
}
stage ('Python 3.8') {
steps {
sh '''
VENV_DIR=venv-3.8 scripts/with-venv.sh scripts/check-python-version.sh 3.8
VENV_DIR=venv-3.8 COVERAGE_SUFFIX=3.8 scripts/with-venv.sh scripts/runtests.sh
'''
}
}
stage ('Python 3.7') {
steps {
sh '''
VENV_DIR=venv-3.7 scripts/with-venv.sh scripts/check-python-version.sh 3.7
VENV_DIR=venv-3.7 COVERAGE_SUFFIX=3.7 scripts/with-venv.sh scripts/runtests.sh
'''
}
}
}
}
stage("Doc"){
steps {
sh '''
VENV_DIR=venv-3.11 scripts/with-venv.sh pip3 install -r doc/requirements.txt
VENV_DIR=venv-3.11 scripts/with-venv.sh make -C doc html
'''
}
}
}
}
}
}