Skip to content

Commit ee54dd6

Browse files
authored
Compare against the merge-base if no vs is specified (#134)
1 parent 99d8767 commit ee54dd6

File tree

6 files changed

+105
-72
lines changed

6 files changed

+105
-72
lines changed

Manifest.toml

+84-49
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
julia_version = "1.8.2"
44
manifest_format = "2.0"
5-
project_hash = "316906d3151e20225dad1f935a43799720e8a1e3"
5+
project_hash = "941a3b59a922a314802c93c19b7b076f4db2f658"
66

77
[[deps.AWS]]
88
deps = ["Base64", "Compat", "Dates", "Downloads", "GitHub", "HTTP", "IniFile", "JSON", "MbedTLS", "Mocking", "OrderedCollections", "Random", "Sockets", "URIs", "UUIDs", "XMLDict"]
9-
git-tree-sha1 = "378e85b1354746ea613f4a3f388d105168cc4248"
9+
git-tree-sha1 = "93f3cffcb1fd90548b13cf21a28a898e1ca8c58f"
1010
uuid = "fbe9abb3-538b-5e4e-ba9e-bc94f4f92ebc"
11-
version = "1.75.1"
11+
version = "1.79.0"
1212

1313
[[deps.ArgTools]]
1414
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
@@ -28,9 +28,14 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
2828

2929
[[deps.BenchmarkTools]]
3030
deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"]
31-
git-tree-sha1 = "4c10eee4af024676200bc7752e536f858c6b8f93"
31+
git-tree-sha1 = "d9a9701b899b30332bbcb3e1679c41cce81fb0e8"
3232
uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
33-
version = "1.3.1"
33+
version = "1.3.2"
34+
35+
[[deps.BitFlags]]
36+
git-tree-sha1 = "43b1a4a8f797c1cddadf60499a8a077d4af2cd2d"
37+
uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35"
38+
version = "0.1.7"
3439

3540
[[deps.CEnum]]
3641
git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90"
@@ -39,9 +44,15 @@ version = "0.4.2"
3944

4045
[[deps.CategoricalArrays]]
4146
deps = ["DataAPI", "Future", "Missings", "Printf", "Requires", "Statistics", "Unicode"]
42-
git-tree-sha1 = "5f5a975d996026a8dd877c35fe26a7b8179c02ba"
47+
git-tree-sha1 = "5084cc1a28976dd1642c9f337b28a3cb03e0f7d2"
4348
uuid = "324d7699-5711-5eae-9e2f-1d82baa6b597"
44-
version = "0.10.6"
49+
version = "0.10.7"
50+
51+
[[deps.CodecZlib]]
52+
deps = ["TranscodingStreams", "Zlib_jll"]
53+
git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da"
54+
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
55+
version = "0.7.0"
4556

4657
[[deps.CodecZstd]]
4758
deps = ["CEnum", "TranscodingStreams", "Zstd_jll"]
@@ -51,15 +62,15 @@ version = "0.7.2"
5162

5263
[[deps.CommonMark]]
5364
deps = ["Crayons", "JSON", "URIs"]
54-
git-tree-sha1 = "4cd7063c9bdebdbd55ede1af70f3c2f48fab4215"
65+
git-tree-sha1 = "86cce6fd164c26bad346cc51ca736e692c9f553c"
5566
uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6"
56-
version = "0.8.6"
67+
version = "0.8.7"
5768

5869
[[deps.Compat]]
59-
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
60-
git-tree-sha1 = "9be8be1d8a6f44b96482c8af52238ea7987da3e3"
70+
deps = ["Dates", "LinearAlgebra", "UUIDs"]
71+
git-tree-sha1 = "aaabba4ce1b7f8a9b34c015053d3b1edf60fa49c"
6172
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
62-
version = "3.45.0"
73+
version = "4.4.0"
6374

6475
[[deps.CompilerSupportLibraries_jll]]
6576
deps = ["Artifacts", "Libdl"]
@@ -72,15 +83,15 @@ uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
7283
version = "4.1.1"
7384

7485
[[deps.DataAPI]]
75-
git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40"
86+
git-tree-sha1 = "e08915633fcb3ea83bf9d6126292e5bc5c739922"
7687
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
77-
version = "1.10.0"
88+
version = "1.13.0"
7889

7990
[[deps.DataFrames]]
80-
deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
81-
git-tree-sha1 = "daa21eb85147f72e41f6352a57fccea377e310a9"
91+
deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Random", "Reexport", "SnoopPrecompile", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
92+
git-tree-sha1 = "0f44494fe4271cc966ac4fea524111bef63ba86c"
8293
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
83-
version = "1.3.4"
94+
version = "1.4.3"
8495

8596
[[deps.DataStructures]]
8697
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
@@ -97,10 +108,6 @@ version = "1.0.0"
97108
deps = ["Printf"]
98109
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
99110

100-
[[deps.DelimitedFiles]]
101-
deps = ["Mmap"]
102-
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"
103-
104111
[[deps.Distributed]]
105112
deps = ["Random", "Serialization", "Sockets"]
106113
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
@@ -166,9 +173,9 @@ version = "1.2.1"
166173

167174
[[deps.GitHub]]
168175
deps = ["Base64", "Dates", "HTTP", "JSON", "MbedTLS", "Sockets", "SodiumSeal", "URIs"]
169-
git-tree-sha1 = "f1d3170f588c7610b568c9a97971915100dd51e8"
176+
git-tree-sha1 = "08ee34cdc529bd4e631f661595c2eb695515bdbc"
170177
uuid = "bc5e4493-9b4d-5f90-b8aa-2b2bcaad7a26"
171-
version = "5.7.3"
178+
version = "5.8.1"
172179

173180
[[deps.Git_jll]]
174181
deps = ["Artifacts", "Expat_jll", "Gettext_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Pkg", "Zlib_jll"]
@@ -177,10 +184,10 @@ uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb"
177184
version = "2.34.1+0"
178185

179186
[[deps.HTTP]]
180-
deps = ["Base64", "Dates", "IniFile", "Logging", "MbedTLS", "NetworkOptions", "Sockets", "URIs"]
181-
git-tree-sha1 = "0fa77022fe4b511826b39c894c90daf5fce3334a"
187+
deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"]
188+
git-tree-sha1 = "e1acc37ed078d99a714ed8376446f92a5535ca65"
182189
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
183-
version = "0.9.17"
190+
version = "1.5.5"
184191

185192
[[deps.IniFile]]
186193
git-tree-sha1 = "f550e6e32074c939295eb5ea6de31849ac2c9625"
@@ -218,6 +225,11 @@ git-tree-sha1 = "3c837543ddb02250ef42f4738347454f95079d4e"
218225
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
219226
version = "0.21.3"
220227

228+
[[deps.LaTeXStrings]]
229+
git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996"
230+
uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
231+
version = "1.3.0"
232+
221233
[[deps.LazyArtifacts]]
222234
deps = ["Artifacts", "Pkg"]
223235
uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
@@ -257,15 +269,21 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
257269
[[deps.Logging]]
258270
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
259271

272+
[[deps.LoggingExtras]]
273+
deps = ["Dates", "Logging"]
274+
git-tree-sha1 = "cedb76b37bc5a6c702ade66be44f831fa23c681e"
275+
uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36"
276+
version = "1.0.0"
277+
260278
[[deps.Markdown]]
261279
deps = ["Base64"]
262280
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
263281

264282
[[deps.MbedTLS]]
265283
deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "Random", "Sockets"]
266-
git-tree-sha1 = "14cb991ee7ccc6dabda93d310400575c3cae435b"
284+
git-tree-sha1 = "03a9b9718f5682ecb107ac9f7308991db4ce395b"
267285
uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
268-
version = "1.1.2"
286+
version = "1.1.7"
269287

