Release 2.9-1 #91
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: R-CMD-check | |
jobs: | |
R-CMD-check: | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (${{ matrix.config.r }}-${{ matrix.config.arch }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: windows-latest, r: 'devel', arch: 'base', http-user-agent: 'release', rtools: ''} | |
# R-4.0.0 uses Rtools40 (based on msys2). | |
- {os: windows-latest, r: '4.0.0', arch: '64', rtools: '40'} | |
- {os: windows-latest, r: '4.0.0', arch: '32', rtools: '40'} | |
# R>=4.2 uses Rtools42 or later (based on MXE, 64-bit only). | |
- {os: windows-latest, r: '4.2.0', arch: 'base', rtools: '42'} | |
- {os: ubuntu-latest, r: '3.0.0', arch: 'base'} | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
R_KEEP_PKG_SOURCE: yes | |
steps: | |
- name: Configure git | |
run: git config --global core.autocrlf false | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
rtools-version: ${{ matrix.config.rtools }} | |
http-user-agent: ${{ matrix.config.http-user-agent }} | |
use-public-rspm: true | |
- name: Install macOS dependencies | |
if: runner.os == 'macOS' | |
run : | | |
brew install automake netcdf udunits | |
- name: Install Linux dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get install -y libnetcdf-dev libudunits2-dev | |
- name: Install Windows RTools40 dependencies | |
if: runner.os == 'Windows' && matrix.config.rtools == '40' | |
run: | | |
pacman -Sy | |
if test "${{ matrix.config.arch }}" = 32 ; then | |
arch=i686 | |
else | |
arch=x86_64 | |
fi | |
pacman -S --noconfirm mingw-w64-${arch}-{netcdf,udunits} | |
shell: sh | |
# Avoid R package dependencies by using a simple test script: | |
- name: Check RNetCDF | |
env: | |
_R_CHECK_FORCE_SUGGESTS_: false | |
run: | | |
echo ::group::Build RNetCDF | |
R CMD build . | |
echo ::endgroup:: | |
echo ::group::Check RNetCDF | |
if test "${{ matrix.config.arch }}" != "base" ; then | |
R --arch "${{ matrix.config.arch }}" CMD check --no-manual RNetCDF_*.*-*.tar.gz | |
else | |
R CMD check --no-manual RNetCDF_*.*-*.tar.gz | |
fi | |
echo ::endgroup:: | |
shell: sh | |
- name: Upload check directory | |
if: success() || failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.config.os }}_r-${{ matrix.config.r }}-${{ matrix.config.arch }}_check | |
path: RNetCDF.Rcheck/ | |
retention-days: 5 | |