Raku / doc-website

Tooling to build/run the documentation website
Artistic License 2.0
7 stars 10 forks source link

Set up typegraphs dir as a symlink on CI #395

Open dontlaugh opened 2 months ago

dontlaugh commented 2 months ago

Our goal is to create a persistent cache of svg files between builds.

When a CI agent is first created, the cache will populate the svg files in the build agent's home directory. Subsequent builds should be faster. Refs https://github.com/Raku/doc-website/issues/393

dontlaugh commented 2 months ago

@finanalyst So I'm a little confused why I'm not seeing a speedup here. I've logged into the build environments and I am reasonably certain that the typegraphs directory is symlinked to the right place.

builder@raku-doc-ci-108:~/builds/raku-doc-ci-108/raku/doc-website/Website/plugins/typegraph$ stat typegraphs
  File: typegraphs -> /home/builder/cache/typegraphs
  Size: 30          Blocks: 8          IO Block: 4096   symbolic link
Device: a4h/164d    Inode: 279475      Links: 1
Access: (0777/lrwxrwxrwx)  Uid: ( 2000/ builder)   Gid: ( 2000/ builder)
Access: 2024-06-01 18:52:39.455148285 +0000
Modify: 2024-06-01 18:47:40.597219005 +0000
Change: 2024-06-01 18:47:40.597219005 +0000
 Birth: 2024-06-01 18:47:40.597219005 +0000
builder@raku-doc-ci-108:~/builds/raku-doc-ci-108/raku/doc-website/Website/plugins/typegraph$ ls /home/builder/cache/typegraphs | head
Allomorph.svg
Any.svg
Array.svg
Associative.svg
AST.svg
Attribute.svg
BacktraceFrame.svg
Backtrace.svg
Baggy.svg
BagHash.svg

Any additional things I should try?

finanalyst commented 2 months ago

@dontlaugh Sorry I seem to be catching up and you've tried things. Have you tried running build-website without --no-status? So as not to build all the sources, just run bin_files/build-website --with-only='types.rakudoc Block.rakudoc' -/no-status This will only render the 'types' page and the 'type/Block.rakudoc` source. But it will run all the plugins including typegraph. If no-status is False, then typegraph will generate output if it is re-generating the typegraphs.