|
| 1 | +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples |
| 2 | +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: sync-dev |
| 6 | + |
| 7 | +jobs: |
| 8 | + R-CMD-check: |
| 9 | + runs-on: ${{ matrix.config.os }} |
| 10 | + container: ${{ matrix.config.container }} |
| 11 | + |
| 12 | + name: ${{ matrix.config.name }} |
| 13 | + |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + config: |
| 18 | + - {os: ubuntu-latest, container: { image: 'ghcr.io/r-hub/containers/gcc13:latest' }, name: 'gcc14'} |
| 19 | + - {os: ubuntu-latest, container: { image: 'your-docker-image:latest' }, name: 'fedora-gcc14'} |
| 20 | + |
| 21 | + env: |
| 22 | + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
| 23 | + R_KEEP_PKG_SOURCE: yes |
| 24 | + ASAN_OPTIONS: 'detect_leaks=0' |
| 25 | + UBSAN_OPTIONS: 'print_stacktrace=1' |
| 26 | + RJAVA_JVM_STACK_WORKAROUND: 0 |
| 27 | + RGL_USE_NULL: true |
| 28 | + R_DONT_USE_TK: true |
| 29 | + LD_PRELOAD: /usr/lib64/libasan.so.8 |
| 30 | + |
| 31 | + steps: |
| 32 | + - name: Checkout |
| 33 | + uses: actions/checkout@v4 |
| 34 | + |
| 35 | + - name: Set up R environment |
| 36 | + run: | |
| 37 | + mkdir -p ~/.R/ |
| 38 | + echo 'CC=gcc -std=gnu11 -fsanitize=address,undefined -fno-omit-frame-pointer' >> ~/.R/Makevars |
| 39 | + echo 'FC=gfortran -fsanitize=address' >> ~/.R/Makevars |
| 40 | +
|
| 41 | + - name: Restore R package cache |
| 42 | + uses: actions/cache@v4 |
| 43 | + with: |
| 44 | + path: ~/.cache/R |
| 45 | + key: ${{ runner.os }}-r-${{ matrix.config.r }}-cache |
| 46 | + |
| 47 | + - name: Install dependencies |
| 48 | + run: | |
| 49 | + Rscript -e 'if (!requireNamespace("pak", quietly = TRUE)) { install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") }' |
| 50 | + Rscript -e 'pak::pkg_install("decor", dependencies = TRUE)' |
| 51 | + Rscript -e 'pak::pkg_install("rcmdcheck", dependencies = TRUE)' |
| 52 | + Rscript -e 'pak::pkg_install("pkgbuild", dependencies = TRUE)' |
| 53 | + Rscript -e 'pak::pkg_install(".", dependencies = TRUE)' |
| 54 | + working-directory: ./rpkg |
| 55 | + |
| 56 | + - name: Check |
| 57 | + run: | |
| 58 | + Rscript -e 'pkgbuild::check_build_tools(debug = TRUE)' |
| 59 | + Rscript -e 'rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), build_args = "--no-manual", error_on = "error")' |
| 60 | + working-directory: ./rpkg |
| 61 | + |
| 62 | + - name: Save R package cache |
| 63 | + uses: actions/cache@v4 |
| 64 | + with: |
| 65 | + path: ~/.cache/R |
| 66 | + key: ${{ runner.os }}-r-${{ matrix.config.r }}-cache |
0 commit comments