Skip to content

Commit 7c6436c

Browse files
committed
Check summary: report all dependencies not just the "build" job.
1 parent fba784b commit 7c6436c

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

src/actions.ml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ open Lwt.Syntax
1212

1313
type coq_job_info =
1414
{ docker_image: string
15-
; build_dependency: string
15+
; dependencies: string list
1616
; compiler: string
1717
; opam_variant: string }
1818

@@ -77,27 +77,33 @@ let send_status_check ~bot_info job_info ~pr_num (gh_owner, gh_repo)
7777
if string_match ~regexp line then Some (Str.matched_group 1 line)
7878
else None ) )
7979
in
80+
let find_all regexps =
81+
List.filter_map trace_lines ~f:(fun line ->
82+
List.find_map regexps ~f:(fun regexp ->
83+
if string_match ~regexp line then Some (Str.matched_group 1 line)
84+
else None ) )
85+
in
8086
find
8187
[ "^Using Docker executor with image \\([^ ]+\\)"
8288
; "options=Options(docker='\\([^']+\\)')" ]
8389
>>= fun docker_image ->
84-
find ["^Downloading artifacts for \\(build:[^ ]+\\)"]
85-
>>= fun build_dependency ->
90+
let dependencies = find_all ["^Downloading artifacts for \\([^ ]+\\)"] in
8691
find ["^COMPILER=\\(.*\\)"]
8792
>>= fun compiler ->
8893
find ["^OPAM_VARIANT=\\(.*\\)"]
8994
>>= fun opam_variant ->
90-
Some {docker_image; build_dependency; compiler; opam_variant}
95+
Some {docker_image; dependencies; compiler; opam_variant}
9196
in
9297
let* summary_tail_prefix =
9398
match coq_job_info with
94-
| Some {docker_image; build_dependency; compiler; opam_variant} ->
99+
| Some {docker_image; dependencies; compiler; opam_variant} ->
95100
let switch_name = compiler ^ opam_variant in
101+
let dependencies = String.concat ~sep:"` `" dependencies in
96102
Lwt.return
97103
(f
98-
"This job ran on the Docker image `%s`, depended on the build job \
99-
`%s` with OCaml `%s`.\n\n"
100-
docker_image build_dependency switch_name )
104+
"This job ran on the Docker image `%s` with OCaml `%s` and depended on jobs \
105+
`%s` .\n\n"
106+
docker_image switch_name dependencies )
101107
| None ->
102108
Lwt.return ""
103109
in

0 commit comments

Comments
 (0)