Skip to content

Commit

Permalink
[setup-r-dependencies] some more docs
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
gaborcsardi committed Feb 14, 2022
1 parent d1e3040 commit 819c6b8
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions setup-r-dependencies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@ System dependencies are **not** installed on other operating systems and
other Linux distributions currently, and you need to install them manually,
_before_ using the `r-lib/setup-r-dependencies` action.

Also note that the system depedencies of Bioconductor packages are typically
not installed automatically, so you might need to do this, even on the
supported Linux distributions.

On Ubuntu Linux you can use `apt-get` to install system depedencies:

```yaml
- name: Install libcurl on Linux
if: runner.os == 'Linux'
run: sudo apt-get update -y && sudo apt-get install -y libcurl4-openssl-dev
```

On macOS you can usually use `brew`, here is an example step in a workflow:

```yaml
Expand Down Expand Up @@ -195,6 +207,24 @@ On Windows you can usually use `pacman` that is included in Rtools4, or
choco install mariadb
```

# Installing the latest dependencies

Note that `setup-r-dependencies` does _not_ necessarily install the latest
versions of the dependent R packages. Typically, if there is a binary build
of an older package version available, and that satisfies all version
requirements, then it will be preferred over a later source R package.

This makes the jobs more robust, because installing source packages fails
more often, especially on platforms without automatic system dependency
installation (e.g. Windows and macOS).

If your package does need a later version of a dependency, then you need
to explicitly require a newer version in the `DESCRIPTION` file.
Alternatively, if you only want to run the CI jobs with a later version,
without a formal version requirement, then add the package to the
`extra-packages` parameter. `setup-r-dependencies` installs the latest versions
of these packages.

# License

The scripts and documentation in this project are released under the [MIT License](LICENSE)
Expand Down

0 comments on commit 819c6b8

Please sign in to comment.