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

[ci] Fix CI job for R artifact #4811

Merged
merged 7 commits into from
Nov 18, 2021
Merged

[ci] Fix CI job for R artifact #4811

merged 7 commits into from
Nov 18, 2021

Conversation

StrikerRUS
Copy link
Collaborator

@StrikerRUS StrikerRUS commented Nov 18, 2021

Fixed #4810.

DO NOT MERGE before uncommenting # condition: not(startsWith(variables['Build.SourceBranch'], 'refs/pull/')).

@StrikerRUS StrikerRUS changed the title [WIP] Fix CI job for R artifact [WIP][DO NOT MERGE] Fix CI job for R artifact Nov 18, 2021
@StrikerRUS
Copy link
Collaborator Author

Compilation for Matrix fails but the whole job succeeds. I guess this is due to pre-installed Matrix (not directly but probably as a dependency)

...

make[2]: Leaving directory '/tmp/RtmpXPS3LD/R.INSTALLaec3e29fc26/Matrix/src/SuiteSparse_config'
gcc -std=gnu99 -std=gnu11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o Matrix.so CHMfactor.o Csparse.o TMatrix_as.o Tsparse.o init.o Mutils.o chm_common.o cs.o cs_utils.o dense.o dgCMatrix.o dgTMatrix.o dgeMatrix.o dpoMatrix.o dppMatrix.o dsCMatrix.o dsyMatrix.o dspMatrix.o dtCMatrix.o dtTMatrix.o dtrMatrix.o dtpMatrix.o factorizations.o ldense.o lgCMatrix.o sparseQR.o abIndex.o CHOLMOD.a COLAMD.a AMD.a SuiteSparse_config.a -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -lgfortran
collect2: error: ld returned 1 exit status
make[1]: *** [/usr/share/R/share/make/shlib.mk:10: Matrix.so] Error 1
make[1]: Leaving directory '/tmp/RtmpXPS3LD/R.INSTALLaec3e29fc26/Matrix/src'
ERROR: compilation failed for package ‘Matrix’
* removing ‘/home/vsts_azpcontainer/Rlib/Matrix’

The downloaded source packages are in
	‘/tmp/RtmpDMyuEa/downloaded_packages’
Warning message:
In install.packages(c("R6", "data.table", "jsonlite", "knitr", "Matrix",  :
  installation of one or more packages failed,
  probably ‘Matrix’

...

Need use --r-executable=RD and RDscript?..

@StrikerRUS
Copy link
Collaborator Author

Seems that using dev versions of R and Rscript helped.

@StrikerRUS StrikerRUS changed the title [WIP][DO NOT MERGE] Fix CI job for R artifact [DO NOT MERGE] Fix CI job for R artifact Nov 18, 2021
@StrikerRUS StrikerRUS marked this pull request as ready for review November 18, 2021 17:15
@StrikerRUS
Copy link
Collaborator Author

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Looks ok to me!

I'm comfortable using RD in the wch1/r-debug1 image because:

  1. We're only creating a source package, so I'm not worried about an alternative R build generating different artifacts.
  2. The package will be tested against r-devel when uploaded to CRAN anyway, so there's no risk of "created a package using a non-standard version of R that breaks things on a CRAN submission".

I pulled the artifact created from this PR's most recent CI run (#4811 (comment)) and ran R CMD check --as-cran on it, just on my Mac (R 4.1.1 from CRAN, macOS 11.14). No issues found.

So I think it's ok to merge this! (after reverting the commented-out condition line). Thanks for working through this, sorry I didn't think of it in #4775 .

.vsts-ci.yml Outdated Show resolved Hide resolved
@jameslamb jameslamb changed the title [DO NOT MERGE] Fix CI job for R artifact [ci] Fix CI job for R artifact Nov 18, 2021
@jameslamb jameslamb merged commit c2d13ec into master Nov 18, 2021
@jameslamb jameslamb deleted the fix_r_artifact branch November 18, 2021 21:05
@StrikerRUS StrikerRUS mentioned this pull request Jan 6, 2022
13 tasks
@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 23, 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.

Error on master during creating R-package artifact
2 participants