nomos-node/ci/Jenkinsfile.prs.linux

67 lines
1.4 KiB
Plaintext

pipeline {
agent {
dockerfile {
label 'linux'
dir 'ci'
}
}
environment {
/* Avoid cache poisoning by other jobs. */
GOCACHE = "${env.WORKSPACE_TMP}/go-build"
GOPATH = "${env.WORKSPACE_TMP}/go"
}
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(
numToKeepStr: '20',
daysToKeepStr: '30',
))
}
stages {
stage('BuildAndTest') {
matrix {
axes {
axis {
name 'FEATURES'
values 'libp2p'
}
}
stages {
stage('Check') {
steps {
sh "cargo check --all --no-default-features --features ${FEATURES}"
sh "cargo fmt -- --check"
sh "cargo clippy --all --no-default-features --features ${FEATURES} -- --deny warnings"
}
}
stage('BuildAndTest') {
options {
lock('sync-linux-${env.GIT_COMMIT}')
}
stages {
stage('Build') {
steps {
sh "cargo build --all --no-default-features --features ${FEATURES}"
}
}
stage('Test') {
steps {
sh "cargo test --all --no-default-features --features ${FEATURES}"
}
}
}
}
}
}
}
}
post {
cleanup { cleanWs() }
}
}