Prepare pcatR 1.0.1 for CRAN #13
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
| name: R-CMD-check | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| R-CMD-check: | |
| name: ${{ matrix.config.os }} (R ${{ matrix.config.r }}) | |
| runs-on: ${{ matrix.config.os }} | |
| 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} | |
| - {os: ubuntu-latest, r: oldrel-1} | |
| - {os: ubuntu-22.04, r: '4.1'} | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| R_KEEP_PKG_SOURCE: yes | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: r-lib/actions/setup-pandoc@v2 | |
| - 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 | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| extra-packages: any::rcmdcheck | |
| needs: check | |
| - uses: r-lib/actions/check-r-package@v2 | |
| with: | |
| upload-snapshots: true | |
| build_args: 'c("--no-manual")' | |
| cran-build: | |
| name: Build exact CRAN source archive (R release) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| R_KEEP_PKG_SOURCE: yes | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: r-lib/actions/setup-pandoc@v2 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: release | |
| use-public-rspm: true | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| needs: check | |
| - name: Build and identify the exact archive | |
| run: | | |
| R CMD build . | |
| test -f pcatR_1.0.1.tar.gz | |
| sha256sum pcatR_1.0.1.tar.gz | |
| - name: Upload exact source archive | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: pcatR-1.0.1-source | |
| path: pcatR_1.0.1.tar.gz | |
| if-no-files-found: error | |
| cran-check: | |
| name: Exact archive, full manual (R ${{ matrix.config.r }}) | |
| needs: cran-build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 40 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - {r: release} | |
| - {r: devel, http-user-agent: release} | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| R_KEEP_PKG_SOURCE: yes | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: pcatR-1.0.1-source | |
| path: dist | |
| - uses: r-lib/actions/setup-pandoc@v2 | |
| - 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 | |
| - uses: r-lib/actions/setup-tinytex@v2 | |
| - name: Install the PDF manual index tool | |
| run: | | |
| tlmgr update --self | |
| tlmgr install makeindex | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| needs: check | |
| - name: Configure R manual TeX macros | |
| run: | | |
| R_TEXMF="$(R RHOME)/share/texmf/tex/latex" | |
| test -f "$R_TEXMF/Rd.sty" | |
| echo "TEXINPUTS=$R_TEXMF//:" >> "$GITHUB_ENV" | |
| - name: Check the downloaded archive with CRAN settings | |
| id: cran-check | |
| continue-on-error: true | |
| run: R CMD check --as-cran dist/pcatR_1.0.1.tar.gz | |
| - name: Diagnose a failed PDF manual build | |
| if: steps.cran-check.outcome == 'failure' | |
| continue-on-error: true | |
| working-directory: pcatR.Rcheck | |
| run: texi2dvi --pdf --batch pcatR-manual.tex | |
| - name: Upload check logs | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: cran-check-${{ matrix.config.r }} | |
| path: | | |
| pcatR.Rcheck/00check.log | |
| pcatR.Rcheck/00install.out | |
| pcatR.Rcheck/pcatR-manual.* | |
| if-no-files-found: warn | |
| - name: Confirm the CRAN check passed | |
| if: always() | |
| run: test "${{ steps.cran-check.outcome }}" = "success" |