|
26 | 26 | - {os: macOS-latest, r: 'release'} |
27 | 27 | - {os: ubuntu-latest, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} |
28 | 28 | - {os: ubuntu-latest, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} |
| 29 | + - {os: ubuntu-latest, r: 'devel', valgrind: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} |
29 | 30 |
|
30 | 31 | env: |
31 | 32 | R_REMOTES_NO_ERRORS_FROM_WARNINGS: true |
@@ -70,16 +71,44 @@ jobs: |
70 | 71 | shell: Rscript {0} |
71 | 72 |
|
72 | 73 | - name: Check |
| 74 | + if: ${{ matrix.config.valgrind != true }} |
73 | 75 | env: |
74 | 76 | _R_CHECK_CRAN_INCOMING_REMOTE_: false |
75 | 77 | run: | |
76 | 78 | options(crayon.enabled = TRUE) |
77 | 79 | rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "error", check_dir = "check") |
78 | 80 | shell: Rscript {0} |
79 | 81 |
|
| 82 | + - name: Setup valgrind |
| 83 | + if: ${{ matrix.config.valgrind == true }} |
| 84 | + run: | |
| 85 | + sudo apt-get update |
| 86 | + sudo apt-get install -y valgrind --no-install-recommends |
| 87 | + shell: bash |
| 88 | + |
| 89 | + - name: Check with Valgrind |
| 90 | + if: ${{ matrix.config.valgrind == true }} |
| 91 | + env: |
| 92 | + _R_CHECK_CRAN_INCOMING_REMOTE_: false |
| 93 | + run: | |
| 94 | + options(crayon.enabled = TRUE) |
| 95 | + rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--use-valgrind"), error_on = "error", check_dir = "check") |
| 96 | + shell: Rscript {0} |
| 97 | + |
80 | 98 | - name: Upload check results |
81 | 99 | if: failure() |
82 | 100 | uses: actions/upload-artifact@main |
83 | 101 | with: |
84 | 102 | name: ${{ runner.os }}-r${{ matrix.config.r }}-results |
85 | 103 | path: check |
| 104 | + |
| 105 | + - name: Build the package |
| 106 | + if: ${{ matrix.config.os == 'ubuntu-latest' && (matrix.config.r == 'release' || matrix.config.r == 'devel') && (matrix.config.valgrind != true) }} |
| 107 | + run: R CMD build . |
| 108 | + |
| 109 | + - uses: actions/upload-artifact@v4 |
| 110 | + if: ${{ matrix.config.os == 'ubuntu-latest' && (matrix.config.r == 'release' || matrix.config.r == 'devel') && (matrix.config.valgrind != true) }} |
| 111 | + with: |
| 112 | + name: netdiffuseR-built-package-${{ matrix.config.os }}-${{ matrix.config.r }} |
| 113 | + path: netdiffuseR_*.tar.gz |
| 114 | + retention-days: 7 |
0 commit comments