- [Swift - Swift Package Manager](#swift---swift-package-manager)
- [* - Bazel](#---bazel)
## C# - NuGet
## C# - NuGet
Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies):
Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies):
```yaml
```yaml
@ -48,10 +53,11 @@ Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/packa
Depending on the environment, huge packages might be pre-installed in the global cache folder.
Depending on the environment, huge packages might be pre-installed in the global cache folder.
With `actions/cache@v2` you can now exclude unwanted packages with [exclude pattern](https://github.com/actions/toolkit/tree/main/packages/glob#exclude-patterns)
With `actions/cache@v2` you can now exclude unwanted packages with [exclude pattern](https://github.com/actions/toolkit/tree/main/packages/glob#exclude-patterns)
@ -138,6 +174,8 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba
## Java - Gradle
## Java - Gradle
>Note: Ensure no Gradle daemons are running anymore when your workflow completes. Creating the cache package might fail due to locks being held by Gradle. Refer to the [Gradle Daemon documentation](https://docs.gradle.org/current/userguide/gradle_daemon.html) on how to disable or stop the Gradle Daemons.
```yaml
```yaml
- uses: actions/cache@v2
- uses: actions/cache@v2
with:
with:
@ -240,8 +278,8 @@ The yarn cache directory will depend on your operating system and version of `ya
${{ runner.os }}-yarn-
${{ runner.os }}-yarn-
```
```
## Node - Yarn 2
## Node - Yarn 2
The yarn 2 cache directory will depend on your config. See https://yarnpkg.com/configuration/yarnrc#cacheFolder for more info.
The yarn 2 cache directory will depend on your config. See https://yarnpkg.com/configuration/yarnrc#cacheFolder for more info.
```yaml
```yaml
@ -259,6 +297,7 @@ The yarn 2 cache directory will depend on your config. See https://yarnpkg.com/c
```
```
## OCaml/Reason - esy
## OCaml/Reason - esy
Esy allows you to export built dependencies and import pre-built dependencies.
Esy allows you to export built dependencies and import pre-built dependencies.
```yaml
```yaml
- name: Restore Cache
- name: Restore Cache
@ -279,13 +318,12 @@ Esy allows you to export built dependencies and import pre-built dependencies.
...(Build job)...
...(Build job)...
# Re-export dependencies if anything has changed or if it is the first time
# Re-export dependencies if anything has changed or if it is the first time
Replace `~/.local/share/renv` with the correct `path` if not using Ubuntu.
## R - renv
### Multiple OS's in a workflow
For renv, the cache directory will vary by OS. The `RENV_PATHS_ROOT` environment variable is used to set the cache location. Have a look at https://rstudio.github.io/renv/reference/paths.html#details for more details.