Skip to content

submit-CRAN

submit-CRAN #285

name: submit-CRAN
on:
push:
pull_request:
schedule:
- cron: '0 2 * * SAT'
env:
DEBUG_CI: true
jobs:
release:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
rtools-version: '42'
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: false
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.24.x'
- name: setup for CRAN
shell: bash
run: |
Rscript --no-save ./tools/install_packages.R pkgbuild roxygen2
./tools/setup.sh
Rscript -e "remove.packages('roxygen2')"
- name: R CMD build
shell: bash
env: # this alias helps to reuse following line as script
OS: ${{ matrix.os }}
run: |
pushd ..
R CMD build rlibkriging
mkdir rlibkriging/CRAN-$OS
mv rlibkriging_*.* rlibkriging/CRAN-$OS/.
popd
- name: R CMD check
shell: bash
env:
OS: ${{ matrix.os }}
run: |
R CMD check --as-cran --no-manual CRAN-$OS/rlibkriging* || (
test -f rlibkriging.Rcheck/00install.out && cat rlibkriging.Rcheck/00install.out | sed -e 's/^/00install.out| /' && echo "[The error may be shown before 00install.out| listing";
exit 1
)
- uses: actions/upload-artifact@v2
with:
path: ./CRAN-*
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./CRAN-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}