Skip to content

Commit fecf31d

Browse files
committed
Cleanup after build
1 parent d8febbf commit fecf31d

6 files changed

Lines changed: 22 additions & 16 deletions

File tree

.github/workflows/R-CMD-check.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
config:
1919
- {os: macos-13, r: 'release'}
2020
- {os: macos-14, r: 'release'}
21+
- {os: macos-15, r: 'next'}
22+
- {os: windows-latest, r: 'devel'}
2123
- {os: windows-latest, r: 'release'}
2224
- {os: windows-latest, r: '4.3'}
2325
- {os: windows-latest, r: '4.2'}
@@ -49,3 +51,5 @@ jobs:
4951
- uses: r-lib/actions/check-r-package@v2
5052
with:
5153
upload-snapshots: true
54+
env:
55+
MAKEFLAGS: -j4

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: gert
33
Title: Simple Git Client for R
4-
Version: 2.1.4.9000
4+
Version: 2.1.5
55
Authors@R: c(
66
person("Jeroen", "Ooms", role = c("aut", "cre"), email = "jeroenooms@gmail.com",
77
comment = c(ORCID = "0000-0002-4035-0289")),

gert.Rproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: 0fe17c47-2765-498f-b96f-5b0595ce54aa
23

34
RestoreWorkspace: Default
45
SaveWorkspace: Default

src/Makevars.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PKG_CFLAGS = $(C_VISIBILITY)
22
PKG_CPPFLAGS = @cflags@ -DR_NO_REMAP -DSTRICT_R_HEADERS
33
PKG_LIBS = @libs@
44

5-
all: clean
5+
all: $(SHLIB) cleanup
66

7-
clean:
8-
rm -f $(SHLIB) $(OBJECTS)
7+
cleanup: $(SHLIB)
8+
@rm -Rf ../.deps

src/Makevars.win

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
RWINLIB = ../windows/libgit2
1+
RWINLIB = ../.deps/libgit2
22
TARGET = lib$(subst gcc,,$(COMPILED_BY))$(R_ARCH)
33

44
PKG_CPPFLAGS = -I$(RWINLIB)/include \
@@ -10,12 +10,13 @@ PKG_LIBS = \
1010
-lgit2 -lssh2 -lssl -lcrypto -lz -liconv \
1111
-lwinhttp -lws2_32 -lcrypt32 -lole32 -lrpcrt4 -lsecur32
1212

13-
all: clean winlibs
13+
all: $(SHLIB) cleanup
1414

15-
winlibs:
16-
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R"
15+
# Needed for parallel make
16+
$(OBJECTS): | $(RWINLIB)
1717

18-
clean:
19-
rm -f $(SHLIB) $(OBJECTS)
18+
$(RWINLIB):
19+
@"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R"
2020

21-
.PHONY: all winlibs clean
21+
cleanup: $(SHLIB)
22+
@rm -Rf $(RWINLIB)

tools/winlibs.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
if(!file.exists("../windows/libgit2/include/git2.h")){
2-
unlink("../windows", recursive = TRUE)
1+
if(!file.exists('clone.o') && !file.exists("../.deps/libgit2/include/git2.h")){
2+
unlink("../.deps", recursive = TRUE)
33
url <- if(grepl("aarch", R.version$platform)){
44
"https://github.com/r-windows/bundles/releases/download/libgit2-1.7.2/libgit2-1.7.2-clang-aarch64.tar.xz"
55
} else if(grepl("clang", Sys.getenv('R_COMPILED_BY'))){
@@ -10,9 +10,9 @@ if(!file.exists("../windows/libgit2/include/git2.h")){
1010
"https://github.com/rwinlib/libgit2/archive/v1.7.1.tar.gz"
1111
}
1212
download.file(url, basename(url), quiet = TRUE)
13-
dir.create("../windows", showWarnings = FALSE)
14-
untar(basename(url), exdir = "../windows", tar = 'internal')
13+
dir.create("../.deps", showWarnings = FALSE)
14+
untar(basename(url), exdir = "../.deps", tar = 'internal')
1515
unlink(basename(url))
16-
setwd("../windows")
16+
setwd("../.deps")
1717
file.rename(list.files(), 'libgit2')
1818
}

0 commit comments

Comments
 (0)