-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
91 additions
and
50 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,31 @@ | ||
name: 'Run rchk tests' | ||
description: 'Run rchk tests' | ||
name: Setup and run rchk test | ||
description: Setup and run rchk test | ||
inputs: | ||
apt: | ||
default: '' | ||
package: | ||
default: '' | ||
setup-only: | ||
description: Setup rchk only and skip running the test. | ||
required: false | ||
default: false | ||
run-only: | ||
description: Skip the setup step and run the test directly assuming that setup was run. | ||
required: false | ||
default: false | ||
cache-version: | ||
description: The version of the cache, change this from the default (rchk-1) to start over with a fresh cache | ||
required: false | ||
default: rchk-1 | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
using: 'composite' | ||
steps: | ||
- if: inputs.run-only != 'true' | ||
name: Setup rchk | ||
run: bash $GITHUB_ACTION_PATH/setup.sh | ||
shell: bash | ||
- if: inputs.setup-only != 'true' && inputs.run-only != 'true' | ||
uses: r-lib/actions/setup-r-dependencies@v1 | ||
with: | ||
cache-version: ${{ inputs.cache-version }} | ||
- if: inputs.setup-only != 'true' | ||
name: Run rchk | ||
run: | | ||
bash $GITHUB_ACTION_PATH/run.sh | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
# check if user is running rhub/ubuntu-rchk docker image | ||
|
||
if [[ ! -d /home/docker/R-svn/ ]]; then | ||
echo <<EOF | ||
Make sure you are running the container 'rhub/ubuntu-rchk'. | ||
runs-on: ubuntu-latest | ||
container: | ||
image: rhub/ubuntu-rchk | ||
options: --user=root | ||
EOF | ||
exit 1 | ||
fi | ||
|
||
apt-get update && apt-get install -y sudo | ||
|
||
cd /home/docker/R-svn/ | ||
. /home/docker/rchk/scripts/cmpconfig.inc | ||
|
||
# these variables are defined in cmpconfig.inc | ||
echo "CPICFLAGS=$CPICFLAGS" >> $GITHUB_ENV | ||
echo "CFLAGS=$CFLAGS" >> $GITHUB_ENV | ||
echo "CXXFLAGS=$CXXFLAGS" >> $GITHUB_ENV | ||
echo "CC=$CC" >> $GITHUB_ENV | ||
echo "CXX=$CXX" >> $GITHUB_ENV | ||
echo "PATH=$PATH" >> $GITHUB_ENV | ||
echo "LLVM_COMPILER=$LLVM_COMPILER" >> $GITHUB_ENV | ||
echo "PKG_BUILD_DIR=$PKG_BUILD_DIR" >> $GITHUB_ENV | ||
echo "R_LIBS=$R_LIBS" >> $GITHUB_ENV | ||
echo "R_LIBSONLY=$R_LIBSONLY" >> $GITHUB_ENV | ||
echo "LD=$LD" >> $GITHUB_ENV | ||
|
||
# R_LIBS_USER is needed for caching dependencies | ||
echo "R_LIBS_USER=$R_LIBS" >> $GITHUB_ENV |