Skip to content

Commit d45e79f

Browse files
authored
Merge pull request #60 from ProofOfConceptForJuliSmoothOptimizers/test-benchmark
Update benchmarks setup for DCISolver.jl
2 parents ca22626 + 8448e2c commit d45e79f

4 files changed

Lines changed: 23 additions & 233 deletions

File tree

Jenkinsfile renamed to benchmark/Jenkinsfile

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
def bmarkFile = 'run_benchmarks.jl'
1+
def bmarkFile = 'benchmarks.jl'
22
def prNumber = BRANCH_NAME.tokenize("PR-")[0]
33
pipeline {
44
agent any
@@ -64,13 +64,16 @@ pipeline {
6464
stages {
6565
stage('clone repo') {
6666
when {
67-
expression { REPO_EXISTS == 'false' }
67+
expression { REPO_EXISTS == 'false' && env.comment }
6868
}
6969
steps {
7070
sh 'git clone https://${GITHUB_AUTH}@github.com/$org/$repo.git'
7171
}
7272
}
7373
stage('checkout on new branch') {
74+
when {
75+
expression { env.comment }
76+
}
7477
steps {
7578
dir(WORKSPACE + "/$repo") {
7679
sh '''
@@ -84,9 +87,26 @@ pipeline {
8487
git checkout $LOCAL_BRANCH_NAME --
8588
'''
8689
}
90+
sh "git clone https://github.com/ProofOfConceptForJuliSmoothOptimizers/BenchmarkSetup.git || true"
91+
}
92+
}
93+
stage('setup benchmark repository') {
94+
when {
95+
expression { env.comment }
96+
}
97+
steps {
98+
dir(WORKSPACE + "/BenchmarkSetup") {
99+
sh '''
100+
git fetch origin
101+
git pull --ff-only origin master
102+
'''
103+
}
87104
}
88105
}
89106
stage('run benchmarks') {
107+
when {
108+
expression { env.comment }
109+
}
90110
steps {
91111
script {
92112
def data = env.comment.tokenize(' ')
@@ -96,7 +116,7 @@ pipeline {
96116
}
97117
dir(WORKSPACE + "/$repo") {
98118
sh "mkdir -p $HOME/benchmarks/${org}/${repo}"
99-
sh "qsub -N ${repo}_${pullrequest} -V -cwd -o $HOME/benchmarks/${org}/${repo}/${pullrequest}_${BUILD_NUMBER}_bmark_output.log -e $HOME/benchmarks/${org}/${repo}/${pullrequest}_${BUILD_NUMBER}_bmark_error.log push_benchmarks.sh $bmarkFile"
119+
sh "qsub -N ${repo}_${pullrequest} -V -cwd -o $HOME/benchmarks/${org}/${repo}/${pullrequest}_${BUILD_NUMBER}_bmark_output.log -e $HOME/benchmarks/${org}/${repo}/${pullrequest}_${BUILD_NUMBER}_bmark_error.log ../BenchmarkSetup/benchmark/push_benchmarks.sh ${bmarkFile}"
100120
}
101121
}
102122
}
@@ -106,13 +126,7 @@ pipeline {
106126
echo "SUCCESS!"
107127
}
108128
cleanup {
109-
dir(WORKSPACE + "/$repo") {
110129
sh 'printenv'
111-
sh '''
112-
git clean -fd
113-
git checkout main
114-
'''
115-
}
116130
}
117131
}
118132
}

benchmark/run_benchmarks.jl

Lines changed: 0 additions & 81 deletions
This file was deleted.

benchmark/send_comment_to_pr.jl

Lines changed: 0 additions & 127 deletions
This file was deleted.

push_benchmarks.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)