Skip to content

Commit

Permalink
add compose setup
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Oct 10, 2024
1 parent 3383f4f commit d21c2a8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
^tools/dist$
^compile_commands\.json$
^\.cache$
^docker-compose\.yml$
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
services:
ubuntu-focal:
build:
context: .
dockerfile: tools/docker/ubuntu-focal.dockerfile
volumes:
- .:/s2
command: bash
2 changes: 2 additions & 0 deletions tests/testthat/test-s2-cell.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ test_that("s2_cell class works", {
})

test_that("s2_cell bit64::integer64 support works", {
skip_if_not_installed("bit64")

cells <- c(as_s2_cell(NA_character_), s2_cell_sentinel())
int64s <- bit64::as.integer64(cells)
expect_identical(int64s, bit64::as.integer64(c(NA, -1)))
Expand Down
12 changes: 12 additions & 0 deletions tools/docker/ubuntu-focal.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

FROM ubuntu:focal

ENV TZ=UTC
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
r-base cmake \
libudunits2-dev libgdal-dev libgeos-dev libproj-dev \
libcurl4-openssl-dev libssl-dev

# Make sure we can use all cores to install things
RUN mkdir ~/.R && echo "MAKEFLAGS = -j$(nproc)" > ~/.R/Makevars
RUN R -e 'install.packages(c("wk", "Rcpp", "testthat"), repos = "https://cloud.r-project.org")'

0 comments on commit d21c2a8

Please sign in to comment.