diff --git a/.Rbuildignore b/.Rbuildignore index c1c1347..6adbc05 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -13,3 +13,4 @@ ^.*\.Rproj$ ^\.Rproj\.user$ ^\.travis\.yml$ +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/check-full.yaml b/.github/workflows/check-full.yaml new file mode 100644 index 0000000..6faae3f --- /dev/null +++ b/.github/workflows/check-full.yaml @@ -0,0 +1,58 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +# +# NOTE: This workflow is overkill for most R packages and +# check-standard.yaml is likely a better choice. +# usethis::use_github_action("check-standard") will install it. +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 }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macOS-latest, r: 'release'} + + - {os: windows-latest, r: 'release'} + # Use 3.6 to trigger usage of RTools35 + - {os: windows-latest, r: '3.6'} + + # Use older ubuntu to maximise backward compatibility + - {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-18.04, r: 'release'} + - {os: ubuntu-18.04, r: 'oldrel-1'} + - {os: ubuntu-18.04, r: 'oldrel-2'} + - {os: ubuntu-18.04, r: 'oldrel-3'} + - {os: ubuntu-18.04, r: 'oldrel-4'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-pandoc@v1 + + - uses: r-lib/actions/setup-r@v1 + 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@v1 + with: + extra-packages: rcmdcheck + + - uses: r-lib/actions/check-r-package@v1 diff --git a/README.md b/README.md index 07ff957..752bd33 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -[![Travis-CI Build Status](https://travis-ci.org/nlmixrdevelopment/PreciseSums.svg?branch=master)](https://travis-ci.org/nlmixrdevelopment/PreciseSums) -[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/mattfidler/PreciseSums?branch=master&svg=true)](https://ci.appveyor.com/project/mattfidler/PreciseSums) + [![R-CMD-check](https://github.com/nlmixr2/PreciseSums/workflows/R-CMD-check/badge.svg)](https://github.com/nlmixr2/PreciseSums/actions) [![CRAN version](http://www.r-pkg.org/badges/version/PreciseSums)](https://cran.r-project.org/package=PreciseSums) This brings a few algorithms for precise sums and products to R. They diff --git a/src/prod.c b/src/prod.c index 722ad18..2fd689c 100644 --- a/src/prod.c +++ b/src/prod.c @@ -12,7 +12,7 @@ extern double PreciseSums_pairwise_add_DOUBLE(double *a, int n); double PreciseSums_safe_log(double x){ if (x <= 0){ // Warning? - return log(DOUBLE_EPS); + return log(DBL_EPSILON); } else { return log(x); }