From 0e96fa7cc072631387b3ff2324d5fe328857fdbb Mon Sep 17 00:00:00 2001 From: Krzysztof Dyba <35004826+kadyb@users.noreply.github.com> Date: Sat, 17 Feb 2024 22:14:38 +0100 Subject: [PATCH 1/9] create rcmdcheck workflow --- .github/workflows/rcmdcheck.yml | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/rcmdcheck.yml diff --git a/.github/workflows/rcmdcheck.yml b/.github/workflows/rcmdcheck.yml new file mode 100644 index 0000000..02d2bcb --- /dev/null +++ b/.github/workflows/rcmdcheck.yml @@ -0,0 +1,48 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: rcmdcheck + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true From 88aea90a093b62ecc18e57f61d96563e865259c2 Mon Sep 17 00:00:00 2001 From: Krzysztof Dyba <35004826+kadyb@users.noreply.github.com> Date: Sat, 17 Feb 2024 22:23:46 +0100 Subject: [PATCH 2/9] add TinyTeX --- .github/workflows/rcmdcheck.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rcmdcheck.yml b/.github/workflows/rcmdcheck.yml index 02d2bcb..4afb81c 100644 --- a/.github/workflows/rcmdcheck.yml +++ b/.github/workflows/rcmdcheck.yml @@ -30,6 +30,8 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: r-lib/actions/setup-tinytex@v2 + - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 From b8aa83ac6c0672153f2c8b91f2f2f888b2d5c279 Mon Sep 17 00:00:00 2001 From: Krzysztof Dyba <35004826+kadyb@users.noreply.github.com> Date: Sat, 17 Feb 2024 22:36:02 +0100 Subject: [PATCH 3/9] install LaTeX packages --- .github/workflows/rcmdcheck.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rcmdcheck.yml b/.github/workflows/rcmdcheck.yml index 4afb81c..5cccb95 100644 --- a/.github/workflows/rcmdcheck.yml +++ b/.github/workflows/rcmdcheck.yml @@ -32,6 +32,9 @@ jobs: - uses: r-lib/actions/setup-tinytex@v2 + - name: Install additional LaTeX packages + run: tlmgr install grfext multirow + - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 From ea99cd0d3a1d033e939916d6d9b2986736fa57d1 Mon Sep 17 00:00:00 2001 From: Krzysztof Dyba <35004826+kadyb@users.noreply.github.com> Date: Sat, 17 Feb 2024 22:43:11 +0100 Subject: [PATCH 4/9] add LaTeX package --- .github/workflows/rcmdcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rcmdcheck.yml b/.github/workflows/rcmdcheck.yml index 5cccb95..7149f75 100644 --- a/.github/workflows/rcmdcheck.yml +++ b/.github/workflows/rcmdcheck.yml @@ -33,7 +33,7 @@ jobs: - uses: r-lib/actions/setup-tinytex@v2 - name: Install additional LaTeX packages - run: tlmgr install grfext multirow + run: tlmgr install grfext multirow caption - uses: r-lib/actions/setup-pandoc@v2 From 802e1db9fe11bbaec4bac37de5cd73c1999f1cd4 Mon Sep 17 00:00:00 2001 From: Krzysztof Dyba <35004826+kadyb@users.noreply.github.com> Date: Sat, 17 Feb 2024 22:49:45 +0100 Subject: [PATCH 5/9] add LaTeX package --- .github/workflows/rcmdcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rcmdcheck.yml b/.github/workflows/rcmdcheck.yml index 7149f75..018bc31 100644 --- a/.github/workflows/rcmdcheck.yml +++ b/.github/workflows/rcmdcheck.yml @@ -33,7 +33,7 @@ jobs: - uses: r-lib/actions/setup-tinytex@v2 - name: Install additional LaTeX packages - run: tlmgr install grfext multirow caption + run: tlmgr install grfext multirow caption setspace - uses: r-lib/actions/setup-pandoc@v2 From 6c9dc51700284dfe1bb9ccfc1782e423a1ac6741 Mon Sep 17 00:00:00 2001 From: Krzysztof Dyba <35004826+kadyb@users.noreply.github.com> Date: Sat, 17 Feb 2024 23:19:34 +0100 Subject: [PATCH 6/9] Delete .github/workflows/tic.yml --- .github/workflows/tic.yml | 145 -------------------------------------- 1 file changed, 145 deletions(-) delete mode 100644 .github/workflows/tic.yml diff --git a/.github/workflows/tic.yml b/.github/workflows/tic.yml deleted file mode 100644 index 6fb12a2..0000000 --- a/.github/workflows/tic.yml +++ /dev/null @@ -1,145 +0,0 @@ -## tic GitHub Actions template: linux-macos-windows-deploy -## revision date: 2020-12-11 -on: - workflow_dispatch: - push: - pull_request: - # for now, CRON jobs only run on the default branch of the repo (i.e. usually on master) - schedule: - # * is a special character in YAML so you have to quote this string - - cron: "0 4 * * *" - -name: tic - -jobs: - all: - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: false - matrix: - config: - # use a different tic template type if you do not want to build on all listed platforms - - { os: windows-latest, r: "release" } - - { os: macOS-latest, r: "release", pkgdown: "true", latex: "true" } - - { os: ubuntu-latest, r: "devel", latex: "true" } - - { os: ubuntu-latest, r: "release", latex: "true" } - - env: - # otherwise remotes::fun() errors cause the build to fail. Example: Unavailability of binaries - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - CRAN: ${{ matrix.config.cran }} - # make sure to run `tic::use_ghactions_deploy()` to set up deployment - TIC_DEPLOY_KEY: ${{ secrets.TIC_DEPLOY_KEY }} - # prevent rgl issues because no X11 display is available - RGL_USE_NULL: true - # if you use bookdown or blogdown, replace "PKGDOWN" by the respective - # capitalized term. This also might need to be done in tic.R - BUILD_PKGDOWN: ${{ matrix.config.pkgdown }} - # macOS >= 10.15.4 linking - SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk - # use GITHUB_TOKEN from GitHub to workaround rate limits in {remotes} - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - - steps: - - uses: actions/checkout@v3 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - Ncpus: 4 - rtools-version: '42' - - # LaTeX. Installation time: - # Linux: ~ 1 min - # macOS: ~ 1 min 30s - # Windows: never finishes - - uses: r-lib/actions/setup-tinytex@v2 - if: matrix.config.latex == 'true' - - - uses: r-lib/actions/setup-pandoc@v2 - - # set date/week for use in cache creation - # https://github.community/t5/GitHub-Actions/How-to-set-and-access-a-Workflow-variable/m-p/42970 - # - cache R packages daily - - name: "[Cache] Prepare daily timestamp for cache" - if: runner.os != 'Windows' - id: date - run: echo "::set-output name=date::$(date '+%d-%m')" - - - name: "[Cache] Cache R packages" - if: runner.os != 'Windows' - uses: pat-s/always-upload-cache@v2.1.3 - with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{steps.date.outputs.date}} - restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-${{steps.date.outputs.date}} - - # for some strange Windows reason this step and the next one need to be decoupled - - name: "[Stage] Prepare" - run: | - Rscript -e "if (!requireNamespace('remotes')) install.packages('remotes', type = 'source')" - Rscript -e "if (getRversion() < '3.2' && !requireNamespace('curl')) install.packages('curl', type = 'source')" - - - name: "[Custom block] [Linux] Install spatial libraries" - if: runner.os == 'Linux' - run: sudo apt-get install libgdal-dev libproj-dev libgeos-dev libudunits2-dev - - - name: "[Custom block] [macOS] Install spatial libraries" - if: runner.os == 'macOS' - run: | - # conflicts with gfortran from r-lib/actions when linking gcc - #rm '/usr/local/bin/gfortran' - brew install pkg-config gdal proj geos - - - name: "[Stage] [Linux] Install curl and libgit2" - if: runner.os == 'Linux' - run: sudo apt install libcurl4-openssl-dev libgit2-dev texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra - - - name: "[Stage] [macOS] Install libgit2" - if: runner.os == 'macOS' - run: brew install libgit2 - - - name: "[Stage] [macOS] Install system libs for pkgdown" - if: runner.os == 'macOS' && matrix.config.pkgdown != '' - run: brew install harfbuzz fribidi - - - name: "[Stage] [Linux] Install system libs for pkgdown" - if: runner.os == 'Linux' && matrix.config.pkgdown != '' - run: sudo apt install libharfbuzz-dev libfribidi-dev - - - name: "[Stage] Install" - if: matrix.config.os != 'macOS-latest' || matrix.config.r != 'devel' - run: Rscript -e "remotes::install_github('ropensci/tic')" -e "print(tic::dsl_load())" -e "tic::prepare_all_stages()" -e "tic::before_install()" -e "tic::install()" - - # macOS devel needs its own stage because we need to work with an option to suppress the usage of binaries - - name: "[Stage] Prepare & Install (macOS-devel)" - if: matrix.config.os == 'macOS-latest' && matrix.config.r == 'devel' - run: | - echo -e 'options(Ncpus = 4, pkgType = "source", repos = structure(c(CRAN = "https://cloud.r-project.org/")))' > $HOME/.Rprofile - Rscript -e "remotes::install_github('ropensci/tic')" -e "print(tic::dsl_load())" -e "tic::prepare_all_stages()" -e "tic::before_install()" -e "tic::install()" - - - name: "[Stage] Script" - run: Rscript -e 'tic::script()' - - - name: "[Stage] After Success" - if: matrix.config.os == 'macOS-latest' && matrix.config.r == 'release' - run: Rscript -e "tic::after_success()" - - - name: "[Stage] Upload R CMD check artifacts" - if: failure() - uses: actions/upload-artifact@v2.2.1 - with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check - - name: "[Stage] Before Deploy" - run: | - Rscript -e "tic::before_deploy()" - - - name: "[Stage] Deploy" - run: Rscript -e "tic::deploy()" - - - name: "[Stage] After Deploy" - run: Rscript -e "tic::after_deploy()" From 84ebcfa901b3a1e6bdcc3a91da212ca3742b1248 Mon Sep 17 00:00:00 2001 From: Krzysztof Dyba <35004826+kadyb@users.noreply.github.com> Date: Sat, 17 Feb 2024 23:19:51 +0100 Subject: [PATCH 7/9] Delete tic.R --- tic.R | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 tic.R diff --git a/tic.R b/tic.R deleted file mode 100644 index 492701d..0000000 --- a/tic.R +++ /dev/null @@ -1,8 +0,0 @@ -# installs dependencies, runs R CMD check, runs covr::codecov() -do_package_checks() - -if (ci_on_ghactions() && ci_has_env("BUILD_PKGDOWN")) { - # creates pkgdown site and pushes to gh-pages branch - # only for the runner with the "BUILD_PKGDOWN" env var set - do_pkgdown() -} From 54893cf49b0b50d33bbe54f4477e4624923eb710 Mon Sep 17 00:00:00 2001 From: Krzysztof Dyba <35004826+kadyb@users.noreply.github.com> Date: Sat, 17 Feb 2024 23:20:14 +0100 Subject: [PATCH 8/9] Delete .travis.yml --- .travis.yml | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1ae24cf..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: r -sudo: required -dist: trusty -cache: -# - packages - - ccache - -r: - - release - - devel - - oldrel - -addons: - apt: - sources: - - sourceline: 'ppa:ubuntugis/ubuntugis-unstable' - packages: - - devscripts # checkbashisms - - libgdal-dev - - libproj-dev - - libgeos-dev - - libudunits2-dev - - libnetcdf-dev - - netcdf-bin From f28cc89d86e96becc0f74a3fdf70569846902330 Mon Sep 17 00:00:00 2001 From: Krzysztof Dyba <35004826+kadyb@users.noreply.github.com> Date: Sat, 17 Feb 2024 23:27:30 +0100 Subject: [PATCH 9/9] update badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 06a4ff8..c9e3867 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ gstat ===== -[![R-CMD-check](https://github.com/r-spatial/gstat/workflows/tic/badge.svg)](https://github.com/r-spatial/gstat/actions) +[![R-CMD-check](https://github.com/r-spatial/gstat/workflows/rcmdcheck.yml/badge.svg)](https://github.com/r-spatial/gstat/actions/workflows/rcmdcheck.yml) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/r-spatial/gstat?branch=master&svg=true)](https://ci.appveyor.com/project/edzerpebesma/gstat) [![License](http://img.shields.io/badge/license-GPL%20%28%3E=%202%29-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html) [![CRAN](http://www.r-pkg.org/badges/version/gstat)](https://cran.r-project.org/package=gstat)