Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
feat: cache Rust functions directory
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoboucas committed Aug 10, 2021
1 parent 3104dcb commit 2b20b1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions run-build-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ mkdir -p $NETLIFY_CACHE_DIR/.bundle
mkdir -p $NETLIFY_CACHE_DIR/bower_components
mkdir -p $NETLIFY_CACHE_DIR/.venv
mkdir -p $NETLIFY_CACHE_DIR/.build
# .netlify/ needs to exist because we may try to copy the Rust functions cache
# to .netlify/rust-functions-cache
mkdir -p $NETLIFY_CACHE_DIR/.netlify
mkdir -p $NETLIFY_CACHE_DIR/.netlify/plugins

# HOME caches
Expand Down Expand Up @@ -681,6 +684,7 @@ install_dependencies() {
restore_cwd_cache "target" "rust compile output"
source $HOME/.cargo/env
fi
restore_cwd_cache ".netlify/rust-functions-cache" "Rust functions"
}

#
Expand All @@ -697,6 +701,7 @@ cache_artifacts() {
cache_cwd_directory ".venv" "python virtualenv"
cache_cwd_directory ".build" "swift build"
cache_cwd_directory ".netlify/plugins" "build plugins"
cache_cwd_directory ".netlify/rust-functions-cache" "Rust functions"

if [ -f Cargo.toml ] || [ -f Cargo.lock ]
then
Expand Down

0 comments on commit 2b20b1e

Please sign in to comment.