From a0b0fa3537c6a40c38c244b4d58dc5e3b4a5a8ac Mon Sep 17 00:00:00 2001 From: Pouyan Jahangiri Date: Fri, 17 Jul 2026 17:06:03 -0700 Subject: [PATCH] Fix R-CMD-check workflow failing on deprecated actions and retired runner GitHub now automatically fails any job using actions/cache < v3 latest or upload-artifact v2, and the ubuntu-20.04 hosted runner has been retired, so every R-CMD-check run currently fails during setup before R starts. - actions/cache v3.3.1 -> v4 - actions/upload-artifact v2 -> v4 (artifact names are already unique per job) - ubuntu-20.04 runner -> ubuntu-22.04, with matching RSPM repo (focal -> jammy) and remotes::system_requirements lookup --- .github/workflows/R_CMD_check.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/R_CMD_check.yaml b/.github/workflows/R_CMD_check.yaml index 47735116..add3866e 100644 --- a/.github/workflows/R_CMD_check.yaml +++ b/.github/workflows/R_CMD_check.yaml @@ -25,7 +25,7 @@ jobs: matrix: config: - {os: macOS-latest, r: 'release'} - - {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-22.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"} - {os: windows-latest, r: 'release'} # Does not appear to have Java 32-bit, hence the --no-multiarch env: @@ -67,7 +67,7 @@ jobs: - name: Cache R packages if: runner.os != 'Windows' - uses: actions/cache@v3.3.1 + uses: actions/cache@v4 with: path: ${{ env.R_LIBS_USER }} key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} @@ -79,7 +79,7 @@ jobs: while read -r cmd do eval sudo $cmd - done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') + done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "22.04"))') - name: Install libssh if: runner.os == 'Linux' @@ -111,14 +111,14 @@ jobs: - name: Upload check results if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ runner.os }}-r${{ matrix.config.r }}-results path: check - name: Upload source package if: success() && runner.os == 'macOS' && github.event_name != 'pull_request' && github.ref == 'refs/heads/master' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: package_tarball path: check/*.tar.gz