Skip to content

Commit

Permalink
Update github.recheck.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
amoeba committed Sep 10, 2024
1 parent b989ab7 commit 597e2fe
Showing 1 changed file with 13 additions and 58 deletions.
71 changes: 13 additions & 58 deletions dev/tasks/r/github.recheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,61 +20,16 @@
{{ macros.github_header() }}

jobs:
prepare:
name: Prepare dependencies
runs-on: ubuntu-latest
container: ghcr.io/r-devel/recheck
outputs:
oldfile: ${{ steps.filenames.outputs.oldfile }}
newfile: ${{ steps.filenames.outputs.newfile }}
steps:
- name: prepare
run: |
mkdir -p $R_LIBS_USER
R -e ".libPaths()"
- name: checkout
uses: actions/checkout@v4
with:
path: source

- name: Set package source directory
run: |
if [ "${{ inputs.subdirectory }}" ]; then
echo "PKG_SOURCE_DIR=source/${{ inputs.subdirectory }}" >> $GITHUB_ENV
else
echo "PKG_SOURCE_DIR=source" >> $GITHUB_ENV
fi
- name: download dependencies
run: rechecktools::install_recheck_deps('${{env.PKG_SOURCE_DIR}}', '${{inputs.which}}')
shell: Rscript {0}

- name: build source package
run: |
mkdir newpkg
R CMD build ${{env.PKG_SOURCE_DIR}}
mv *.tar.gz newpkg/
rm -Rf source
- name: Get old version of package
shell: Rscript {0}
run: |
dir.create("oldpkg")
pkg <- sub("_.*", "", list.files("newpkg"))
download.packages(pkg, "oldpkg", repos = "https://cran.r-project.org")
- name: Get file names
id: filenames
run: |
echo "oldfile=$(cd oldpkg; echo *.tar.gz)" >> "$GITHUB_OUTPUT"
echo "newfile=$(cd newpkg; echo *.tar.gz)" >> "$GITHUB_OUTPUT"
- name: Save package and library
uses: actions/cache/save@v4
with:
path: |
pkglib
newpkg
oldpkg
key: ${{ runner.os }}-${{ github.run_id }}-${{github.run_attempt}}
recheck-weak:
name: Reverse check strong dependents
uses: r-devel/recheck/.github/workflows/recheck.yml@v1
with:
which: strong
subdirectory: r

recheck-strong:
name: Reverse check strong dependents
uses: r-devel/recheck/.github/workflows/recheck.yml@v1
with:
which: strong
subdirectory: r

0 comments on commit 597e2fe

Please sign in to comment.