Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Mar 27, 2022
1 parent 4087d23 commit ac6c4b7
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 3 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
^.*\.Rproj$
^\.Rproj\.user$
^\.travis\.yml$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
58 changes: 58 additions & 0 deletions .github/workflows/check-full.yaml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/prod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit ac6c4b7

Please sign in to comment.