Skip to content

Commit a8db0fe

Browse files
author
Christopher Doris
committed
rebuild PyCall when in CI
1 parent b861036 commit a8db0fe

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/runtests.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
if get(ENV, "CI", "") != ""
2+
# In CI we need to rebuild PyCall otherwise it fails a precompilation trying to use
3+
# an interpreter that doesn't exist, presumably as a result of cacheing between CI
4+
# runs.
5+
using Pkg
6+
ENV["PYTHON"] = Sys.which("python")
7+
Pkg.build("PyCall")
8+
end
9+
110
using TestItemRunner
211

312
@run_package_tests
@@ -6,7 +15,7 @@ using TestItemRunner
615
using PythonCall: PythonCall
716
using Pkg: Pkg
817
ENV["PYTHON"] = PythonCall.python_executable_path()
9-
@info "Building PyCall..." ENV["PYTHON"]
18+
@info "Building PyCall" python = ENV["PYTHON"]
1019
Pkg.build("PyCall")
1120
using PyCall
1221
end

0 commit comments

Comments
 (0)