This repository has been archived by the owner on Oct 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 206
Use preview of pipeline caching in azure builds #1335
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
cab65cd
Add cache for stack-root and stack-work
jneira 78b443c
Add name as key and move STACK_ROOT to variables
jneira efb4838
Delete ghc at the end
jneira 19f3b12
Delete setup-exe-cache
jneira 7f895f3
Clean exec at the start
jneira 65c1249
Pack/unpack cache to keep files attributes, see https://github.com/mi…
jneira b639b21
Add cacheHitVar to make conditions work
jneira 3db2e7f
Change file extension to avoid docker auto extraction
jneira 7ddebe1
Put tar files inside a dir
jneira 8c787c6
Fix cache hit var name
jneira 6dde4cc
Extract in the correct dir
jneira 6a976ab
Apply changes from linux to macos
jneira e077fd8
Avoid unnecessary error creating cache dir
jneira File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export STACK_ROOT="C:\\sr" | ||
export LOCAL_BIN_PATH=$(cygpath $APPDATA\\local\\bin) | ||
export Z3_BIN_PATH=/usr/local/z3-4.8.5-x64-win/bin | ||
export PATH=$Z3_BIN_PATH:$LOCAL_BIN_PATH:$PATH |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be
$(HOME)/.stack
but it seems it cant be used in build variables: https://github.com/MicrosoftDocs/vsts-docs/issues/4337There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two possibilities:
If you can execute a command, something like
stack path --stack-root
should give you the root.Otherwise, I think you can change the location of
~/.stack
which may also be a solution.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variables
is defined prior any other command, so its possible values are limited to predefined variables and expressions. We would have to set in in the.bashrc
to usestack path
.I used the default one cause in macos write outside the home directory throwed permission errors (if it doesnt i would use
/.stack
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, just in case, values defined in
variables
are set in all script steps, sostack
must use the definition.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest adding a line to the bashrc-files that sets the stack-root since we have other env-variables there. The path uses the same trick: The path variable could only be overwritten, not appended when using the
variables
section on the yamlThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we could move the variable to bashrc but if we want to use it directly in the
CacheBeta
task, like it is in the windows script (and hopefully like we will able to use in linux and macos) the variable only can be in thevariables
block, cause we can't load the bashrc file in any task butbash
one, and it limits somewhat its possible use.Otoh there is an issue to make possible use the home directory as initial var (we only need the home directory to make sure we can write in the given path for macos)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't think of the issue that the task cannot load the bashrc file. Having a variable does indeed seem to be the best solution.