-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (19 loc) · 686 Bytes
/
Makefile
File metadata and controls
24 lines (19 loc) · 686 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
IMAGE_NAME=bayesmallows-check-env
PLATFORM=linux/amd64
VOL=-v "$(shell pwd)":/workdir
WORKDIR=-w /workdir
.PHONY: build-env check-debian shell clean
# 1. Build the environment (run this when DESCRIPTION changes)
build-env:
docker build --platform $(PLATFORM) -t $(IMAGE_NAME) .
# 2. Run the check (fast, uses cached dependencies)
check-debian:
docker run --rm $(VOL) $(WORKDIR) --platform $(PLATFORM) $(IMAGE_NAME) \
bash -c "R CMD build . && R CMD check --as-cran BayesMallowsSMC2_*.tar.gz"
# 3. Debugging shell
shell:
docker run --rm -it $(VOL) $(WORKDIR) --platform $(PLATFORM) $(IMAGE_NAME) /bin/bash
# 4. Clean up check artifacts
clean:
rm -rf *.Rcheck/
rm -f *.tar.gz