Skip to content

Commit 0c87746

Browse files
committed
use GHA for CI
1 parent 53103ab commit 0c87746

File tree

6 files changed

+105
-70
lines changed

6 files changed

+105
-70
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@
1414
^tests/testthat/pkg/RcppParallelTest/src/.*\.dll$
1515
^tests/testthat/pkg/RcppParallelTest/src/.*\.s?o$
1616

17+
^\.github$

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/R-CMD-check.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# NOTE: This workflow is overkill for most R packages
2+
# check-standard.yaml is likely a better choice
3+
# usethis::use_github_action("check-standard") will install it.
4+
#
5+
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
6+
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
7+
on:
8+
push:
9+
branches:
10+
- main
11+
- master
12+
pull_request:
13+
branches:
14+
- main
15+
- master
16+
17+
name: R-CMD-check
18+
19+
jobs:
20+
R-CMD-check:
21+
runs-on: ${{ matrix.config.os }}
22+
23+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
config:
29+
- {os: macOS-latest, r: 'release'}
30+
- {os: windows-latest, r: 'release'}
31+
- {os: ubuntu-18.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.0.0 (ubuntu-18.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
32+
- {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
33+
34+
env:
35+
RSPM: ${{ matrix.config.rspm }}
36+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
37+
38+
steps:
39+
- uses: actions/checkout@v2
40+
41+
- uses: r-lib/actions/setup-r@v1
42+
id: install-r
43+
with:
44+
r-version: ${{ matrix.config.r }}
45+
http-user-agent: ${{ matrix.config.http-user-agent }}
46+
47+
- uses: r-lib/actions/setup-pandoc@v1
48+
49+
- name: Install pak and query dependencies
50+
run: |
51+
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
52+
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
53+
shell: Rscript {0}
54+
55+
- name: Restore R package cache
56+
uses: actions/cache@v2
57+
with:
58+
path: ${{ env.R_LIBS_USER }}
59+
key: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
60+
restore-keys: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-
61+
62+
- name: Install system dependencies
63+
if: runner.os == 'Linux'
64+
run: |
65+
pak::local_system_requirements(execute = TRUE)
66+
pak::pkg_system_requirements("rcmdcheck", execute = TRUE)
67+
shell: Rscript {0}
68+
69+
- name: Install dependencies
70+
run: |
71+
pak::local_install_dev_deps(upgrade = TRUE)
72+
pak::pkg_install("rcmdcheck")
73+
shell: Rscript {0}
74+
75+
- name: Session info
76+
run: |
77+
options(width = 100)
78+
pkgs <- installed.packages()[, "Package"]
79+
sessioninfo::session_info(pkgs, include_base = TRUE)
80+
shell: Rscript {0}
81+
82+
- name: Check
83+
env:
84+
_R_CHECK_CRAN_INCOMING_: false
85+
run: |
86+
options(crayon.enabled = TRUE)
87+
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
88+
shell: Rscript {0}
89+
90+
- name: Show testthat output
91+
if: always()
92+
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
93+
shell: bash
94+
95+
- name: Upload check results
96+
if: failure()
97+
uses: actions/upload-artifact@main
98+
with:
99+
name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-results
100+
path: check

.travis.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
## RcppParallel Package
22

3-
[![Travis-CI Build Status](https://travis-ci.org/RcppCore/RcppParallel.svg?branch=master)](https://travis-ci.org/RcppCore/RcppParallel)
4-
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/RcppCore/RcppParallel?branch=master&svg=true)](https://ci.appveyor.com/project/RcppCore/RcppParallel)
3+
<!-- badges: start -->
4+
[![R-CMD-check](https://github.com/RcppCore/RcppParallel/workflows/R-CMD-check/badge.svg)](https://github.com/RcppCore/RcppParallel/actions)
55
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/RcppParallel)](https://cran.r-project.org/package=RcppParallel)
6+
<!-- badges: end -->
67

78
High level functions for doing parallel programming with Rcpp. For example, the `parallelFor` function can be used to convert the work of a standard serial "for" loop into a parallel one and the `parallelReduce` function can be used for accumulating aggregate or other values.
89

appveyor.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)