Skip to content

Commit

Permalink
run as fast as you can to stay in the same place
Browse files Browse the repository at this point in the history
  • Loading branch information
kingaa committed Sep 9, 2024
1 parent 0f8f134 commit 3065a3e
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 86 deletions.
10 changes: 6 additions & 4 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
examples
repo
revdep
scripts
tools
examples
wiki
www
yaml
tests/Makefile
tests/(.+?)\.png$
tests/(.+?)\.pdf$
Expand Down Expand Up @@ -34,13 +39,10 @@ TODO\.md$
\.tests
Makefile
rules.mk
yaml
scripts
lib
libs
library
check
www
^(.+?)\.pdf
^(.+?)\.tar\.gz
^(.+?)\.tgz
Expand Down
84 changes: 62 additions & 22 deletions .github/workflows/binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,43 @@ on:
tags:
- '**'
workflow_dispatch:
branches:
- '*'

name: binary-build

env:
release_name: ${{ vars.repo_name }}_${{ github.ref_name }}

jobs:
binary-build:
source_build:
runs-on: ubuntu-latest
name: Build source tarball
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: latest

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::pkgbuild
- name: Build source tarball
run: |
R CMD build --force --no-manual --resave-data --compact-vignettes=both --md5 .
mkdir -p ${{ github.workspace }}/artifacts
cp ${{ env.release_name }}.tar.gz ${{ github.workspace }}/artifacts
- uses: actions/upload-artifact@v4
with:
name: source_tarball
path: ${{ github.workspace }}/artifacts/${{ env.release_name }}.tar.gz

binary_build:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})
Expand All @@ -20,37 +50,47 @@ jobs:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
- {os: macOS-latest, r: 'release', ext: "tgz"}
- {os: windows-latest, r: 'release', ext: "zip"}

steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
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@v2
with:
extra-packages: rcmdcheck

extra-packages: |
any::pkgbuild
- name: Build binary
run: pkgbuild::build(binary=TRUE,manual=TRUE)
shell: Rscript {0}
- name: Copying tarball

- name: Copy tarball
run: |
mkdir -p ${{ github.workspace }}/artifacts
cp ../tao_* ${{ github.workspace }}/artifacts
- uses: actions/upload-artifact@v3.1.1
cp ../${{ env.release_name }}.${{ matrix.config.ext }} ${{ github.workspace }}/artifacts
- uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.config.os }}-${{ matrix.config.r }}
path: ${{ github.workspace }}/artifacts
name: ${{ matrix.config.os }}-${{ matrix.config.r }}
path: ${{ github.workspace }}/artifacts/${{ env.release_name }}.${{ matrix.config.ext }}

# Workflow derived from https://github.com/marketplace/actions/create-release
create_release:
needs: [ source_build, binary_build ]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
- uses: ncipollo/release-action@v1
with:
draft: true
artifacts: "artifacts/*/*"
57 changes: 24 additions & 33 deletions .github/workflows/r-cmd-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,24 @@ on:
push:
branches:
- '*'
paths:
- DESCRIPTION
- NAMESPACE
- R/**
- src/**
- tests/**
- man/**
- data/**
pull_request:
branches: [master]
paths:
- DESCRIPTION
- NAMESPACE
- R/**
- src/**
- tests/**
- man/**
- data/**
workflow_dispatch:
branches:
- '*'

name: R-CMD-check

Expand All @@ -22,56 +35,34 @@ jobs:
fail-fast: false
matrix:
config:
- {os: ubuntu-22.04, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-20.04, r: '4.0.0'}
- {os: macOS-11, r: 'release'}
- {os: macOS-12, r: 'release'}
- {os: ubuntu-20.04, r: '4.1.0'}
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
_R_CHECK_DEPENDS_ONLY_: false
_R_CHECK_ALL_NON_ISO_C_: true
_R_CHECK_CODE_ASSIGN_TO_GLOBALENV_: true
_R_CHECK_CODE_ATTACH_: true
_R_CHECK_CODE_DATA_INTO_GLOBALENV_: true
_R_CHECK_CODE_USAGE_VIA_NAMESPACES_: true
_R_CHECK_DEPRECATED_DEFUNCT_: true
_R_CHECK_EXECUTABLES_EXCLUSIONS_: false
_R_CHECK_INSTALL_DEPENDS_: true
_R_CHECK_NO_RECOMMENDED_: true
_R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_: true
_R_CHECK_REPLACING_IMPORTS_: true
_R_CHECK_S3_METHODS_NOT_REGISTERED_: true
_R_CHECK_SCREEN_DEVICE_: stop
_R_CHECK_SRC_MINUS_W_IMPLICIT_: true
_R_CHECK_SRC_MINUS_W_UNUSED_: true
_R_CHECK_SUGGESTS_ONLY_: true
_R_CHECK_TOPLEVEL_FILES_: true
_R_CHECK_VC_DIRS_: true
_R_CHECK_WALL_FORTRAN_: true
_R_CHECK_USE_CODETOOLS_: true
_R_CHECK_CODETOOLS_PROFILE_: "suppressLocalUnused=FALSE,suppressPartialMatchArgs=FALSE,suppressParamUnused=TRUE,suppressUndefined=FALSE"

steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
extra-repositories: |
https://kingaa.github.io/
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck

- uses: r-lib/actions/check-r-package@v2

- uses: actions/upload-artifact@v3.1.1
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.os }}-${{ matrix.config.r }}-results
path: check
path: check/${{ vars.repo_name }}.Rcheck/00check.log
22 changes: 18 additions & 4 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# 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
on:
workflow_dispatch:
push:
branches: [master]
paths:
- DESCRIPTION
- NAMESPACE
- R/**
- src/**
- tests/**
- man/**
- data/**
pull_request:
branches: [master]
workflow_dispatch:
branches:
- '*'
paths:
- DESCRIPTION
- NAMESPACE
- R/**
- src/**
- tests/**
- man/**
- data/**

name: test-coverage

Expand All @@ -18,7 +32,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
*.so
*.gcda
*.gcno
tests/*.pdf
scripts
*.pdf
/scripts
lib
library
check
repo
wiki
www
*.pdf
inst/doc/figure
inst/doc/cache
tmp
covr.html
covr.rds
.DS_Store
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ License: GPL-3
Encoding: UTF-8
Suggests: tinytest
Roxygen: list(roclets = c("collate", "namespace", "rd", "roxytest::tinytest_roclet"))
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
REPODIR = ../www
INCLUDES=
HEADERS=
REPODIR = repo
INCLUDES =
HEADERS =
SESSION_PKGS = datasets,utils,grDevices,graphics,stats,methods,tidyverse,$(PKG)

include rules.mk

1 change: 1 addition & 0 deletions man/tao-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3065a3e

Please sign in to comment.