Skip to content

Commit

Permalink
Merge pull request #60 from ProofOfConceptForJuliSmoothOptimizers/tes…
Browse files Browse the repository at this point in the history
…t-benchmark

Update benchmarks setup for DCISolver.jl
  • Loading branch information
tmigot authored Feb 16, 2022
2 parents ca22626 + 8448e2c commit d45e79f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 233 deletions.
32 changes: 23 additions & 9 deletions Jenkinsfile → benchmark/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def bmarkFile = 'run_benchmarks.jl'
def bmarkFile = 'benchmarks.jl'
def prNumber = BRANCH_NAME.tokenize("PR-")[0]
pipeline {
agent any
Expand Down Expand Up @@ -64,13 +64,16 @@ pipeline {
stages {
stage('clone repo') {
when {
expression { REPO_EXISTS == 'false' }
expression { REPO_EXISTS == 'false' && env.comment }
}
steps {
sh 'git clone https://${GITHUB_AUTH}@github.com/$org/$repo.git'
}
}
stage('checkout on new branch') {
when {
expression { env.comment }
}
steps {
dir(WORKSPACE + "/$repo") {
sh '''
Expand All @@ -84,9 +87,26 @@ pipeline {
git checkout $LOCAL_BRANCH_NAME --
'''
}
sh "git clone https://github.com/ProofOfConceptForJuliSmoothOptimizers/BenchmarkSetup.git || true"
}
}
stage('setup benchmark repository') {
when {
expression { env.comment }
}
steps {
dir(WORKSPACE + "/BenchmarkSetup") {
sh '''
git fetch origin
git pull --ff-only origin master
'''
}
}
}
stage('run benchmarks') {
when {
expression { env.comment }
}
steps {
script {
def data = env.comment.tokenize(' ')
Expand All @@ -96,7 +116,7 @@ pipeline {
}
dir(WORKSPACE + "/$repo") {
sh "mkdir -p $HOME/benchmarks/${org}/${repo}"
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"
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}"
}
}
}
Expand All @@ -106,13 +126,7 @@ pipeline {
echo "SUCCESS!"
}
cleanup {
dir(WORKSPACE + "/$repo") {
sh 'printenv'
sh '''
git clean -fd
git checkout main
'''
}
}
}
}
81 changes: 0 additions & 81 deletions benchmark/run_benchmarks.jl

This file was deleted.

127 changes: 0 additions & 127 deletions benchmark/send_comment_to_pr.jl

This file was deleted.

16 changes: 0 additions & 16 deletions push_benchmarks.sh

This file was deleted.

0 comments on commit d45e79f

Please sign in to comment.