@@ -10,19 +10,22 @@ name: R-CMD-check
1010
1111jobs :
1212 R-CMD-check :
13- runs-on : ${{ matrix.config.os }}
13+ runs-on : ${{ matrix.config.os == 'wasm' && 'ubuntu-latest' || matrix.config.os }}
14+ container : ${{ matrix.config.os == 'wasm' && 'ghcr.io/r-universe-org/build-wasm' || '' }}
1415
1516 name : ${{ matrix.config.os }} (${{ matrix.config.r }})
1617
1718 strategy :
1819 fail-fast : false
1920 matrix :
2021 config :
22+ - {os: wasm, r: 'release'}
23+
2124 - {os: macos-latest, r: 'devel'}
2225 - {os: macos-latest, r: 'release'}
2326 - {os: macos-latest, r: 'oldrel'}
2427
25- - {os: windows-11-arm }
28+ - {os: windows-11-arm, r: 'devel' }
2629 - {os: windows-latest, r: 'devel'}
2730 - {os: windows-latest, r: 'release'}
2831 - {os: windows-latest, r: 'oldrel'}
@@ -48,55 +51,25 @@ jobs:
4851 - uses : r-lib/actions/setup-pandoc@v2
4952
5053 - uses : r-lib/actions/setup-r@v2
51- if : matrix.config.os != 'windows-11-arm'
5254 with :
5355 r-version : ${{ matrix.config.r }}
5456 rtools-version : ${{ matrix.config.rtools }}
5557 http-user-agent : ${{ matrix.config.http-user-agent }}
5658 use-public-rspm : true
5759
58- - name : Install R & RTools (ARM64)
59- if : matrix.config.os == 'windows-11-arm'
60- run : |
61- $url = "https://www.r-project.org/nosvn/winutf8/aarch64/R-4-signed/R-4.5.0-aarch64.exe"
62- Invoke-WebRequest `
63- -Uri https://www.r-project.org/nosvn/winutf8/aarch64/R-4-signed/R-4.5.0-aarch64.exe `
64- -OutFile R-4.5.0-aarch64.exe
65- Start-Process `
66- -FilePath R-4.5.0-aarch64.exe `
67- -ArgumentList "/INSTALL /VERYSILENT /SUPPRESSMSGBOXES" -Wait
68-
69- Invoke-WebRequest `
70- -Uri https://github.com/r-hub/rtools45/releases/download/latest/rtools45-aarch64.exe `
71- -OutFile "rtools45-aarch64.exe"
72- Start-Process `
73- -FilePath "rtools45-aarch64.exe" `
74- -ArgumentList "/INSTALL /VERYSILENT /SUPPRESSMSGBOXES" -Wait
75-
76- echo "C:/rtools45-aarch64/usr/bin;C:/rtools45-aarch64/aarch64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
77- echo "C:\Program Files\R-aarch64\R-4.5.0\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
78- Remove-Item -Path "R-4.5.0-aarch64.exe"
79- Remove-Item -Path "rtools45-aarch64.exe"
80-
81- - name : Install pak on Windows ARM
82- if : matrix.config.os == 'windows-11-arm'
83- run : |
84- libsdir <- file.path(Sys.getenv("TMP"), "Library")
85- dir.create(libsdir, recursive = TRUE, showWarnings = FALSE)
86- cat(sprintf("R_LIB_FOR_PAK=%s\n", libsdir), file = Sys.getenv("GITHUB_ENV"), append = TRUE)
87- cat(sprintf("R_LIBS_USER=%s\n", libsdir), file = Sys.getenv("GITHUB_ENV"), append = TRUE)
88- install.packages("pak", lib = libsdir,
89- repos = c("https://r-lib.r-universe.dev", "https://cloud.r-project.org"),
90- Ncpus = 4);
91- shell : Rscript {0}
92-
9360 - uses : r-lib/actions/setup-r-dependencies@v2
9461 with :
95- extra-packages : any::rcmdcheck
62+ extra-packages : any::rcmdcheck ${{ matrix.config.os == 'wasm' && 'github::r-wasm/rwasm' || '' }}
9663 needs : check
97- pak-version : ${{ matrix.config.os == 'windows-11-arm' && 'none' || 'stable' }}
9864
9965 - uses : r-lib/actions/check-r-package@v2
66+ if : matrix.config.os != 'wasm'
10067 with :
10168 upload-snapshots : true
10269 check-dir : ' "check"'
70+
71+ - name : Check WASM build
72+ if : matrix.config.os == 'wasm'
73+ run : |
74+ rwasm::build("local::.")
75+ shell : Rscript {0}
0 commit comments