270288
[[deps.MbedTLS_jll]]
271289
deps = ["Artifacts", "Libdl"]
@@ -283,9 +301,9 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804"
283301

284302
[[deps.Mocking]]
285303
deps = ["Compat", "ExprTools"]
286-
git-tree-sha1 = "29714d0a7a8083bba8427a4fbfb00a540c681ce7"
304+
git-tree-sha1 = "c272302b22479a24d1cf48c114ad702933414f80"
287305
uuid = "78c3b35d-d492-501b-9361-3d52fe80e533"
288-
version = "0.7.3"
306+
version = "0.7.5"
289307

290308
[[deps.MozillaCACerts_jll]]
291309
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
@@ -300,11 +318,17 @@ deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
300318
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
301319
version = "0.3.20+0"
302320

321+
[[deps.OpenSSL]]
322+
deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"]
323+
git-tree-sha1 = "df6830e37943c7aaa10023471ca47fb3065cc3c4"
324+
uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c"
325+
version = "1.3.2"
326+
303327
[[deps.OpenSSL_jll]]
304328
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
305-
git-tree-sha1 = "e60321e3f2616584ff98f0a4f18d98ae6f89bbb3"
329+
git-tree-sha1 = "f6e9dba33f9f2c44e08a020b0caf6903be540004"
306330
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
307-
version = "1.1.17+0"
331+
version = "1.1.19+0"
308332

