2022-05-18 00:28:26 +08:00
pipeline {
2022-05-19 20:00:31 +08:00
agent any
2022-05-20 16:02:25 +08:00
options {
timeout(time:30, unit: 'MINUTES')
}
2022-05-18 00:28:26 +08:00
environment {
PJ_NAME = 'fastNLP'
2022-05-19 20:00:31 +08:00
POST_URL = 'https://open.feishu.cn/open-apis/bot/v2/hook/2f7122e3-3459-43d2-a9e4-ddd77bfc4282'
2022-05-18 00:28:26 +08:00
}
stages {
stage('Parallel Stages') {
parallel {
stage('Test Other'){
agent {
docker {
image 'fnlp:other'
args '-u root:root -v ${JENKINS_HOME}/html/docs:/docs -v ${JENKINS_HOME}/html/_ci:/ci'
}
}
steps {
2022-09-27 15:22:57 +08:00
sh 'pytest ./tests --durations=0 --html=other.html --self-contained-html -m "not (torch or paddle or paddledist or jittor or oneflow or deepspeed or oneflowdist or torchpaddle or torchjittor or torchoneflow)"'
2022-05-18 00:28:26 +08:00
}
2022-05-19 21:34:46 +08:00
post {
always {
sh 'html_path=/ci/${PJ_NAME}/report-${BUILD_NUMBER}-${GIT_BRANCH#*/}-${GIT_COMMIT} && mkdir -p ${html_path} && mv other.html ${html_path}'
}
}
2022-05-18 00:28:26 +08:00
}
stage('Test Torch-1.11') {
agent {
docker {
image 'fnlp:torch-1.11'
2022-05-18 18:03:18 +08:00
args '-u root:root -v ${JENKINS_HOME}/html/docs:/docs -v ${JENKINS_HOME}/html/_ci:/ci --gpus all --shm-size 1G'
2022-05-18 00:28:26 +08:00
}
}
steps {
2022-05-19 21:34:46 +08:00
sh 'pytest ./tests/ --durations=0 --html=torch-1.11.html --self-contained-html -m torch'
}
post {
always {
sh 'html_path=/ci/${PJ_NAME}/report-${BUILD_NUMBER}-${GIT_BRANCH#*/}-${GIT_COMMIT} && mkdir -p ${html_path} && mv torch-1.11.html ${html_path}'
}
2022-05-18 00:28:26 +08:00
}
}
stage('Test Torch-1.6') {
agent {
docker {
image 'fnlp:torch-1.6'
2022-09-28 13:47:26 +08:00
args '-u root:root -v ${JENKINS_HOME}/html/docs:/docs -v ${JENKINS_HOME}/html/_ci:/ci --gpus all --shm-size 1G'
2022-05-18 00:28:26 +08:00
}
}
steps {
2022-05-19 20:00:31 +08:00
sh 'pytest ./tests/ --durations=0 --html=torch-1.6.html --self-contained-html -m torch'
2022-05-18 00:28:26 +08:00
}
2022-05-19 21:34:46 +08:00
post {
always {
sh 'html_path=/ci/${PJ_NAME}/report-${BUILD_NUMBER}-${GIT_BRANCH#*/}-${GIT_COMMIT} && mkdir -p ${html_path} && mv torch-1.6.html ${html_path}'
}
}
2022-05-18 00:28:26 +08:00
}
stage('Test Paddle') {
agent {
docker {
image 'fnlp:paddle'
2022-09-28 13:47:26 +08:00
args '-u root:root -v ${JENKINS_HOME}/html/docs:/docs -v ${JENKINS_HOME}/html/_ci:/ci --gpus all --shm-size 1G'
2022-05-18 00:28:26 +08:00
}
}
steps {
2022-05-19 20:00:31 +08:00
sh 'pytest ./tests --durations=0 --html=paddle.html --self-contained-html -m paddle --co'
sh 'FASTNLP_BACKEND=paddle pytest ./tests --durations=0 --html=paddle_with_backend.html --self-contained-html -m paddle --co'
sh 'FASTNLP_BACKEND=paddle pytest ./tests/core/drivers/paddle_driver/test_dist_utils.py --durations=0 --html=paddle_dist_utils.html --self-contained-html --co'
sh 'FASTNLP_BACKEND=paddle pytest ./tests/core/drivers/paddle_driver/test_fleet.py --durations=0 --html=paddle_fleet.html --self-contained-html --co'
sh 'FASTNLP_BACKEND=paddle pytest ./tests/core/controllers/test_trainer_paddle.py --durations=0 --html=paddle_trainer.html --self-contained-html --co'
2022-05-18 00:28:26 +08:00
}
2022-05-19 21:34:46 +08:00
post {
always {
sh 'html_path=/ci/${PJ_NAME}/report-${BUILD_NUMBER}-${GIT_BRANCH#*/}-${GIT_COMMIT} && mkdir -p ${html_path} && mv paddle*.html ${html_path}'
}
}
2022-05-18 00:28:26 +08:00
}
2022-05-18 18:03:18 +08:00
// stage('Test Jittor') {
// agent {
// docker {
// image 'fnlp:jittor'
2022-09-28 13:47:26 +08:00
// args '-u root:root -v ${JENKINS_HOME}/html/docs:/docs -v ${JENKINS_HOME}/html/_ci:/ci --gpus all --shm-size 1G'
2022-05-18 18:03:18 +08:00
// }
// }
// steps {
// // sh 'pip install fitlog'
// // sh 'pytest ./tests --html=test_results.html --self-contained-html'
2022-05-19 20:00:31 +08:00
// sh 'pytest ./tests --durations=0 --html=jittor.html --self-contained-html -m jittor --co'
2022-05-18 18:03:18 +08:00
// }
// }
2022-05-18 00:28:26 +08:00
}
}
}
post {
failure {
sh 'post 1'
}
success {
sh 'post 0'
2022-05-19 20:00:31 +08:00
// sh 'post github'
2022-05-18 00:28:26 +08:00
}
}
}