Skip to content

Expand testing to r4.0 r3.6 (#67) #209

Expand testing to r4.0 r3.6 (#67)

Expand testing to r4.0 r3.6 (#67) #209

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: R-CMD-check-crossplatform
jobs:
R-CMD-check:
runs-on: ubuntu-latest
name: Check (${{ matrix.config.platform }} ${{ matrix.config.cc }})
strategy:
fail-fast: false
matrix:
config:
- { platform: 386, cc: gcc-14, cxx: g++-14 }
- { platform: 386, cc: clang-18, cxx: clang++-18 }
- { platform: armel, cc: gcc-14, cxx: g++-14 }
- { platform: armel, cc: clang-18, cxx: clang++-18 }
- { platform: armhf, cc: gcc-14, cxx: g++-14 }
- { platform: armhf, cc: clang-18, cxx: clang++-18 }
- { platform: mips64le, cc: gcc-14, cxx: g++-14 }
- { platform: mips64le, cc: clang-18, cxx: clang++-18 }
- { platform: ppc64le, cc: gcc-14, cxx: g++-14 }
- { platform: ppc64le, cc: clang-18, cxx: clang++-18 }
- { platform: riscv64, cc: gcc-14, cxx: g++-14 }
- { platform: riscv64, cc: clang-18, cxx: clang++-18 }
#- { platform: s390x, cc: gcc-14, cxx: g++-14 }
#- { platform: s390x, cc: clang-18, cxx: clang++-18 }
- { platform: FreeBSD, cc: default, cxx: default }
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup QEMU
if: matrix.config.platform != 'FreeBSD'
uses: docker/setup-qemu-action@master
- name: Check with ${{ matrix.config.cc }}
if: matrix.config.platform != 'FreeBSD'
uses: addnab/docker-run-action@v3
with:
image: andrjohns/quickjsr-cross-tests
options: -v ${{ github.workspace }}:/quickjsr --platform=linux/${{ matrix.config.platform }}
run: |
echo "CC=${{ matrix.config.cc }}" >> /etc/R/Makeconf
echo "CXX=${{ matrix.config.cxx }}" >> /etc/R/Makeconf
Rscript -e 'rcmdcheck::rcmdcheck("/quickjsr", args = c("--no-manual", "--as-cran", "--no-vignettes"), build_args = c("--no-build-vignettes"), check_dir = "/quickjsr/check")'
- name: Test in FreeBSD
if: matrix.config.platform == 'FreeBSD'
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y R
run: |
Rscript -e 'install.packages("tinytest", repos="https://cloud.r-project.org")'
R CMD build --no-build-vignettes /root/work/QuickJSR/QuickJSR
_R_CHECK_FORCE_SUGGESTS_="false" \
R CMD check --as-cran --no-manual --no-vignettes --output=/root/work/QuickJSR/QuickJSR \
/root/work/QuickJSR/QuickJSR/QuickJSR_*.tar.gz
mv /root/work/QuickJSR/QuickJSR/QuickJSR.Rcheck /root/work/QuickJSR/QuickJSR/check
- name: Upload check results
uses: actions/upload-artifact@v4
with:
name: arch-${{ matrix.config.platform }}-${{ matrix.config.cc }}-results
path: check