1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00

make circle stricter, remove jenkins

This commit is contained in:
schaeff 2018-11-22 23:31:07 +01:00
parent a70e225a62
commit c5ddb60648
2 changed files with 3 additions and 121 deletions

View file

@ -23,13 +23,13 @@ jobs:
command: LIBSNARK_SOURCE_PATH=$HOME/libsnark ./build_libsnark.sh
- run:
name: Build
command: WITH_LIBSNARK=1 LIBSNARK_SOURCE_PATH=$HOME/libsnark ./build.sh
command: LIBSNARK_SOURCE_PATH=$HOME/libsnark RUSTFLAGS="-D warnings" ./build.sh
- run:
name: Run tests
command: LIBSNARK_SOURCE_PATH=$HOME/libsnark cargo test --release
command: LIBSNARK_SOURCE_PATH=$HOME/libsnark RUSTFLAGS="-D warnings" cargo test --release
- run:
name: Run integration tests
command: LIBSNARK_SOURCE_PATH=$HOME/libsnark cargo test --release -- --ignored
command: LIBSNARK_SOURCE_PATH=$HOME/libsnark RUSTFLAGS="-D warnings" cargo test --release -- --ignored
- save_cache:
paths:
- /usr/local/cargo/registry

118
Jenkinsfile vendored
View file

@ -1,118 +0,0 @@
#!/usr/bin/env groovy
def majorVersion
def minorVersion
def patchVersion
def testImage
def prodImage
pipeline {
agent any
options {
skipStagesAfterUnstable()
timeout(time: 2, unit: 'HOURS')
timestamps()
buildDiscarder(logRotator(numToKeepStr: '10', artifactNumToKeepStr: '10'))
}
stages {
stage('Init') {
steps {
script {
def gitCommitHash = sh(returnStdout: true, script: 'git rev-parse HEAD').trim().take(7)
currentBuild.displayName = "#${BUILD_ID}-${gitCommitHash}"
patchVersion = sh(returnStdout: true, script: 'cat zokrates_cli/Cargo.toml | grep version | awk \'{print $3}\' | sed -e \'s/"//g\'').trim()
echo "ZoKrates patch version: ${patchVersion}"
def (major, minor, patch) = patchVersion.tokenize( '.' )
minorVersion = "${major}.${minor}"
majorVersion = major
echo "ZoKrates minor version: ${minorVersion}"
echo "ZoKrates major version: ${majorVersion}"
}
}
}
stage('Format') {
agent {
docker {
image 'rustlang/rust:nightly'
}
}
steps {
script {
sh "rustup component add rustfmt-preview"
sh "cargo fmt --all -- --check"
}
}
}
stage('Build') {
steps {
script {
ansiColor('xterm') {
def testDockerfile = 'dev.Dockerfile'
testImage = docker.build("zokrates/dev", "-f ${testDockerfile} .")
testImage.inside {
sh 'RUSTFLAGS="-D warnings" ./build.sh'
}
}
}
}
}
stage('Test') {
steps {
script {
ansiColor('xterm') {
testImage.inside {
sh 'RUSTFLAGS="-D warnings" ./test.sh'
}
}
}
}
}
stage('Integration Test') {
when {
expression { env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'develop' }
}
steps {
script {
ansiColor('xterm') {
testImage.inside {
sh 'RUSTFLAGS="-D warnings" ./full_test.sh'
}
}
}
}
}
stage('Docker Build & Push') {
when {
expression { env.BRANCH_NAME == 'master' }
}
steps {
script {
ansiColor('xterm') {
// prodImage = docker.build("zokrates/zokrates")
// docker.withRegistry('https://registry.hub.docker.com', 'dockerhub-kyroy') {
// prodImage.push(patchVersion)
// prodImage.push(minorVersion)
// if (majorVersion > '0') {
// prodImage.push(majorVersion)
// }
// prodImage.push("latest")
// }
}
}
}
}
}
post {
always {
// junit allowEmptyResults: true, testResults: '*test.xml'
deleteDir()
}
changed {
notifyStatusChange notificationRecipients: 'mail@kyroy.com', componentName: 'ZoKrates'
}
}
}