-
Notifications
You must be signed in to change notification settings - Fork 5
/
action.yml
52 lines (52 loc) · 1.64 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build wasm packages
description: |
Build a list of R packages for WebAssembly, create an R library, and build a
CRAN-like repository containing the R package binaries.
inputs:
packages:
description: A file containing a list of R package references.
default: packages
required: true
upload-image:
description: |
Should the R package library filesystem image be uploaded as an artifact?
default: true
required: true
upload-repo:
description: |
Should the R package repository be uploaded as an artifact?
default: true
required: true
strip:
description: |
An R expression evaluating to a character vector of directories to strip
when building the R package library image.
default: "NULL"
required: true
runs:
using: "composite"
steps:
- name: Install the pak and rwasm R packages
run: |
/usr/bin/R --silent -e 'install.packages("pak")'
/usr/bin/R --silent -e 'pak::pak("r-wasm/rwasm")'
shell: bash
- name: Build Wasm R packages
run: |
/usr/bin/R --silent -e 'rwasm::add_list("${{ inputs.packages }}")'
/usr/bin/R --silent -e 'rwasm::make_vfs_library(strip = ${{ inputs.strip }})'
shell: bash
- name: Upload R package repository
if: ${{ inputs.upload-repo == 'true' }}
uses: actions/upload-artifact@v3
with:
name: wasm-repo
path: repo
- name: Upload R package library filesystem image
if: ${{ inputs.upload-image == 'true' }}
uses: actions/upload-artifact@v3
with:
name: wasm-image
path: |
vfs/library.data
vfs/library.js.metadata