-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Reusable workflows need a hook, vendoring the two actions needed …
…for now This reverts commit bfe7970.
- Loading branch information
Showing
3 changed files
with
202 additions
and
2 deletions.
There are no files selected for viewing
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,11 @@ | ||
name: "Actions to set up a Git identity" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Configure Git identity | ||
run: | | ||
env | sort | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
name: "Actions to run for installing R packages" | ||
inputs: | ||
token: | ||
description: GitHub token, set to secrets.GITHUB_TOKEN | ||
required: true | ||
r-version: | ||
description: Passed on to r-lib/actions/setup-r@v2 | ||
required: false | ||
default: release | ||
install-r: | ||
description: Passed on to r-lib/actions/setup-r@v2 | ||
required: false | ||
default: true | ||
needs: | ||
description: Passed on to r-lib/actions/setup-r-dependencies@v2 | ||
required: false | ||
default: "" | ||
packages: | ||
description: Passed on to r-lib/actions/setup-r-dependencies@v2 | ||
required: false | ||
default: deps::., any::sessioninfo | ||
extra-packages: | ||
description: Passed on to r-lib/actions/setup-r-dependencies@v2 | ||
required: false | ||
default: any::rcmdcheck | ||
cache-version: | ||
description: Passed on to r-lib/actions/setup-r-dependencies@v2 | ||
required: false | ||
default: 1 | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set environment variables | ||
run: | | ||
echo "R_REMOTES_NO_ERRORS_FROM_WARNINGS=true" | tee -a $GITHUB_ENV | ||
echo "R_KEEP_PKG_SOURCE=yes" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_SYSTEM_CLOCK_=false" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_FUTURE_FILE_TIMESTAMPS_=false" | tee -a $GITHUB_ENV | ||
# prevent rgl issues because no X11 display is available | ||
echo "RGL_USE_NULL=true" | tee -a $GITHUB_ENV | ||
# from https://github.com/r-devel/r-dev-web/blob/main/CRAN/QA/Kurt/lib/R/Scripts/check_CRAN_incoming.R | ||
echo "_R_CHECK_CRAN_INCOMING_CHECK_FILE_URIS_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_CRAN_INCOMING_NOTE_GNU_MAKE_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_PACKAGE_DEPENDS_IGNORE_MISSING_ENHANCES_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_CODE_CLASS_IS_STRING_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_CODOC_VARIABLES_IN_USAGES_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_CONNECTIONS_LEFT_OPEN_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_DATALIST_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_NEWS_IN_PLAIN_TEXT_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_PACKAGES_USED_CRAN_INCOMING_NOTES_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_RD_CONTENTS_KEYWORDS_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_R_DEPENDS_=warn" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_S3_METHODS_SHOW_POSSIBLE_ISSUES_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_THINGS_IN_TEMP_DIR_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_UNDOC_USE_ALL_NAMES_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CHECK_URLS_SHOW_301_STATUS_=true" | tee -a $GITHUB_ENV | ||
echo "_R_CXX_USE_NO_REMAP_=true" | tee -a $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Set environment variables (non-Windows only) | ||
if: runner.os != 'Windows' | ||
run: | | ||
echo "_R_CHECK_BASHISMS_=true" | tee -a $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Update apt | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y aspell | ||
echo "_R_CHECK_CRAN_INCOMING_USE_ASPELL_=true" | tee -a $GITHUB_ENV | ||
shell: bash | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ inputs.r-version }} | ||
install-r: ${{ inputs.install-r }} | ||
http-user-agent: ${{ matrix.config.http-user-agent }} | ||
use-public-rspm: true | ||
|
||
- id: get-extra | ||
uses: ./.github/workflows/get-extra | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
env: | ||
GITHUB_PAT: ${{ inputs.token }} | ||
with: | ||
pak-version: devel | ||
needs: ${{ inputs.needs }} | ||
packages: ${{ inputs.packages }} | ||
extra-packages: ${{ inputs.extra-packages }} ${{ ( matrix.config.covr && 'any::covr' ) || '' }} ${{ steps.get-extra.outputs.packages }} | ||
cache-version: ${{ inputs.cache-version }} | ||
|
||
- name: Add pkg.lock to .gitignore | ||
run: | | ||
set -x | ||
if ! [ -f .github/.gitignore ] || [ -z "$(grep '^/pkg.lock$' .github/.gitignore)" ]; then | ||
echo /pkg.lock >> .github/.gitignore | ||
fi | ||
shell: bash | ||
|
||
- name: Add fake qpdf and checkbashisms | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo ln -s $(which true) /usr/local/bin/qpdf | ||
sudo ln -s $(which true) /usr/local/bin/checkbashisms | ||
shell: bash | ||
|
||
- name: Install ccache | ||
uses: krlmlr/ccache-action@parallel-dir | ||
with: | ||
max-size: 10G | ||
verbose: 1 | ||
save: false | ||
restore: false | ||
|
||
- name: Use ccache for compiling R code, and parallelize | ||
run: | | ||
mkdir -p ~/.R | ||
echo 'CC := ccache $(CC)' >> ~/.R/Makevars | ||
echo 'CXX := ccache $(CXX)' >> ~/.R/Makevars | ||
echo 'CXX11 := ccache $(CXX11)' >> ~/.R/Makevars | ||
echo 'CXX14 := ccache $(CXX14)' >> ~/.R/Makevars | ||
echo 'CXX17 := ccache $(CXX17)' >> ~/.R/Makevars | ||
echo 'MAKEFLAGS = -j2' >> ~/.R/Makevars | ||
cat ~/.R/Makevars | ||
echo 'CCACHE_SLOPPINESS=locale,time_macros' | tee -a $GITHUB_ENV | ||
# echo 'CCACHE_DEBUG=true' | tee -a $GITHUB_ENV | ||
# echo "CCACHE_DEBUGDIR=$(dirname $(pwd))/ccache-debug" | tee -a $GITHUB_ENV | ||
# mkdir -p $(dirname $(pwd))/.ccache-debug | ||
echo 'PKG_BUILD_EXTRA_FLAGS=false' | tee -a $GITHUB_ENV | ||
# Repair | ||
git rm -rf .ccache || true | ||
rm -rf .ccache | ||
shell: bash | ||
|
||
- name: Show R CMD config --all | ||
run: | | ||
R CMD config --all | ||
shell: bash |