Skip to content

Commit

Permalink
Upload compilation failures to Buildkite.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Jun 17, 2024
1 parent 27a52c7 commit 01f246b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/compiler/compilation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ function compile(@nospecialize(job::CompilerJob))
catch err
file = tempname(cleanup=false) * ".ll"
write(file, ir)
if parse(Bool, get(ENV, "BUILDKITE", "false"))
run(`buildkite-agent artifact upload $(file)`)
end
error("""Compilation to AIR failed; see above for details.
If you think this is a bug, please file an issue and attach $(file)""")
end
Expand All @@ -149,6 +152,9 @@ function compile(@nospecialize(job::CompilerJob))
catch err
file = tempname(cleanup=false) * ".air"
write(file, air)
if parse(Bool, get(ENV, "BUILDKITE", "false"))
run(`buildkite-agent artifact upload $(file)`)
end
error("""Compilation to Metal library failed; see below for details.
If you think this is a bug, please file an issue and attach $(file)""")
end
Expand Down Expand Up @@ -176,6 +182,9 @@ end
# XXX: check more accurately? the error domain doesn't help much here
file = tempname(cleanup=false) * ".metallib"
write(file, compiled.image)
if parse(Bool, get(ENV, "BUILDKITE", "false"))
run(`buildkite-agent artifact upload $(file)`)
end
error("""Compilation to native code failed; see below for details.
If you think this is a bug, please file an issue and attach $(file)""")
end
Expand Down

0 comments on commit 01f246b

Please sign in to comment.