-
-
Notifications
You must be signed in to change notification settings - Fork 476
[WIP] Added instructions for CmdStan tarball builder #202
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
Open
bbbales2
wants to merge
6
commits into
master
Choose a base branch
from
feature/cmdstan-tarball-builder
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b3ed0f0
Added instructions for CmdStan tarball builder
bbbales2 ebf8c99
Few edits
bbbales2 2779e67
Update knitr/cmdstan-tarball-builder/cmdstan-tarball-builder.Rmd
bbbales2 c22013c
Update knitr/cmdstan-tarball-builder/cmdstan-tarball-builder.Rmd
bbbales2 4fbcd77
Update knitr/cmdstan-tarball-builder/cmdstan-tarball-builder.Rmd
bbbales2 21de669
Update knitr/cmdstan-tarball-builder/cmdstan-tarball-builder.Rmd
bbbales2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
103 changes: 103 additions & 0 deletions
103
knitr/cmdstan-tarball-builder/cmdstan-tarball-builder.Rmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
--- | ||
title: "CmdStan Tarball Builder" | ||
author: "Stan Development Team" | ||
date: 2-22-2020 | ||
output: | ||
html_document: default | ||
pdf_document: default | ||
--- | ||
|
||
## Introduction | ||
|
||
The CmdStan tarball builder Github Action can be used to automatically build a | ||
portable (MacOS/Linux/Windows) CmdStan tarball from a combination of `cmdstan`, | ||
`stanc`, `stanc3`, and `math` Github branches. The goal of this Github Action is | ||
to make it easier to share experimental Stan work. | ||
|
||
The two basic steps to use the CmdStan tarball builder are building and | ||
distributing. The Github action will handle the building part. Github releases | ||
are useful for the distributing part, and make it so that the custom CmdStan | ||
can be used directly in [cmdstanr](https://mc-stan.org/cmdstanr/). | ||
|
||
## Building the CmdStan tarball | ||
|
||
To use the CmdStan tarball builder Github Action, | ||
|
||
1. Fork a copy of the [CmdStan repository](https://github.com/stan-dev/cmdstan). | ||
The **Fork** button is in the upper right hand corner of the page. If you already | ||
have a fork of cmdstan, make sure your cmdstan fork is up to date with the | ||
bbbales2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
latest `stan-dev/cmdstan` develop branch. | ||
|
||
 | ||
|
||
2. Navigate to the Github Actions page. The **Actions** button is at the top of | ||
the page below the repository title | ||
|
||
 | ||
|
||
3. Select the **CmdStan tarball builder** Github action from the workflows on the | ||
left hand side of the page. | ||
|
||
 | ||
|
||
4. Click the **Run workflow** dropdown button on the right hand side of the page. | ||
|
||
 | ||
|
||
5. Fill in a name for the custom CmdStan you are building along with the Github | ||
repository names and branches from which you want to build it. There should be | ||
a **Run Workflow** button at the bottom of this form that will start the build. | ||
|
||
Github should forward you to a status page for the action. It may take an hour | ||
or so to build the binaries, but once they are finished there should be an | ||
bbbales2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
appropriately named artifact available to download. | ||
|
||
## Distributing the CmdStan Tarball | ||
|
||
The two drawbacks to the Github Actions artifact outputs are that the output is | ||
not easily downloaded (the artifact download link does not work when it is | ||
copy-pasted), and the tarball is compressed in a zip file (which is slightly | ||
inconvenient). | ||
|
||
Github releases are useful for overcoming these difficulties. To do a Github | ||
release of your development CmdStan, | ||
|
||
1. Download the CmdStan artifact and unzip it. | ||
|
||
2. Create a new Github release. There should be a link for this on the right | ||
hand side of the page under **Releases** | ||
|
||
 | ||
|
||
3. Specify a tag, name your release, and add a description of what makes your | ||
CmdStan special. There should be a link at the bottom to upload a file. Upload | ||
the unzipped tarball from the first step (leave it as a `.tar.gz` file -- don't | ||
untar it to a folder). | ||
|
||
 | ||
|
||
4. Once the file finishes uploading click **Publish release**. You should be | ||
redirected to the release page which will have a shareable link to the uploaded | ||
tarball. | ||
|
||
## Sharing Installation Instructions | ||
|
||
With the Github release, it should be possible for CmdStan users to download | ||
the tarball directly from the release page and use it. R users can use the | ||
`cmdstanr::install_cmdstan` command with a custom `release_url` to use the | ||
custom CmdStan. | ||
|
||
For instance, if the final release url is `https://github.com/stan-dev/cmdstan/releases/download/v2.26.1/cmdstan-2.26.1.tar.gz`, | ||
then a `cmdstanr` user can install it with: | ||
|
||
``` | ||
cmdstanr::install_cmdstan(release_url = "https://github.com/stan-dev/cmdstan/releases/download/v2.26.1/cmdstan-2.26.1.tar.gz") | ||
``` | ||
|
||
It may also be useful to build a custom `cmdstanr` (if the custom CmdStan has | ||
different arguments). This can be done by pointing `devtools::install_github` at | ||
the appropriate repository and branch: | ||
|
||
``` | ||
devtools::install_github("stan-dev/cmdstanr@develop") | ||
bbbales2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.