From 13ed86d8ed69a6381eb6265cc39a720ab0133f7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Wed, 20 Mar 2024 09:35:39 +0100 Subject: [PATCH] Check distro & R version in workflow To make sure we are building the correct binaries for the repo. This helps with #1. First try for Fedora 38. --- .github/workflows/fedora-38-R4.4.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/fedora-38-R4.4.yaml b/.github/workflows/fedora-38-R4.4.yaml index 0daa0dc6..7f9e4bd2 100644 --- a/.github/workflows/fedora-38-R4.4.yaml +++ b/.github/workflows/fedora-38-R4.4.yaml @@ -10,6 +10,15 @@ jobs: runs-on: ubuntu-latest container: ghcr.io/r-hub/containers/gcc13:latest steps: + - name: Check Distro and R version + run: | + readRenviron("/etc/os-release") + if (Sys.getenv("ID") != "fedora") stop("Not Fedora") + if (Sys.getenv("VERSION_ID") != "38") stop("Not Fedora 38") + if (getRversion() < "4.4.0" || getRversion() >= "4.5.0") { + stop("Not R 4.4.x") + } + shell: Rscript {0} - uses: actions/checkout@v3 - uses: r-hub/repos/actions/update-repo@main with: