actions
actions copied to clipboard
Optionally install dev version of pandoc
Which is useful for testing packages that heavily rely on pandoc.
@yihui is providing pre-built binaries that we could use.
Pandoc has very pretty frequent releases, I am not sure it would be worth the effort.
pandoc releases have been a bit bumpy lately, so being able to install the dev version would be very useful, albeit for only a handful of packages.
I discovered pandoc is building nightly using GHA and binaries are available as artifacts: https://github.com/jgm/pandoc/actions/runs/327037265
There is no standard url available but with the API it can be downloaded. The pre-built binary made available by Yihui for Linux and used through several packages now uses (https://github.com/yihui/travis-bin/issues/4) this nighlty build: https://travis-bin.yihui.org/ which offer a "fixed" url : https://travis-bin.yihui.org/pandoc-linux.zip
I don't know if artifacts in GHA can be retrieved easily from one project to another as it would surely be easier. Otherwise, this url can be used I guess.
Testing with last available Pandoc is required for some package in order to detect changes as soon as possible. Pandoc does not do pre-release. A weekly build would surely be enough if nightly is too much - it is not so difficult to build some binaries from pandoc example: https://github.com/jgm/pandoc/blob/master/.github/workflows/nightly.yml
As I wanted to have a test on Pandoc devel for our new GHA workflow (currently being setup), I created an action using composite steps to directly get the last nightly build available from jgm/pandoc.
It lives currently in my fork: https://github.com/cderv/actions/tree/nightly-pandoc/setup-pandoc-nightly
This works on 3 OS and does not rely on the travis-bin repos that gets the linux binary from the nightly pandoc build, and serves it at a fixed url. (using GHA now). it is using the github api to get some information about the runs, and get the artifact link to download. Then it unzips in the workspace and prepend in PATH. Same logic I put in travis-bin also.
To use it, you obviously need use a new actions in a workflow specific for the devel version in addition to the setup-pandoc one. It would be easier to use with: 'devel' in the setup-pandoc action I believe, but it works well that way too.
Anyway, I let you decide which is the best for the future.
- If you are interesting in this action as a composite one, I can make a PR and we can improve it.
- If you want to integrate in
setup-pandoc, what I have done in those two project above works ok (using the github API), so I believe it would work well with the actions using JS, with their JS API https://octokit.github.io/rest.js/v18. - If you think it should live elsewhere than
r-lib/actions(not sure why but why not), it may be better that I make a new repo and not rely on a branch of this repo, right ?
So in the end just sharing what I have done. It was a great way to get more familiar with GHA.
Happy to modify the GHA workflows of that will use it when there will be a solution for devel Pandoc embedded in setup-pandoc
Is this still desired?
In the R Markdown ecosystem we test against the dev version of Pandoc, and for that we are using my fork cderv/actions@nightly-pandoc/setup-pandoc-nightly https://github.com/rstudio/rmarkdown/blob/69e6f983fdd9fca18284509eb6fed8fc4c0fc3f7/.github/workflows/R-CMD-check.yaml#L64-L70
So this is working fine but it would still be easier (or more logic) to have a with: nightly available as parameter in main pandoc I guess.
@cderv Thanks! Would it be easy to have a PR against this repo?
Yes I can do that. Though, it depends how we want to do it. My action is a composite action, so I could PR it like that it would need to be used the way I used - a variable and conditional use of one or the other action.
To be included into current setup-pandoc, my action would need to be rewritten in TypeScript or setup-pandoc rewritten to be included a steps in a composite action. I can try one or the other, but it is less straightforward.
Which is better ?
This might be a good project for @schloerke
Will be handled in #469.
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue