Skip to content

Accelerate GitHub Actions #250

Merged
eddelbuettel merged 3 commits intomasterfrom
de/faster_gha
May 20, 2021
Merged

Accelerate GitHub Actions #250
eddelbuettel merged 3 commits intomasterfrom
de/faster_gha

Conversation

@eddelbuettel
Copy link
Copy Markdown
Contributor

@eddelbuettel eddelbuettel commented May 20, 2021

This PR reduces the (current) run-time of GitHub Actions from the (somewhat unacceptable, to me) about 26 minutes back to the more common 8 or 9 minutes.

The immediate culprit is the stringr package from the tidyverse with its well-known dependency on stringi requiring a full build of the ICU library each and every time. It accounts for a good ten minutes of this. Technically, the error is at CRAN as the new (source) package appears to be lacking a matching binary package (as binaries get installed when available on the Windows platform for which this applies). This 'bad' state has persisted for around two weeks, if not longer.

In a broader context the culprit however is knitr which we only need for vignettes so this PR changes the setup to the one commonly used by (at least some) other projects, namely to a) not build vignettes (so that we can do with knitr, rmarkdown and its tail build- and run-time dependencies) and to b) not test the vignettes (ditto). That is perfectly defensible as out three vignettes to do not provide additional coverage over the existing unit tests.

The actual change then is three-fold. We tell the remotes package to use its default behavior (of not installing Suggests:), and we tell rcmdcheck to pass the 'no vignettes, please' argument to both the build and check steps, and c) we tell R to not look for package in Suggests: during the actual test. All three are easily reversible at any time. Additionally, we set the 'fail' criterion back to ERROR as WARNING can be a little easy to trigger in a large package (and we will know about it from running tests on other platforms during development too).

@aaronwolen
Copy link
Copy Markdown
Member

Very nice!

@eddelbuettel
Copy link
Copy Markdown
Contributor Author

eddelbuettel commented May 20, 2021

Thanks. Also added a NEWS entry for the PR itself.

How would you (and @Shelnutt2) feel if I made a second change that has been bugging me for a bit. The actual workflow YAML files is named R-CMD-check.yaml which is half-correct in that it runs that (and a build) but it does not reflect the architecture. So I am thinking to rename it to maybe windows.yaml or maybe win-msys2.yaml.

Thoughts?

@Shelnutt2
Copy link
Copy Markdown
Contributor

Thanks. Also added a NEWS entry for the PR itself.

How would you (and @Shelnutt2) feel if I made a second change that has been bugging me for a bit. The actual workflow YAML files is named R-CMD-check.yaml which is half-correct in that it runs that (and a build) but it does not reflect the architecture. So I am thinking to rename it to maybe windows.yaml or maybe win-msys2.yaml.

Thoughts?

Rename away!

@eddelbuettel
Copy link
Copy Markdown
Contributor Author

windows.yaml or maybe win-msys2.yaml.

Any naming preference? I mostly used just the OS in other use cases as msys2 is implicitly given for R.

@eddelbuettel
Copy link
Copy Markdown
Contributor Author

I will make it windows.yaml. We can always adjust later as (and if) needed

@eddelbuettel eddelbuettel merged commit 358b4ec into master May 20, 2021
@eddelbuettel eddelbuettel deleted the de/faster_gha branch May 20, 2021 21:26
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.

3 participants