Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Zilong-Li committed Oct 14, 2023
1 parent 487a215 commit ea16597
Show file tree
Hide file tree
Showing 10 changed files with 218 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
^src/htslib-1.18/htscodecs/tests
^cran-comments\.md$
^CRAN-SUBMISSION$
\.github
.*\.tar\.gz$
9 changes: 9 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

### Contributing to vcfppR

Please see the file [Contributing](https://github.com/Zilong-Li/vcfppR/blob/main/Contributing.md) for details on

- how to report an issue: a [Minimally Complete (and) Verifiable Example (MCVE)](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) helps a lot;
- how to submit a pull request: post an issue first, get consensus about _what_ and _how_;
- how to follow our (informal) coding style: simply do as other files do and do not invent a new style;
- how to be nice and [NEWS.Rd](https://github.com/Zilong-Li/vcfppR/blob/main/NEWS.md)
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

### Pull Request Template for Rcpp

Please explain the changes you want to apply to Rcpp, preferably in an issue ticket **before** you create a pull request. See the file [Contributing](https://github.com/RcppCore/Rcpp/blob/master/Contributing.md) and the other templates for details.

#### Checklist

- [ ] Code compiles correctly
- [ ] `R CMD check` still passes all tests
- [ ] Preferably, new tests were added which fail without the change
- [ ] Document the changes by file in [ChangeLog](https://github.com/RcppCore/Rcpp/blob/master/ChangeLog)
64 changes: 64 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Run CI for R using https://eddelbuettel.github.io/r-ci/
# This file is a slight variant by running a matrix of containers

name: ci

on:
push:
branches:
- main
- dev
pull_request:

env:
USE_BSPM: "true"
_R_CHECK_FORCE_SUGGESTS_: "false"

jobs:
ci:

runs-on: ubuntu-latest

container:
image: ${{ matrix.cntr }}

strategy:
matrix:
include:
- name: release
cntr: vcfppR/ci
r: R
- name: r-4.2
cntr: vcfppR/ci-4.2
r: R
- name: r-4.1
cntr: vcfppR/ci-4.1
r: R
- name: r-4.0
cntr: vcfppR/ci-4.0
r: R
- name: r-3.6
cntr: vcfppR/ci-3.6
r: R
- name: dev
cntr: vcfppR/ci-dev
r: RD

steps:
- uses: actions/checkout@v3

#- name: Bootstrap
# run: |
# curl -OLs https://eddelbuettel.github.io/r-ci/run.sh
# chmod 0755 run.sh
# ./run.sh bootstrap

- name: SessionInfo
run: ${{ matrix.r }} -q -e 'sessionInfo()'

- name: Build
run: ${{matrix.r }} CMD build --no-build-vignettes --no-manual .

- name: Check
run: CI=true ${{ matrix.r }} CMD check --no-vignettes --no-manual vcfppR_*.tar.gz

90 changes: 90 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: docker

on:
push:
branches:
- master
schedule:
- cron: "32 1 * * 6"

jobs:
docker-ci:
runs-on: ubuntu-latest
name: ${{ matrix.tag }}

strategy:
fail-fast: false
matrix:
tag: [ci, ci-dev]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
context: docker/${{ matrix.tag }}
tags: vcfppR/${{ matrix.tag }}


docker-run:
runs-on: ubuntu-latest
name: run
needs: docker-ci

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
context: docker/run
tags: vcfppR/run


docker-plus:
runs-on: ubuntu-latest
name: plus
needs: docker-run

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
context: docker/plus
tags: vcfppR/plus
28 changes: 28 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Mark stale issues and pull requests
# cf https://github.com/actions/stale

name: stale

on:
schedule:
- cron: "11 1 * * 6"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
days-before-stale: 365
days-before-close: 31
stale-issue-message: >
This issue is stale (365 days without activity) and will be closed
in 31 days unless new activity is seen. Please feel free to re-open
it is still a concern, possibly with additional data.
stale-pr-message: >
This pull request is is stale (365 days without activity) and will
be closed in 31 days unless new activity is seen. Please feel free
to open a new issue to discuss a fresh approach.
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,15 @@
.Rdata
.httr-oauth
.DS_Store
src/htslib-1.18
src/htslib-1.18
*.tar.gz
vignettes/*_cache

## lsp
.clangd
.clang-format

## R check
src/symbols.rds
*.Rcheck
CRAN-SUBMISSION
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Package: vcfppR
Title: Rapid Manipulation of the VCF/BCF Format in R
Version: 0.3.4
Author: Zilong Li
Maintainer: Zilong Li <zilong.dk@gmail.com>
Authors@R:
person("Zilong", "Li", , "zilong.dk@gmail.com", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-5859-2078"))
Expand Down
1 change: 0 additions & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
CXX_STD = CXX11
HTSLIB_DIR=htslib-1.18
PKG_CPPFLAGS = -I. -I${HTSLIB_DIR}
PKG_LIBS = ${HTSLIB_DIR}/libhts.a -fPIC -lz -lm -lbz2 -llzma -lcurl
Expand Down
1 change: 0 additions & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
CXX_STD = CXX11
HTSLIB_DIR=htslib-1.18
PKG_CPPFLAGS = -I. -I${HTSLIB_DIR} -D_FILE_OFFSET_BITS=64
PKG_LIBS+=${HTSLIB_DIR}/libhts.a -lz -lm -lbz2 -llzma -lcurl -lbcrypt -lidn2 -lunistring -liconv -lssl -lcrypto -lcrypt32 -lwsock32 -lwldap32 -lssh2 -lgcrypt -lgpg-error -lws2_32 -lzstd -lregex
Expand Down

0 comments on commit ea16597

Please sign in to comment.