Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@scarrazza
Copy link
Member

This PR addresses the issue #676 by replacing travis builds with github workflows. I have checked and our account does not have time/build limitations. This implementation replaces all travis builds, and its much faster, approx 15min per build.

The linux implementation is based on github ubuntu installation, which already comes with conda.

The macos implementation is similar to travis, I didn't manage to use the conda installation and SDK already shipped in the image. If someone wants to play is welcome.

@scarrazza scarrazza requested review from Zaharid and wilsonmr April 3, 2020 08:43
@Zaharid
Copy link
Contributor

Zaharid commented Apr 3, 2020

This is very nice.

What does it mean no limits? Can I mine me some bitcoin?

Why does the "remove homebrew" step take 15 minutes (https://github.com/NNPDF/nnpdf/pull/703/checks?check_run_id=557408059)? Do we need it at all?

Can we use the same commands for both linux and mac?

@scarrazza
Copy link
Member Author

scarrazza commented Apr 3, 2020

What does it mean no limits? Can I mine me some bitcoin?

well, yes, up to 6h per job I think (https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits)

Why does the "remove homebrew" step take 15 minutes (https://github.com/NNPDF/nnpdf/pull/703/checks?check_run_id=557408059)? Do we need it at all?

The mac build time oscillates. I have tried without the homebrew and it works, however I don't know why this step was in the travis build. I would love to get rid of that line, the SDK and conda installations (but I am afraid is not super easy, and I need a mac expert ;-p).

@scarrazza
Copy link
Member Author

I hope some mac expert could elucidate to me

  • why homebrew has to be removed?
  • where conda is installed by default in the github workflow images?
  • how the xcode, macos sdk and conda play together (in terms of versions), etc?

@wilsonmr
Copy link
Contributor

wilsonmr commented Apr 3, 2020

why homebrew has to be removed?

The home brew I'm not sure because it's not usually installed by default.. perhaps this was something specific to the travis environments?

how the xcode, macos sdk and conda play together (in terms of versions), etc?

The simple line is regardless of what xcode you are running, you need the specific SDK detailed here to be able to compile with conda https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html#macos-sdk they can't ship it with conda for legal reasons

@wilsonmr
Copy link
Contributor

wilsonmr commented Apr 3, 2020

but that's to say I don't think you can ever get rid of the SDK stuff for MacOS unless they change how their compilers are working, which I find unlikely because it doesn't look like apple are going to suddenly become more relaxed about people shipping their base libraries

@scarrazza
Copy link
Member Author

@wilsonmr thanks, I will remove the homebrew.

Now, concerning the macOS SDK, is it possible to use a version different from 10.9, for example the one already installed in the image? https://github.com/actions/virtual-environments/blob/master/images/macos/macos-10.15-Readme.md#installed-sdks

@wilsonmr
Copy link
Contributor

wilsonmr commented Apr 3, 2020

as far as I'm aware no: #323 the mac compilers are built specifically against 10.9

@scarrazza
Copy link
Member Author

Ok, then the last thing we could try to get rid is the miniconda installation.
Do you have any idea where the conda binary is installed?

@Zaharid
Copy link
Contributor

Zaharid commented Apr 3, 2020

I have had that problem, but I don't remember where or how I solved it.

@Zaharid
Copy link
Contributor

Zaharid commented Apr 3, 2020

@Zaharid
Copy link
Contributor

Zaharid commented Apr 3, 2020

In particular there is the shell: bash -l {0} that is needed.

@scarrazza
Copy link
Member Author

OK, then we should try use that on both builds.

@wilsonmr
Copy link
Contributor

wilsonmr commented Apr 3, 2020

Where can I find information on the images used by these workflows?

@scarlehoff
Copy link
Member

Information about the images are in this repo https://github.com/actions/virtual-environments/blob/master/images/linux/Ubuntu1804-README.md

It is interesting that this is also faster than Travis. Nice.

@scarrazza
Copy link
Member Author

@Zaharid @wilsonmr ready for review, now we have just one job/commands for linux and mac.

@Zaharid
Copy link
Contributor

Zaharid commented Apr 3, 2020

This looks very good, not least because of the +78 −234 diffstat. We should update some documentation though.

@Zaharid
Copy link
Contributor

Zaharid commented Apr 4, 2020

$ rg Travis

still has a few hits in various docs. I'll work on that.

conda activate root
scp -i "$KEY" -o StrictHostKeyChecking=no\
$CONDA_PREFIX/conda-bld/${{matrix.CONDA_OS}}/*.tar.bz2 \
[email protected]:~/packages/conda-private/linux-64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test the uploading? This URL seems wrong.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed the url. I did not check the uploading process (the scp), but maybe we can debug that when merging to master?

@Zaharid
Copy link
Contributor

Zaharid commented Apr 6, 2020

I'd prefer to do the testing here. Both to confirm that the docs are right and indeed you can upload by removing that one line and to keep up with the proud righteous traditions of yesteryear.

@scarrazza
Copy link
Member Author

scarrazza commented Apr 6, 2020

OK, this is working well including the uploads.

Copy link
Contributor

@wilsonmr wilsonmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@Zaharid
Copy link
Contributor

Zaharid commented Apr 6, 2020

Ok, please rebase -i to get rid of the typo commits and merge.

This should be very useful!

scarrazza and others added 3 commits April 6, 2020 17:07
removing useless copy
Remove outdated mentions to Travis.

Consolidate references to old CIs in the end rather than in the
introduction.

Remove an outdated section on the  vp guide that is already well covered
in the Sphinx docs.

fixing typo

testing full chain

adding key for sphinx upload

yeah, missing recursive copy

moving the upload back to master
@Zaharid
Copy link
Contributor

Zaharid commented Apr 6, 2020

@scarrazza I am getting an error!

The job was not started because the spending limit for Actions and Packages has been exceeded.

@scarrazza
Copy link
Member Author

I know, don't worry this should be fixed tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants