Skip to content

Commit

Permalink
moving copy into script.
Browse files Browse the repository at this point in the history
  • Loading branch information
weinbe58 committed Jan 23, 2024
1 parent 9d98c46 commit a30364b
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .ci/src/example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,25 @@ in parallel.
project_dir = joinpath(\"$example_dir\", name)
isdir(project_dir) || continue
build_dir = joinpath(\"$build_dir\", name)
run(`mkdir -p \$build_dir`)
for sub_dir in readdir(project_dir)
abs_path = joinpath(project_dir, sub_dir)
if isdir(abs_path) && sub_dir == "data"
@info "copying \$abs_path to build \$build_dir"
run(`cp -r \$abs_path \$build_dir`)
end
end
Pkg.activate(project_dir)
Pkg.instantiate()
CondaPkg.resolve()
@info "building" project_dir
Literate.$target(
joinpath(project_dir, "main.jl"),
joinpath(\"$build_dir\", name),
build_dir,
;execute=$eval
)
end
Expand All @@ -164,12 +175,6 @@ in parallel.
# then we run the build in one process
# so that we can share compile results
foreach_example() do path
example_dir = splitpath(path)[end]
for subdir in readdir(path)
fullpath = joinpath(path, subdir)
tutorial_path =
isdir(fullpath) && subdir == "data" && run(`cp -r $fullpath $(joinpath(build_dir, example_dir))`)
end
return dev(path)
end
return run(`$(Base.julia_exename()) --project=$ci_dir -e $script`)
Expand Down

0 comments on commit a30364b

Please sign in to comment.