Skip to content

Commit

Permalink
Set up typegraphs cache dir as a symlink on CI
Browse files Browse the repository at this point in the history
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 #393
  • Loading branch information
dontlaugh committed Jun 1, 2024
1 parent 7e7664b commit 4f4843f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ steps:
- label: "Build site"
key: build
commands:
- mkdir -p /home/builder/cache
- ./.buildkite/setup-typegraphs-cache.sh
- zef install . --deps-only
- ./bin_files/build-site --without-completion --no-status
- ./bin_files/build-site --no-status EBook
Expand Down
13 changes: 13 additions & 0 deletions .buildkite/setup-typegraphs-cache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
#
set -e

relpath="Website/plugins/typegraph/typegraphs"
abspath="/home/builder/cache/typegraphs"

if [ ! -s $relpath ]; then
rm -rf $relpath
fi

ln -s $abspath $relpath

0 comments on commit 4f4843f

Please sign in to comment.