Skip to content

Commit a30364b

Browse files
committed
moving copy into script.
1 parent 9d98c46 commit a30364b

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.ci/src/example.jl

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,25 @@ in parallel.
147147
project_dir = joinpath(\"$example_dir\", name)
148148
isdir(project_dir) || continue
149149
150+
build_dir = joinpath(\"$build_dir\", name)
151+
run(`mkdir -p \$build_dir`)
152+
153+
for sub_dir in readdir(project_dir)
154+
abs_path = joinpath(project_dir, sub_dir)
155+
if isdir(abs_path) && sub_dir == "data"
156+
@info "copying \$abs_path to build \$build_dir"
157+
run(`cp -r \$abs_path \$build_dir`)
158+
end
159+
end
160+
150161
Pkg.activate(project_dir)
151162
Pkg.instantiate()
152163
CondaPkg.resolve()
153164
154165
@info "building" project_dir
155166
Literate.$target(
156167
joinpath(project_dir, "main.jl"),
157-
joinpath(\"$build_dir\", name),
168+
build_dir,
158169
;execute=$eval
159170
)
160171
end
@@ -164,12 +175,6 @@ in parallel.
164175
# then we run the build in one process
165176
# so that we can share compile results
166177
foreach_example() do path
167-
example_dir = splitpath(path)[end]
168-
for subdir in readdir(path)
169-
fullpath = joinpath(path, subdir)
170-
tutorial_path =
171-
isdir(fullpath) && subdir == "data" && run(`cp -r $fullpath $(joinpath(build_dir, example_dir))`)
172-
end
173178
return dev(path)
174179
end
175180
return run(`$(Base.julia_exename()) --project=$ci_dir -e $script`)

0 commit comments

Comments
 (0)