309333
[[deps.OrderedCollections]]
310334
git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
@@ -323,10 +347,10 @@ uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a"
323347
version = "0.12.3"
324348

325349
[[deps.Parsers]]
326-
deps = ["Dates"]
327-
git-tree-sha1 = "0044b23da09b5608b4ecacb4e5e6c6332f833a7e"
350+
deps = ["Dates", "SnoopPrecompile"]
351+
git-tree-sha1 = "b64719e8b4504983c7fca6cc9db3ebc8acc2a4d6"
328352
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
329-
version = "2.3.2"
353+
version = "2.5.1"
330354

331355
[[deps.Pidfile]]
332356
deps = ["FileWatching", "Test"]
@@ -360,10 +384,10 @@ uuid = "21216c6a-2e73-6563-6e65-726566657250"
360384
version = "1.3.0"
361385

362386
[[deps.PrettyTables]]
363-
deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"]
364-
git-tree-sha1 = "dfb54c4e414caa595a1f2ed759b160f5a3ddcba5"
387+
deps = ["Crayons", "Formatting", "LaTeXStrings", "Markdown", "Reexport", "StringManipulation", "Tables"]
388+
git-tree-sha1 = "d8ed354439950b34ab04ff8f3dfd49e11bc6c94b"
365389
uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
366-
version = "1.3.1"
390+
version = "2.2.1"
367391

368392
[[deps.Printf]]
369393
deps = ["Unicode"]
@@ -417,9 +441,15 @@ version = "1.1.1"
417441
[[deps.Serialization]]
418442
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
419443

420-
[[deps.SharedArrays]]
421-
deps = ["Distributed", "Mmap", "Random", "Serialization"]
422-
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
444+
[[deps.SimpleBufferStream]]
445+
git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1"
446+
uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7"
447+
version = "1.1.0"
448+
449+
[[deps.SnoopPrecompile]]
450+
git-tree-sha1 = "f604441450a3c0569830946e5b33b78c928e1a85"
451+
uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c"
452+
version = "1.0.1"
423453

424454
[[deps.Sockets]]
425455
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
@@ -432,9 +462,9 @@ version = "0.1.1"
432462

433463
[[deps.SortingAlgorithms]]
434464
deps = ["DataStructures"]
435-
git-tree-sha1 = "b3363d7460f7d098ca0912c69b082f75625d7508"
465+
git-tree-sha1 = "a4ada03f999bd01b3a25dcaa30b2d929fe537e00"
436466
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
437-
version = "1.0.1"
467+
version = "1.1.0"
438468

