Skip to content

Add LinearRegression demo #13

Add LinearRegression demo

Add LinearRegression demo #13

name: R submit on CRAN
on:
push:
pull_request:
schedule:
- cron: '0 2 * * SAT'
env:
PACKAGE_NAME: libkrigingtemplate
jobs:
release:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
rtools-version: '43'
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache: false
- name: setup for CRAN
shell: bash
run: |
Rscript --no-save ./tools/install_packages.R pkgbuild roxygen2
Rscript -e "remove.packages('roxygen2')"
- name: R CMD build
shell: bash
env:
OS: ${{ matrix.os }}
run: |
R CMD build .
mkdir CRAN-$OS
mv ${{ env.PACKAGE_NAME }}_*.* CRAN-$OS/.
- name: R CMD check
shell: bash
env:
OS: ${{ matrix.os }}
run: |
R CMD check --as-cran --no-manual CRAN-$OS/${{ env.PACKAGE_NAME }}* || (
test -f ${{ env.PACKAGE_NAME }}.Rcheck/00install.out && cat ${{ env.PACKAGE_NAME }}.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 }}