2022-12-12 19:29:23 +00:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
label 'linux'
|
|
|
|
dir 'ci'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
environment {
|
|
|
|
GOPATH = '/tmp/go'
|
|
|
|
GOCACHE = '/tmp/'
|
|
|
|
}
|
|
|
|
|
|
|
|
options {
|
|
|
|
disableConcurrentBuilds()
|
|
|
|
buildDiscarder(logRotator(
|
|
|
|
numToKeepStr: '20',
|
|
|
|
daysToKeepStr: '30',
|
|
|
|
))
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Check') {
|
|
|
|
steps {
|
2022-12-13 11:33:51 +00:00
|
|
|
sh 'cargo check --all --all-features'
|
2022-12-12 19:29:23 +00:00
|
|
|
sh 'cargo fmt -- --check'
|
2022-12-13 11:33:51 +00:00
|
|
|
sh 'cargo clippy --all --all-features -- --deny warnings'
|
2022-12-12 19:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Build') {
|
|
|
|
steps {
|
2023-01-19 14:34:35 +00:00
|
|
|
sh 'cargo build'
|
2022-12-12 19:29:23 +00:00
|
|
|
sh 'cargo build --all --all-features'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Test') {
|
|
|
|
steps {
|
|
|
|
sh 'cargo test --all --all-features'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
cleanup { cleanWs() }
|
|
|
|
}
|
|
|
|
}
|