Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A new take on reducing travis test time for perl6/doc #1946

Closed
nxadm opened this issue Apr 20, 2018 · 18 comments
Closed

A new take on reducing travis test time for perl6/doc #1946

nxadm opened this issue Apr 20, 2018 · 18 comments
Assignees
Labels
meta RFCs, general discussion, writing style, repository organization, etc.

Comments

@nxadm
Copy link
Contributor

nxadm commented Apr 20, 2018

On issue #1765 some options were implemented:

  • whateverable
  • docker

I propose a new take that, in my view, is easier to maintain and probably faster: a deb package containing rakudo, zef and all the perl6 modules specified in the META6.json of this repo.

To use this package, this need to be added to a .travis.yml file:

env:
  global:
    - PATH="/opt/rakudo-pkg-for-doc/bin:/opt/rakudo-pkg-for-doc/share/perl6/site/bin:$PATH"
sudo: required
install:
  - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 379CE192D401AB61
  - echo "deb https://dl.bintray.com/nxadm/perl6-doc trusty main" | sudo tee -a /etc/apt/sources.list
  - sudo apt-get update && sudo apt-get install rakudo-pkg-for-doc

There is no need to specify a version, you'll always get the latest released Rakudo.

If this solution proofs itself useful, a new package will be created and automatically uploaded to the repo by travis for every Rakudo release.

The automation of the pkg creation and repo upload are handled in this repo:
https://github.com/nxadm/rakudo-pkg-for-doc

cc: @JJ

@coke
Copy link
Collaborator

coke commented Apr 20, 2018

Thought: this will break if we ever change the required modules list (at least until the package is then updated)

@nxadm
Copy link
Contributor Author

nxadm commented Apr 20, 2018

It depends. The pkg takes the modules list directly from the repo, so a new package needs to be respinned. Just bumping the revision to "02" will trigger the build for a new package that will obsolete the previous one. It can be probably automated if changing dependencies is something that happens often.

The question is what more important:

  • the dynamism of adding module dependencies on the fly.
  • or shave some minutes (I didn't time it, but building the deps takes a long time) for every commit.

I think option 2 is more applicable for a CI system, but I understand the argument for option 1.

@JJ
Copy link
Contributor

JJ commented Apr 21, 2018

The current test includes a docker container that already packs all required modules, and will break as soon as we change it. The whateverable binary, on the other hands, installs them and it takes some time. I'll put this one for testing in the shippable version (in #1931) first.

@JJ
Copy link
Contributor

JJ commented Apr 21, 2018

And thanks a lot, @nxadm , for preparing this.

@JJ JJ added build meta RFCs, general discussion, writing style, repository organization, etc. labels Apr 21, 2018
@JJ JJ self-assigned this Apr 21, 2018
@AlexDaniel
Copy link
Member

AlexDaniel commented Apr 21, 2018

  • the dynamism of adding module dependencies on the fly.
  • or shave some minutes (I didn't time it, but building the deps takes a long time) for every commit.

Why can't we have both? Surely it can install modules that are not installed on the fly?

@nxadm
Copy link
Contributor Author

nxadm commented Apr 21, 2018

@AlexDaniel
LOL, yes. I hadnt't though that zef is supplied in the package and can install modules :)

@JJ
Copy link
Contributor

JJ commented Apr 21, 2018 via email

@JJ
Copy link
Contributor

JJ commented Apr 21, 2018 via email

@nxadm
Copy link
Contributor Author

nxadm commented Apr 21, 2018

Instruction could be amended to:

env:
  global:
    - PATH="/opt/rakudo-pkg-for-doc/bin:/opt/rakudo-pkg-for-doc/share/perl6/site/bin:$PATH"
sudo: required
install:
  - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 379CE192D401AB61
  - echo "deb https://dl.bintray.com/nxadm/perl6-doc trusty main" | sudo tee -a /etc/apt/sources.list
  - sudo apt-get update && sudo apt-get install rakudo-pkg-for-doc
  - sudo zef --deps-only install .

@nxadm
Copy link
Contributor Author

nxadm commented Apr 21, 2018

(All the commands besides the path, could be added in a script)

@JJ
Copy link
Contributor

JJ commented Apr 21, 2018

But that will basically save the time for installing zef, right? That's not much anyway.

@nxadm
Copy link
Contributor Author

nxadm commented Apr 21, 2018 via email

@JJ
Copy link
Contributor

JJ commented Apr 21, 2018 via email

JJ added a commit to JJ/doc that referenced this issue Apr 22, 2018
JJ added a commit to JJ/doc that referenced this issue Apr 22, 2018
JJ added a commit to JJ/doc that referenced this issue Apr 22, 2018
JJ added a commit that referenced this issue Apr 22, 2018
Which is probably useless anyway. But this "canary in the mine" test
is fast anyway, and gives Shippable a good use, so closes #1931. We
might leave it thus for a while, and maybe incorporate it to Travis
later on, if possible (refs #1946).
@JJ
Copy link
Contributor

JJ commented Apr 22, 2018

If we want to actually process test logs, we need TAP::Formatter::Junit and thus cpanm. Check this out https://app.shippable.com/github/JJ/doc/runs/24/1/console
That's adding a bit to the process. Can you include that into the package?

@JJ
Copy link
Contributor

JJ commented Apr 22, 2018

It takes now 4 minutes more with the installation of cpanminus and the new module added...

@nxadm
Copy link
Contributor Author

nxadm commented Apr 22, 2018

TAP::Formatter::Junit 0.09 is part of Ubuntu trusty: https://packages.ubuntu.com/trusty/libtap-formatter-junit-perl

Will that version do? In case it does:

sudo apt-get install libtap-formatter-junit-perl

@JJ
Copy link
Contributor

JJ commented Apr 22, 2018 via email

@JJ JJ closed this as completed in b5ef42e Apr 22, 2018
@JJ
Copy link
Contributor

JJ commented Apr 22, 2018

It's definitely faster than downloading cpanm and installing all the modules, but that little module has got a whole lot of dependencies that also take time to download.
Probably does not make sense to include it, since this JUnit thing is very shippable specific anyway, so no problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta RFCs, general discussion, writing style, repository organization, etc.
Projects
None yet
Development

No branches or pull requests

4 participants