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

[R-package] [ci] restore R 3.6 Windows cran CI job (fixes #5036) #5479

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

jameslamb
Copy link
Collaborator

@jameslamb jameslamb commented Sep 10, 2022

Fixes #5036.
Replaces #5037.

Changes in this PR

  • changes to build-cran-package.sh:
    • replaces use of tar --exclude with simply rm-ing the excluded files prior to re-tarring the source distribution
    • removes unnecessary uses of -f in rm commands deleting files (not directories), for safety
    • removes unnecessary use of -v in tar commands whose output is suppressed anyway by redirection to /dev/null
    • removes uses of tar -C, instead just relying on directory traversal with cd
  • restores the R 3.6 cran-style Windows CI job

Description

CRAN-style builds of the R package have not been tested against R 3.6 on Windows for the last 7 months. This PR restores the CI job testing that support.

I used #5037 to experiment with different approaches and to try to find a root cause for why this job started failing. I discovered that the root issue is related to conflicting versions of the tar utility. As described in the R documentation for ?tar (link)

The ‘tar’ format no longer has an agreed standard!

Many R platforms use a version of GNU tar (including Rtools on Windows), but the behaviour seems to be changed with each version.

This only matters to {lightgbm} because its build script, build-cran-package.sh, requires a workaround for R not cleaning up .o files produced when the library is compiled to build vignettes (see #3946 (review)). That workaround requires untarring and carefully re-tarring a source distribution built by R CMD build.

This PR removes uses of less-likely-to-be-portable tar features in that build script, like -C and --exclude, to make failures like the one from #5036 less likely...in CI and for LightGBM's users.

Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

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

Thanks a lot! Great!

@jameslamb jameslamb merged commit 8b105ce into master Sep 12, 2022
@jameslamb jameslamb deleted the fix/r-3.6-ci branch September 12, 2022 06:20
@jameslamb jameslamb mentioned this pull request Oct 7, 2022
40 tasks
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

r-package (windows-latest, MINGW, R 3.6, cran) CI job fails
2 participants