-
Notifications
You must be signed in to change notification settings - Fork 207
Use preview of pipeline caching in azure builds #1335
Conversation
@@ -25,13 +25,30 @@ jobs: | |||
YAML_FILE: stack-8.4.2.yaml | |||
stack-8.2.2: | |||
YAML_FILE: stack-8.2.2.yaml | |||
variables: | |||
STACK_ROOT: /home/vsts/.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.
It should be $(HOME)/.stack
but it seems it cant be used in build variables: https://github.com/MicrosoftDocs/vsts-docs/issues/4337
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.
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 use stack 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, so stack
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 yaml
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.
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 the variables
block, cause we can't load the bashrc file in any task but bash
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.
All envs using the cache with build: https://dev.azure.com/jneira/haskell-ide-engine/_build/results?buildId=179 |
Btw, shouldn't azure builds be as a check in the pr? |
Unfortunately, no one with the appropriate rights has added azure as check to this repo. And I do not have the rights to add the required hooks. |
Well, it is needed to leverage the work done about it, couldn't @fendor or @alanz add the azure build as a check to the repo? |
I have created a team |
This looks fine. Btw @jneira, I would like to add you to the the |
atreyu.bbb at gmail dot com would be fine, thanks! |
Yeah, it is finished |
What is the preferred way to get this to master? merge, rebase, squash? |
tar
utility sees them as directories although they are not (!!) .. so i had to put the tar files in a directory to keep them safeWhen the first issue is corrected, the unix and macos config will be similar to windows one.
With cache builds terminate in about 15 mins!
See linux and windows builds here: https://dev.azure.com/jneira/haskell-ide-engine/_build/results?buildId=177