export ASAN_OPTIONS=detect_container_overflow=0 #187
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
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | |
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
name: R package | |
permissions: read-all | |
jobs: | |
R-CMD-check: | |
runs-on: ${{ matrix.config.os }} | |
container: ${{ matrix.config.container }} | |
name: ${{ matrix.config.name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: macos-13, r: 'release', container: null, name: 'macos-13-r-release'} | |
- {os: macos-14, r: 'release', container: null, name: 'macos-14-r-release'} | |
- {os: ubuntu-latest, r: 'release', container: null, name: 'ubuntu-latest-r-release'} | |
- {os: windows-latest, r: 'release', container: null, name: 'windows-latest-r-release'} | |
- {os: macos-13, r: 'devel', container: null, name: 'macos-13-r-devel'} | |
- {os: macos-14, r: 'devel', container: null, name: 'macos-14-r-devel'} | |
- {os: ubuntu-latest, r: 'devel', container: null, name: 'ubuntu-latest-r-devel'} | |
- {os: windows-latest, r: 'devel', container: null, name: 'windows-latest-r-devel'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/ubuntu-gcc12:latest' }, name: 'r-devel-linux-x86_64-debian-gcc'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/ubuntu-clang:latest' }, name: 'r-devel-linux-x86_64-debian-clang'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/atlas:latest' }, name: 'ATLAS'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/c23:latest' }, name: 'C23'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/clang-asan:latest' }, name: 'clang-ASAN'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/clang16:latest' }, name: 'clang16'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/clang17:latest' }, name: 'clang17'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/clang18:latest' }, name: 'clang18'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/clang19:latest' }, name: 'clang19'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/clang20:latest' }, name: 'clang20'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/donttest:latest' }, name: 'donttest'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/gcc13:latest' }, name: 'gcc13'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/gcc13:latest' }, name: 'gcc14'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/intel:latest' }, name: 'intel'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/mkl:latest' }, name: 'mkl'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/nold:latest' }, name: 'noLD'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/noremap:latest' }, name: 'noRemap'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/valgrind:latest' }, name: 'rchk'} | |
- {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/valgrind:latest' }, name: 'valgrind'} | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
R_KEEP_PKG_SOURCE: yes | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup pandoc | |
if: matrix.config.container == null | |
uses: r-lib/actions/setup-pandoc@v2 | |
- name: Setup R | |
if: matrix.config.container == null | |
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 | |
- name: Restore R package cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/R | |
key: ${{ runner.os }}-r-${{ matrix.config.r }}-cache | |
- name: Install libpng (macOS) | |
if: matrix.config.os == 'macos-14' && matrix.config.r == 'devel' | |
run: | | |
curl -LO https://mac.r-project.org/bin/darwin20/arm64/libpng-1.6.38-darwin.20-arm64.tar.xz | |
sudo tar -xvf libpng-1.6.38-darwin.20-arm64.tar.xz -C / | |
echo "PKG_CONFIG_PATH=/opt/R/arm64/lib/pkgconfig" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
Rscript -e 'if (!requireNamespace("pak", quietly = TRUE)) { install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") }' | |
Rscript -e 'pak::pkg_install("decor", dependencies = TRUE)' | |
Rscript -e 'pak::pkg_install("rcmdcheck", dependencies = TRUE)' | |
Rscript -e 'pak::pkg_install("pkgbuild", dependencies = TRUE)' | |
Rscript -e 'pak::pkg_install(".", dependencies = TRUE)' | |
working-directory: ./rpkg | |
- name: Check | |
run: | | |
Rscript -e 'pkgbuild::check_build_tools(debug = TRUE)' | |
Rscript -e 'rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), build_args = "--no-manual", error_on = "error")' | |
working-directory: ./rpkg | |
- name: Save R package cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/R | |
key: ${{ runner.os }}-r-${{ matrix.config.r }}-cache |