Skip to content

Commit adbf280

Browse files
authored
Merge pull request #56 from ProofOfConceptForJuliSmoothOptimizers/benchmark-files
Add up to date benchmark files
2 parents e616ba1 + 08decf2 commit adbf280

4 files changed

Lines changed: 7 additions & 13 deletions

File tree

Jenkinsfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
def bmarkFile = 'run_benchmarks.jl'
2+
def prNumber = BRANCH_NAME.tokenize("PR-")[0]
23
pipeline {
34
agent any
45
environment {
@@ -56,8 +57,8 @@ pipeline {
5657

5758
silentResponse: false,
5859

59-
regexpFilterText: '$comment',
60-
regexpFilterExpression: '@JSOBot runbenchmarks'
60+
regexpFilterText: '$comment $pullrequest',
61+
regexpFilterExpression: '@JSOBot runbenchmarks( .*\\.jl)? ' + prNumber
6162
)
6263
}
6364
stages {

benchmark/run_benchmarks.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
using Pkg
22
bmark_dir = @__DIR__
3-
println(@__DIR__)
4-
Pkg.activate(bmark_dir)
5-
Pkg.instantiate()
63
repo_name = string(split(ARGS[1], ".")[1])
74
bmarkname = lowercase(repo_name)
85

benchmark/send_comment_to_pr.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
using Pkg
2-
Pkg.activate("./benchmark/")
3-
Pkg.instantiate()
4-
51
using ArgParse
62
using Git
73
using GitHub

push_benchmarks.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/bin/bash
22

3-
julia benchmark/send_comment_to_pr.jl -o $org -r $repo -p $pullrequest -c '**Starting benchmarks!**'
3+
julia --project=benchmark benchmark/send_comment_to_pr.jl -o $org -r $repo -p $pullrequest -c '**Starting benchmarks!**'
44

55
LOCAL_BRANCH_NAME="temp_bmark"
66
git checkout $LOCAL_BRANCH_NAME -- || true
77

8-
julia benchmark/$1 $repo
8+
julia --project=benchmark benchmark/$1 $repo
99

1010
if [ "$?" -eq "0" ] ; then
11-
julia benchmark/send_comment_to_pr.jl -o $org -r $repo -p $pullrequest -c "Benchmark results" -g "gist.json"
11+
julia --project=benchmark benchmark/send_comment_to_pr.jl -o $org -r $repo -p $pullrequest -c "Benchmark results" -g "gist.json"
1212
else
1313
ERROR_LOGS="/home/jenkins/benchmarks/$org/$repo/${pullrequest}_${BUILD_NUMBER}_bmark_error.log"
14-
julia benchmark/send_comment_to_pr.jl -o $org -r $repo -p $pullrequest -c "**An error occured while running $1**" -g $ERROR_LOGS
14+
julia --project=benchmark benchmark/send_comment_to_pr.jl -o $org -r $repo -p $pullrequest -c "**An error occured while running $1**" -g $ERROR_LOGS
1515
fi

0 commit comments

Comments
 (0)