439469
[[deps.SparseArrays]]
440470
deps = ["LinearAlgebra", "Random"]
@@ -444,6 +474,11 @@ uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
444474
deps = ["LinearAlgebra", "SparseArrays"]
445475
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
446476

477+
[[deps.StringManipulation]]
478+
git-tree-sha1 = "46da2434b41f41ac3594ee9816ce5541c6096123"
479+
uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e"
480+
version = "0.3.0"
481+
447482
[[deps.TOML]]
448483
deps = ["Dates"]
449484
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
@@ -457,9 +492,9 @@ version = "1.0.1"
457492

458493
[[deps.Tables]]
459494
deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"]
460-
git-tree-sha1 = "5ce79ce186cc678bbb5c5681ca3379d1ddae11a1"
495+
git-tree-sha1 = "c79322d36826aa2f4fd8ecfa96ddb47b174ac78d"
461496
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
462-
version = "1.7.0"
497+
version = "1.10.0"
463498

464499
[[deps.Tar]]
465500
deps = ["ArgTools", "SHA"]
@@ -483,9 +518,9 @@ uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
483518
version = "0.9.9"
484519

485520
[[deps.URIs]]
486-
git-tree-sha1 = "e59ecc5a41b000fa94423a578d29290c7266fc10"
521+
git-tree-sha1 = "ac00576f90d8a259f2c9d823e91d1de3fd44d348"
487522
uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
488-
version = "1.4.0"
523+
version = "1.4.1"
489524

490525
[[deps.UUIDs]]
491526
deps = ["Random", "SHA"]
@@ -501,9 +536,9 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
501536

502537
[[deps.UserNSSandbox_jll]]
503538
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
504-
git-tree-sha1 = "651b582371b815cdd193df12806463550f60666b"
539+
git-tree-sha1 = "b725bb7f5bbe7623b569b9dc224cf8c0589abec8"
505540
uuid = "b88861f7-1d72-59dd-91e7-a8cc876a4984"
506-
version = "2022.8.1+1"
541+
version = "2022.10.3+0"
507542

508543
[[deps.XML2_jll]]
509544
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"]

Project.toml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Tar = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
2626

2727
[compat]
2828
PkgEval = "0.2"
29+
GitHub = "5.8"
2930
julia = "1.6"
3031

3132
[extras]

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ Backticks are mandatory. There are two kinds of jobs you can invoke: **benchmark
2121
One of the most common invocations runs all benchmarks on your PR, comparing against the current Julia master branch:
2222

2323
```
24-
@nanosoldier `runbenchmarks(ALL, vs=":master")`
24+
@nanosoldier `runbenchmarks(ALL)`
2525
```
2626

2727
Similarly, you can run all package tests, e.g. if you suspect your PR might be breaking:
2828

2929
```
30-
@nanosoldier `runtests(ALL, vs = ":master")`
30+
@nanosoldier `runtests(ALL)`
3131
```
3232

3333
Both operations take a long time, so it might be wise to restrict which benchmarks you want to run, or which packages you want to test:
3434

