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 Apr 1, 2024
1 parent 0f8f134 commit 2aa6563
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 62 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
82 changes: 62 additions & 20 deletions .github/workflows/binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,40 @@ on:

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 +52,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/*/*"
36 changes: 6 additions & 30 deletions .github/workflows/r-cmd-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,18 @@ 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:
Expand All @@ -71,7 +47,7 @@ jobs:

- 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
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REPODIR = ../www
REPODIR = repo
INCLUDES=
HEADERS=

Expand Down
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.

2 changes: 2 additions & 0 deletions rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ inst/NEWS: inst/NEWS.Rd
$(RCMD) Rdconv -t txt $^ -o $@

htmlhelp: install manual
# mkdir -p $(MANUALDIR)/source
# doxygen
rsync --delete -a library/$(PKG)/html/ $(MANUALDIR)/html
rsync --delete --exclude=aliases.rds --exclude=paths.rds --exclude=$(PKG).rdb --exclude=$(PKG).rdx --exclude=macros -a library/$(PKG)/help/ $(MANUALDIR)/help
(cd $(MANUALDIR); (cat links.ed && echo w ) | ed - html/00Index.html)
Expand Down

0 comments on commit 2aa6563

Please sign in to comment.