-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- output: | ||
Output in a is: some output | ||
Output in b is: some output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# no toplevel | ||
# s3 | ||
|
||
export TASKRUNNER_SAVE_REMOTE_CACHE=1 | ||
|
||
mkdir a | ||
|
||
( | ||
cd a | ||
echo foo > input.txt | ||
git init -q | ||
git add input.txt | ||
) | ||
|
||
cp -r a b | ||
|
||
go() { | ||
# Note: we want separate workdir for separate repos | ||
TASKRUNNER_STATE_DIRECTORY="$(pwd)" taskrunner -n mytask bash -e -c ' | ||
snapshot input.txt --outputs output.txt | ||
echo "Expensive computation" | ||
' | ||
} | ||
|
||
( | ||
cd a | ||
echo "some output" > output.txt | ||
TASKRUNNER_PRIME_CACHE_MODE=1 go # should not run expensive computation | ||
echo "Output in a is: $(cat output.txt)" | ||
) | ||
|
||
( | ||
cd b | ||
go # also should not run computation, got it from cache | ||
echo "Output in b is: $(cat output.txt)" | ||
) |