Skip to content

Commit 3fc3254

Browse files
authored
Merge pull request #1958 from cmu-delphi/backfillCI_fix
first attempt at fixing broken backfill build
2 parents 16a2128 + 3022a90 commit 3fc3254

File tree

3 files changed

+20
-44
lines changed

3 files changed

+20
-44
lines changed

.github/workflows/backfill-corr-ci.yml

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,57 +10,37 @@ name: R backfill corrections
1010

1111
on:
1212
push:
13-
branches: [ main, prod ]
13+
branches: [main, prod]
1414
pull_request:
15-
types: [ opened, synchronize, reopened, ready_for_review ]
16-
branches: [ main, prod ]
15+
types: [opened, synchronize, reopened, ready_for_review]
16+
branches: [main, prod]
1717

1818
jobs:
1919
build:
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-latest
2121
if: github.event.pull_request.draft == false
22-
strategy:
23-
matrix:
24-
r-version: [4.2.1]
2522
defaults:
2623
run:
2724
working-directory: backfill_corrections/delphiBackfillCorrection
2825

2926
steps:
30-
- uses: actions/checkout@v2
31-
- name: Set up R ${{ matrix.r-version }}
27+
- uses: actions/checkout@v4
28+
29+
- name: Set up R 4.2
3230
uses: r-lib/actions/setup-r@v2
3331
with:
34-
r-version: ${{ matrix.r-version }}
3532
use-public-rspm: true
36-
- name: Install linux dependencies
37-
run: |
38-
sudo apt-get install \
39-
libcurl4-openssl-dev \
40-
libgdal-dev \
41-
libudunits2-dev \
42-
libglpk-dev \
43-
libharfbuzz-dev \
44-
libfribidi-dev
45-
- name: Get date
46-
id: get-date
47-
run: |
48-
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
49-
- name: Cache R packages
50-
uses: actions/cache@v2
51-
with:
52-
path: ${{ env.R_LIBS_USER }}
53-
key: ${{ runner.os }}-r-backfillcorr-${{ steps.get-date.outputs.date }}
54-
restore-keys: |
55-
${{ runner.os }}-r-backfillcorr-
33+
r-version: 4.2
34+
5635
- name: Install and cache dependencies
5736
env:
5837
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5938
uses: r-lib/actions/setup-r-dependencies@v2
6039
with:
6140
extra-packages: any::rcmdcheck
6241
working-directory: backfill_corrections/delphiBackfillCorrection
63-
upgrade: 'TRUE'
42+
upgrade: "TRUE"
43+
6444
- name: Check package
6545
uses: r-lib/actions/check-r-package@v2
6646
with:

.github/workflows/build-container-images.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ name: Build indicator container images and upload to registry
22

33
on:
44
push:
5-
branches: [ main, prod ]
5+
branches: [main, prod]
6+
workflow_dispatch:
67

78
jobs:
89
build:
910
runs-on: ubuntu-latest
1011
strategy:
1112
matrix:
12-
packages: [ backfill_corrections ]
13+
packages: [backfill_corrections]
1314
steps:
1415
- name: Checkout code
1516
uses: actions/checkout@v2

backfill_corrections/Dockerfile

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM gurobi/optimizer:9.5.1 as gurobi
22

33
## Install R and tidyverse
4-
FROM rocker/tidyverse:latest
4+
FROM rocker/tidyverse:4.2
55

66
WORKDIR /opt/gurobi
77
COPY --from=gurobi /opt/gurobi .
@@ -15,22 +15,17 @@ ENV LD_LIBRARY_PATH $GUROBI_HOME/lib
1515
RUN ln -s -f /usr/share/zoneinfo/America/New_York /etc/localtime
1616

1717
RUN apt-get update && apt-get install -qq -y \
18-
libglpk-dev\
18+
apt-file \
1919
python3-venv \
2020
python3-dev \
2121
python3-pip
2222

23-
RUN install2.r --error \
24-
roxygen2 \
25-
Rglpk \
26-
argparser
27-
23+
RUN R -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
24+
RUN R -e 'install.packages(c("rspm"))'
2825
RUN --mount=type=secret,id=GITHUB_TOKEN \
2926
export GITHUB_PAT="$(cat /run/secrets/GITHUB_TOKEN)" && \
30-
R -e 'devtools::install_version("bettermc", version = "1.1.2")' && \
31-
R -e 'devtools::install_github("cmu-delphi/covidcast", ref = "evalcast", subdir = "R-packages/evalcast")' && \
32-
R -e 'devtools::install_github(repo="ryantibs/quantgen", subdir="quantgen")' && \
33-
R -e 'install.packages(list.files(path="/opt/gurobi/linux64/R/", pattern="^gurobi_.*[.]tar[.]gz$", full.names = TRUE), repos=NULL)'
27+
R -e 'rspm::enable(); pak::pkg_install(c("roxygen2", "Rglpk", "argparser", "gfkse/[email protected]", "cmu-delphi/covidcast/R-packages/evalcast@evalcast", "ryantibs/quantgen/quantgen"))'
28+
RUN R -e 'install.packages(list.files(path="/opt/gurobi/linux64/R/", pattern="^gurobi_.*[.]tar[.]gz$", full.names = TRUE), repos=NULL)'
3429

3530
WORKDIR /backfill_corrections/
3631
ADD ./delphiBackfillCorrection ./delphiBackfillCorrection/

0 commit comments

Comments
 (0)