Skip to content

Commit

Permalink
Harmonize
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Apr 20, 2021
1 parent 154cae2 commit 0a50420
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 19 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/R-CMD-check-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ jobs:
_R_CHECK_SYSTEM_CLOCK_: false
_R_CHECK_FUTURE_FILE_TIMESTAMPS_: false
run: |
options(crayon.enabled = TRUE)
error_on <- "note"
# Begin custom: rcmdcheck error_on
# End custom: rcmdcheck error_on
Expand All @@ -285,7 +286,8 @@ jobs:

- name: Show test output
if: always()
run: find check -name '*.Rout*' -exec head -n 1000000 '{}' \; || true
run: |
find check -name '*.Rout*' -exec head -n 1000000 '{}' \; || true
shell: bash

- name: Upload check results
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ jobs:
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "${{matrix.config.os-version}}"))')
- name: Add fake qpdf and checkbashisms
if: runner.os == 'Linux'
run: |
sudo ln -s $(which true) /usr/local/bin/qpdf
sudo ln -s $(which true) /usr/local/bin/checkbashisms
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE, type = .Platform$pkgType)
Expand Down
44 changes: 27 additions & 17 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
# Begin custom: services
# End custom: services
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# prevent rgl issues because no X11 display is available
Expand All @@ -40,6 +41,24 @@ jobs:

- uses: actions/checkout@v2

- name: Install pkgdown sysdeps
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
# Needed because of install-r: false
sudo apt-get update
# For some reason harfbuzz and gert are installed from source and needs this
sudo apt-get install -y libharfbuzz-dev libfribidi-dev libgit2-dev
- name: Configure Git identity
if: github.event_name == 'push'
run: |
env | sort
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
shell: bash

# Begin custom: before install
# End custom: before install

Expand All @@ -56,42 +75,33 @@ jobs:
shell: Rscript {0}

- name: Query dependencies
if: runner.os != 'Windows'
run: |
saveRDS(remotes::dev_package_deps(dependencies = TRUE, type = .Platform$pkgType), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Restore R package cache
if: runner.os != 'Windows'
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Configure Git identity
if: github.event_name == 'push'
run: |
env | sort
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
shell: bash

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'req <- remotes::system_requirements("ubuntu", "18.04"); if (length(req) > 0) cat(req, sep = "\n")')
- name: Install pkgdown sysdeps
- name: Add fake qpdf and checkbashisms
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
# For some reason harfbuzz and gert are installed from source and needs this
sudo apt-get install -y libharfbuzz-dev libfribidi-dev libgit2-dev
sudo ln -s $(which true) /usr/local/bin/qpdf
sudo ln -s $(which true) /usr/local/bin/checkbashisms
- name: Install dependencies
run: |
Expand All @@ -105,9 +115,6 @@ jobs:
# Begin custom: install
# End custom: install

- name: Install package
run: R CMD INSTALL . --with-keep.source --with-keep.parse.data

- name: Session info
run: |
options(width = 100)
Expand All @@ -119,6 +126,9 @@ jobs:
# Begin custom: after install
# End custom: after install

- name: Install package
run: R CMD INSTALL . --with-keep.source --with-keep.parse.data

- name: Deploy package
if: github.event_name == 'push'
run: |
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
# Begin custom: services
# End custom: services
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# prevent rgl issues because no X11 display is available
Expand Down Expand Up @@ -47,13 +48,15 @@ jobs:
if (!requireNamespace("remotes", quietly = TRUE)) install.packages("remotes")
shell: Rscript {0}

- name: Prepare cache keys
- name: Query dependencies
if: runner.os != 'Windows'
run: |
saveRDS(remotes::dev_package_deps(dependencies = TRUE, type = .Platform$pkgType), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Restore R package cache
if: runner.os != 'Windows'
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
Expand All @@ -68,6 +71,12 @@ jobs:
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "18.04"))')
- name: Add fake qpdf and checkbashisms
if: runner.os == 'Linux'
run: |
sudo ln -s $(which true) /usr/local/bin/qpdf
sudo ln -s $(which true) /usr/local/bin/checkbashisms
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE, type = .Platform$pkgType)
Expand Down

0 comments on commit 0a50420

Please sign in to comment.