How to add "--resave-date" to "R CMD build" in Travis?

See “https://api.travis-ci.org/v3/job/603678346/log.txt”: This recommends “R CMD build --resave-data”. Dominic Jodoin** (Travis CI) referred me to “https://docs.travis-ci.com/user/languages/r/#customizing-the-travis-build-steps”. That recommends modifying “.travis.yml”. I changed it to read as follows:

R for travis: see documentation at https://docs.travis-ci.com/user/languages/r

language: R
cache: packages
r:
r_build_args: --resave-data

******* This seems to have killed Travis-CI. The documentation provides examples to help get the syntax correct for other suggested modifications to .travic.yml, but not for “r_build_args”.

Suggestions? Thanks, Spencer Graves

You are getting a parse error.

I believe you need to not use a tab because they are illegal in YAML for indentation.

Thanks.

      I edited .travis.yml to delete the tab.  It now reads as

follows:

# R for travis: see documentation at

language: R
cache: packages
r: r_build_args: --resave-data
*** I did commit then push 20 minutes ago. Shouldn’t I have heard
back from Travis CI by now if I had
actually fixed the problem? Thanks, Spencer Graves

Please check the link that I gave (specifically for this reason) to see the new error.

There are YAML validators online to check against the 1.1 spec.

Travis also has its own one that also checks for some Travis-specific issues.

You can also opt into the new build config validation feature to get better info in web ui.

Thanks again. Could you please provide an example of the correct
syntax for that? The link you provided confirms that I still have a
syntax error. However, I don’t have any idea at the moment how to
fix it. Spencer

https://yaml-online-parser.appspot.com/?yaml=%23+R+for+travis%3A+see+documentation+at+https%3A%2F%2Fdocs.travis-ci.com%2Fuser%2Flanguages%2Fr language%3A+R cache%3A+packages r%3A ++r_build_args%3A+--resave-data &type=json

Progress, but I’m not there yet: It ran for 1 second, then gave
“master fix syntax #14 errored”. See

or       My .travis.yml file contains the following:

Quoting the value may help though it’s not required by the standard – otherwise, I’m out of ideas. Use the information I gave to get more info about the error. Try localizing the problem.

FIXED: My .travis.yml file that worked:

# R for travis: see documentation at

language: R
cache: packages
r:
r_build_args: --resave-data
*** NOTE: “r_build_args: --resave-data” had to be on a separate
line after “r:” and WITHOUT any leading tabs or spaces and without a
trailing newline. In particular, the following did NOT work: # R for travis: see documentation at
language: R
cache: packages
r:

r_build_args: --resave-data
*** This did NOT work if there was one or more space characters or a
tab before “r_build_args: --resave-data”. Some configurations
didn’t run at all. Some “Errored” in 0 or 1 second. With
“r_build_args: --resave-data” was on the same line as “r:”, it ran
but ignored “r_build_args: --resave-data”. Thanks for the help. Spencer Graves