Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Use preview of pipeline caching in azure builds #1335

Merged
merged 13 commits into from
Jul 30, 2019

Conversation

jneira
Copy link
Member

@jneira jneira commented Jul 21, 2019

When 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

@@ -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
Copy link
Member Author

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

Copy link
Collaborator

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.

Copy link
Member Author

@jneira jneira Jul 22, 2019

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).

Copy link
Member Author

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.

Copy link
Contributor

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

Copy link
Member Author

@jneira jneira Jul 23, 2019

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)

Copy link
Contributor

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.

@fendor fendor requested a review from samuelpilz July 21, 2019 21:54
@jneira
Copy link
Member Author

jneira commented Jul 22, 2019

All envs using the cache with build: https://dev.azure.com/jneira/haskell-ide-engine/_build/results?buildId=179

@jneira
Copy link
Member Author

jneira commented Jul 22, 2019

Btw, shouldn't azure builds be as a check in the pr?

@samuelpilz
Copy link
Contributor

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.

@jneira
Copy link
Member Author

jneira commented Jul 23, 2019

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?
(sorry for ping if it is not the case)

@samuelpilz
Copy link
Contributor

I have created a team haskell-ide-engine https://dev.azure.com/haskell-ide-engine/ and I am willing to invite any collaborator of hie. The main project of this team (https://dev.azure.com/haskell-ide-engine/haskell-ide-engine/_build) still needs a pipeline (just a few clicks)

@samuelpilz
Copy link
Contributor

This looks fine.

Btw @jneira, I would like to add you to the the haskell-ide-engine organization on azure. What is the email adress I should use for the invitation?

@jneira
Copy link
Member Author

jneira commented Jul 25, 2019

atreyu.bbb at gmail dot com would be fine, thanks!

@samuelpilz
Copy link
Contributor

Invitation sent.

Is this ready to merge?

@alanz could you give one of us (@power-fungus, @jneira, @fendor) the permission to add the relevant hooks to this repository? Or I can add you to the azure-team as well

@jneira
Copy link
Member Author

jneira commented Jul 25, 2019

Yeah, it is finished

@samuelpilz
Copy link
Contributor

What is the preferred way to get this to master? merge, rebase, squash?

@samuelpilz samuelpilz merged commit bba0091 into haskell:master Jul 30, 2019
@jneira jneira deleted the azure-cache4 branch July 30, 2019 08:40
@alanz alanz added this to the 2019-07 milestone Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants