2022-12-12 19:29:23 +00:00
|
|
|
library 'status-jenkins-lib@v1.6.0'
|
|
|
|
|
|
|
|
pipeline {
|
|
|
|
agent {
|
2023-03-07 19:19:38 +00:00
|
|
|
label 'macos && aarch64'
|
2022-12-12 19:29:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
environment {
|
|
|
|
GOPATH = '/tmp/go'
|
|
|
|
GOCACHE = '/tmp/'
|
|
|
|
}
|
|
|
|
|
|
|
|
options {
|
|
|
|
disableConcurrentBuilds()
|
|
|
|
buildDiscarder(logRotator(
|
|
|
|
numToKeepStr: '20',
|
|
|
|
daysToKeepStr: '30',
|
|
|
|
))
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Check') {
|
|
|
|
steps { script {
|
2022-12-13 11:33:51 +00:00
|
|
|
nix.shell('cargo check --all --all-features')
|
2022-12-12 19:29:23 +00:00
|
|
|
nix.shell('cargo fmt -- --check')
|
2022-12-13 11:33:51 +00:00
|
|
|
nix.shell('cargo clippy --all --all-features -- --deny warnings')
|
2022-12-12 19:29:23 +00:00
|
|
|
} }
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Build') {
|
|
|
|
steps { script {
|
2023-01-19 14:34:35 +00:00
|
|
|
nix.shell('cargo build')
|
2022-12-12 19:29:23 +00:00
|
|
|
nix.shell('cargo build --all --all-features')
|
|
|
|
} }
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Test') {
|
|
|
|
steps { script {
|
|
|
|
nix.shell('cargo test --all --all-features')
|
|
|
|
} }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
cleanup { cleanWs() }
|
|
|
|
}
|
|
|
|
}
|