File: debian-clang.dockerfile

package info (click to toggle)
r-cran-s2 1.1.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,540 kB
  • sloc: cpp: 124,506; ansic: 2,639; pascal: 1,495; python: 354; sh: 139; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 818 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

ARG IMAGE=debian:testing

FROM ${IMAGE}

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
    r-base cmake libcurl4-openssl-dev libssl-dev clang-19

# Not all versions of ubuntu/debian have libabsl-dev
RUN apt-get install -y libabsl-dev || true

# Make sure we can use all cores to install things
RUN mkdir ~/.R && echo "MAKEFLAGS = -j$(nproc)" > ~/.R/Makevars

# Use clang if that's what we're up to. Probably not complete
# (e.g., doesn't consider C++11 or 14 or 20 or 23 compilers)
RUN echo "CC=clang-19" >> ~/.R/Makevars
RUN echo "CXX=clang++-19" >> ~/.R/Makevars
RUN echo "CXX17=clang++-19" >> ~/.R/Makevars

RUN R -e 'install.packages(c("wk", "bit64", "Rcpp", "testthat"), repos = "https://cloud.r-project.org")'

CMD R CMD INSTALL /s2 --preclean && R -e 'testthat::test_local("/s2")'