File tree 3 files changed +30
-4
lines changed
3 files changed +30
-4
lines changed Original file line number Diff line number Diff line change 44
44
extra-packages : any::rcmdcheck
45
45
needs : check
46
46
47
+ - name : Setup .Renviron for testing
48
+ run : |
49
+ echo OPENMPP_LOCAL_URL=http://localhost:4040 >> ~/.Renviron
50
+ shell : bash
51
+
47
52
- uses : r-lib/actions/check-r-package@v2
48
53
with :
49
- args : ' c("--no-manual", "--as-cran", "--no-tests" )'
54
+ args : ' c("--no-manual", "--as-cran")'
50
55
upload-snapshots : true
Original file line number Diff line number Diff line change 1
1
local_initiate_oms <- function (path ) {
2
+ cmd <- if (Sys.info()[' sysname' ] == ' Windows' ) ' ./bin/oms.exe' else ' ./bin/oms'
2
3
pid <-
3
4
withr :: with_dir(
4
5
new = path ,
5
- code = sys :: exec_background(cmd = ' ./bin/oms ' , std_out = FALSE )
6
+ code = sys :: exec_background(cmd = cmd , std_out = FALSE )
6
7
)
7
8
Sys.sleep(0.5 )
8
9
withr :: defer_parent(tools :: pskill(pid ))
Original file line number Diff line number Diff line change 1
1
local_install_openmpp <- function () {
2
- url <- ' https://github.com/openmpp/main/releases/latest/download/openmpp_mac_arm64_20241226.tar.gz'
2
+ info <- Sys.info()
3
+ os <- info [' sysname' ]
4
+ type <- info [' machine' ]
5
+
6
+ if (os == ' Darwin' & type == ' arm64' ) {
7
+ url <- ' https://github.com/openmpp/main/releases/latest/download/openmpp_mac_arm64_20241226.tar.gz'
8
+ } else if (os == ' Darwin' & type == ' intel' ) {
9
+ url <- ' https://github.com/openmpp/main/releases/latest/download/openmpp_mac_x86_64_20241226.tar.gz'
10
+ } else if (os == ' Linux' ) {
11
+ url <- ' https://github.com/openmpp/main/releases/latest/download/openmpp_debian_20241226.tar.gz'
12
+ } else if (os == ' Windows' ) {
13
+ url <- ' https://github.com/openmpp/main/releases/latest/download/openmpp_win_20241226.zip'
14
+ } else {
15
+ rlang :: abort(' No compatible OS detected.' )
16
+ }
3
17
file <- basename(url )
4
18
dir <- tempdir()
5
19
path <- paste0(dir , ' /' , file )
6
20
download.file(url , path , quiet = TRUE )
7
- untar(path , exdir = dir )
21
+
22
+ if (os == ' Windows' ) {
23
+ unzip(path , exdir = dir )
24
+ } else {
25
+ untar(path , exdir = dir )
26
+ }
27
+
8
28
unlink(path )
9
29
new_path <- tools :: file_path_sans_ext(path , compression = TRUE )
10
30
new_path
You can’t perform that action at this time.
0 commit comments