Repository navigation
dMod2 0.16.0 #134
Workflow file for this run
This file contains hidden or 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 | |
| # Runs on push to master and on every pull request; docs-only changes run no check. | |
| on: | |
| push: | |
| branches: [main, master] | |
| paths-ignore: | |
| - 'vignettes/articles/**' | |
| - 'examples/**' | |
| - 'dev/**' | |
| - 'bench/**' | |
| - '**.md' | |
| - '_pkgdown.yml' | |
| - 'pkgdown/**' | |
| pull_request: | |
| paths-ignore: | |
| - 'vignettes/articles/**' | |
| - 'examples/**' | |
| - 'dev/**' | |
| - 'bench/**' | |
| - '**.md' | |
| - '_pkgdown.yml' | |
| - 'pkgdown/**' | |
| workflow_dispatch: | |
| # a new push cancels the outdated run of the same branch or pull request | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| name: R-CMD-check | |
| permissions: read-all | |
| jobs: | |
| R-CMD-check: | |
| runs-on: ${{ matrix.config.os }} | |
| name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - {os: macos-latest, r: 'release'} | |
| - {os: windows-latest, r: 'release'} | |
| - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} | |
| - {os: ubuntu-latest, r: 'release'} | |
| # no oldrel-1: DESCRIPTION requires R >= 4.5.0 | |
| env: | |
| # cppDE is a private repo in the same org: DMODVERSE_PAT reads it for the Remote | |
| GITHUB_PAT: ${{ secrets.DMODVERSE_PAT || secrets.GITHUB_TOKEN }} | |
| R_KEEP_PKG_SOURCE: yes | |
| # skip_on_cran() guards 13 test files; our own jobs opt in. | |
| NOT_CRAN: true | |
| # PEtabTests/ is .Rbuildignore'd but tracked, so the checkout has it | |
| # and the conformance tests run here. | |
| DMOD_PETABTESTS: ${{ github.workspace }}/PEtabTests | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: r-lib/actions/setup-pandoc@v2 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| # cppDE generates C++ through SymPy, and getLinVars(), the eqnClass | |
| # simplify path and steadyStates() reach sympy through reticulate. | |
| # Setting RETICULATE_PYTHON overrides the py_require() list in zzz.R, so | |
| # everything the tests import has to be installed here: scipy is what | |
| # steadyStates(version = "1.2"/"1.3") needs, python-libsbml what the SBML | |
| # and PEtab import reach through .dmod_libsbml_python(). Without the | |
| # latter every test behind .libsbml_works() skips instead of running. | |
| # symident comes from PyPI for the symmetry tests. | |
| - name: Install the Python packages and point reticulate at them | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip sympy numpy scipy python-libsbml | |
| python -m pip install symident | |
| echo "RETICULATE_PYTHON=$(python -c 'import sys; print(sys.executable)')" >> "$GITHUB_ENV" | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: ${{ matrix.config.r }} | |
| http-user-agent: ${{ matrix.config.http-user-agent }} | |
| # "true" would skip macOS arm64, where CRAN now serves some | |
| # binaries zstd compressed and pak cannot unpack them. | |
| use-public-rspm: always | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| extra-packages: any::rcmdcheck | |
| needs: check | |
| - uses: r-lib/actions/check-r-package@v2 | |
| with: | |
| # without --as-cran: cppDE is a GitHub Remote, not on CRAN | |
| args: 'c("--no-manual")' | |
| upload-snapshots: true | |
| build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' | |
| # Fedora is not a hosted runner, hence a container with the distro's own R: | |
| # gcc, FlexiBLAS and the hardening flags differ from Ubuntu's. No RSPM binaries | |
| # here, so dependencies build from source. | |
| fedora: | |
| runs-on: ubuntu-latest | |
| container: fedora:latest | |
| name: fedora (R release, gcc/FlexiBLAS) | |
| env: | |
| GITHUB_PAT: ${{ secrets.DMODVERSE_PAT || secrets.GITHUB_TOKEN }} | |
| R_KEEP_PKG_SOURCE: yes | |
| NOT_CRAN: true | |
| # the distro packages below provide sympy, numpy, scipy and libsbml, so | |
| # point reticulate at the system interpreter rather than provisioning one. | |
| RETICULATE_PYTHON: /usr/bin/python3 | |
| DMOD_PETABTESTS: ${{ github.workspace }}/PEtabTests | |
| # the container sets no LANG, so R runs with session charset ASCII and | |
| # every multibyte character in printed output arrives as raw bytes, which | |
| # makes regexes over captured output behave differently than on the | |
| # hosted runners | |
| LANG: en_US.UTF-8 | |
| steps: | |
| # glibc-langpack-en: the image ships glibc-minimal-langpack only, so the | |
| # en_US.UTF-8 above (and the one R CMD check's syntax pass asks for) has no | |
| # locale to bind to, and the warning that follows fails error-on: "warning". | |
| - name: Install R and build dependencies | |
| run: | | |
| dnf install -y --setopt=install_weak_deps=False \ | |
| R R-devel gcc gcc-c++ gcc-gfortran make cmake git glibc-langpack-en \ | |
| openssl-devel libcurl-devel libxml2-devel fontconfig-devel \ | |
| harfbuzz-devel fribidi-devel freetype-devel libpng-devel \ | |
| libtiff-devel libjpeg-turbo-devel pandoc \ | |
| python3 python3-pip python3-devel python3-sympy python3-numpy \ | |
| python3-scipy python3-libsbml | |
| python3 -m pip install symident | |
| - uses: actions/checkout@v5 | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| extra-packages: any::rcmdcheck | |
| needs: check | |
| - uses: r-lib/actions/check-r-package@v2 | |
| with: | |
| args: 'c("--no-manual")' | |
| upload-snapshots: true | |
| build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' |