3535
```
36-
@nanosoldier `runbenchmarks("linalg", vs = ":master")`
36+
@nanosoldier `runbenchmarks("linalg"")`
3737
38-
@nanosoldier `runtests(["JSON", "Crayons"], vs = ":master")`
38+
@nanosoldier `runtests(["JSON", "Crayons"])`
3939
```
4040

4141
When a job is completed, @nanosoldier will reply to your comment to tell you how the job went and link you to any relevant results.
@@ -64,7 +64,7 @@ A `BenchmarkJob` is triggered with the following syntax:
6464
@nanosoldier `runbenchmarks(tag_predicate, vs = "ref")`
6565
```
6666

67-
The `vs` keyword argument is optional, and is used to determine whether or not the comparison step (step 3 above) is performed.
67+
The `vs` keyword argument is optional; if invoked from a pull request, it will be derived automatically from the merge base. In other cases, the comparison step (step 3 above) will be skipped.
6868

6969
The tag predicate is used to decide which benchmarks to run, and supports the syntax defined by the [tagging system](https://github.com/JuliaCI/BenchmarkTools.jl/blob/master/doc/manual.md#indexing-into-a-benchmarkgroup-using-tagged) implemented in the [BenchmarkTools](https://github.com/JuliaCI/BenchmarkTools.jl) package. Additionally, you can run all benchmarks by using the keyword `ALL`, e.g. `runbenchmarks(ALL)`.
7070

@@ -154,7 +154,7 @@ A `PkgEvalJob` is triggered with the following syntax:
154154

155155
The package selection argument is used to decide which packages to test. It should be a list of package names, e.g. `["Example"]`, that will be looked up in the registry. Additionally, you can test all packages in the registry by using the keyword `ALL`, e.g. `runtests(ALL)`.
156156

157-
The `vs` keyword argument is optional, and is used to determine whether or not the comparison step (step 3 above) is performed. Its syntax is identical to the `BenchmarkJob` `vs` keyword argument.
157+
The `vs` keyword argument is again optional. Its syntax and behavior is identical to the `BenchmarkJob` `vs` keyword argument.
158158

159159
Both sides of the comparison can be further configured by using respectively the `configuration` and `vs_configuration` arguments. These options expect a named tuple where the elements correspond to fields of the `PkgEval.Configuration` type.
160160

src/build.jl

+2-17
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,8 @@ function build_julia!(config::Config, build::BuildRef, logpath, prnumber::Union{
6666
end
6767

6868
# clone/fetch the appropriate Julia version
69-
if prnumber !== nothing
70-
# clone from `trackrepo`, not `build.repo`, since that's where the merge commit is
71-
gitclone!(config.trackrepo, srcdir, `-c core.sharedRepository=group --reference $mirrordir --dissociate`; user=config.user)
72-
try
73-
run(sudo(config.user, `$(git()) -C $srcdir fetch --quiet origin +refs/pull/$(prnumber)/merge:`))
74-
catch
75-
# if there's not a merge commit on the remote (likely due to
76-
# merge conflicts) then fetch the head commit instead.
77-
run(sudo(config.user, `$(git()) -C $srcdir fetch --quiet origin +refs/pull/$(prnumber)/head:`))
78-
end
79-
run(sudo(config.user, `$(git()) -C $srcdir checkout --quiet --force FETCH_HEAD`))
80-
build.sha = readchomp(sudo(config.user, `$(git()) -C $srcdir rev-parse HEAD`))
81-
# XXX: update build.time here?
82-
else
83-
gitclone!(build.repo, srcdir, `-c core.sharedRepository=group --reference $mirrordir --dissociate`; user=config.user)
84-
run(sudo(config.user, `$(git()) -C $srcdir checkout --quiet $(build.sha)`))
85-
end
69+
gitclone!(build.repo, srcdir, `-c core.sharedRepository=group --reference $mirrordir --dissociate`; user=config.user)
70+
run(sudo(config.user, `$(git()) -C $srcdir checkout --quiet $(build.sha)`))
8671

8772
# set up logs for STDOUT and STDERR
8873
logname = string(build.sha, "_build")

src/jobs/BenchmarkJob.jl

+6
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ function BenchmarkJob(submission::JobSubmission)
7070
error("invalid argument to `vs` keyword")
7171
end
7272
against = againstbuild
73+
elseif submission.prnumber !== nothing
74+
# if there is a PR number, we compare against the base branch
75+
merge_base = GitHub.compare(submission.config.trackrepo,
76+
"master", "refs/pull/$(submission.prnumber)/head";
77+
auth=config.auth).merge_base_commit
78+
against = commitref(submission.config, submission.config.trackrepo, merge_base.sha)
7379
else
7480
against = nothing
7581
end

0 commit comments

Comments
 (0)