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

Optionally install dev version of pandoc #187

Closed
hadley opened this issue Oct 3, 2020 · 11 comments
Closed

Optionally install dev version of pandoc #187

hadley opened this issue Oct 3, 2020 · 11 comments
Labels
feature a feature request or enhancement

Comments

@hadley
Copy link
Member

hadley commented Oct 3, 2020

Which is useful for testing packages that heavily rely on pandoc.

@yihui is providing pre-built binaries that we could use.

@jimhester
Copy link
Member

Pandoc has very pretty frequent releases, I am not sure it would be worth the effort.

@hadley
Copy link
Member Author

hadley commented Oct 6, 2020

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.

@cderv
Copy link
Contributor

cderv commented Oct 26, 2020

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 (yihui/travis-bin#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

@cderv
Copy link
Contributor

cderv commented Nov 20, 2020

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

@gaborcsardi gaborcsardi added the feature a feature request or enhancement label Dec 10, 2021
@gaborcsardi
Copy link
Member

Is this still desired?

@cderv
Copy link
Contributor

cderv commented Dec 10, 2021

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.

@gaborcsardi
Copy link
Member

@cderv Thanks! Would it be easy to have a PR against this repo?

@cderv
Copy link
Contributor

cderv commented Dec 10, 2021

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 ?

@hadley
Copy link
Member Author

hadley commented Dec 10, 2021

This might be a good project for @schloerke

@gaborcsardi
Copy link
Member

Will be handled in #469.

@github-actions
Copy link

github-actions bot commented Nov 4, 2022

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

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants