Skip to content

Commit

Permalink
Fix CI build error during ./setup test (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
benfasoli authored Feb 3, 2023
1 parent 2f65f5f commit fc4dace
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 40 deletions.
43 changes: 34 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,56 @@ on:
branches:
- main

env:
R_LIBS_USER: .Rpackages

jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install dependencies
run: |
sudo apt-get update -yq
sudo apt-get install -yq --no-install-recommends \
libgfortran3 \
libhdf5-serial-dev \
libnetcdf-dev \
netcdf-bin \
unzip
- name: Install R
uses: r-lib/actions/setup-r@v1
build-essential \
git \
libgdal-dev \
libhdf5-serial-dev \
libnetcdf-dev \
libssl-dev \
libxml2-dev \
locales \
netcdf-bin \
procps \
r-base \
r-base-dev \
unzip \
wget
- name: Create R package install path
run: mkdir -p $R_LIBS_USER

- name: Install STILT
run: bash test/test_setup.sh

- name: Run batch simulation test
run: bash test/test_run_stilt.sh

- name: Run CLI test
run: bash test/test_stilt_cli.sh

- name: Run CLI column receptor test
run: bash test/test_stilt_cli.sh

- name: Run WRF test
run: bash test/test_wrf_converter.sh

- name: Install Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Test docker build
run: docker build -t stilt .
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ exe/xtrct_grid
exe/xtrct_time

# R history and environment
.Rpackages
.RData
.Rapp.history
.Rhistory
Expand Down
56 changes: 25 additions & 31 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,43 +40,37 @@
# ymx=40.95 \
# yres=0.01

FROM debian:stretch-slim
FROM debian:bullseye-slim

WORKDIR /app

COPY . /app

ENV TZ UTC
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
libhdf5-serial-dev \
libnetcdf-dev \
libssl-dev \
libxml2-dev \
locales \
netcdf-bin \
procps \
r-base \
r-base-dev \
unzip \
wget \
&& locale-gen en_US.UTF-8 \
&& update-locale \
&& bash setup 3 \
&& Rscript r/dependencies.r \
&& apt-get remove --purge -y \
build-essential \
git \
locales \
wget \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update -yq \
&& apt-get install -y --no-install-recommends \
build-essential \
git \
libgdal-dev \
libhdf5-serial-dev \
libnetcdf-dev \
libssl-dev \
libxml2-dev \
locales \
netcdf-bin \
procps \
r-base \
r-base-dev \
unzip \
wget \
&& locale-gen en_US.UTF-8 \
&& update-locale

COPY . /app

RUN bash setup 3
RUN Rscript r/dependencies.r

VOLUME ["/app/met", "/app/out"]

ENTRYPOINT ["/app/r/stilt_cli.r", \
"met_path=/app/met", \
"output_wd=/app/out"]
ENTRYPOINT ["/app/r/stilt_cli.r", "met_path=/app/met", "output_wd=/app/out"]

0 comments on commit fc4dace

Please sign in to comment.