Skip to content

Commit

Permalink
Bump supported version to R 4.4.0 (#15)
Browse files Browse the repository at this point in the history
* Add is_r_version("4.4.0")

* Rework action to test on next version & release

* Add news entry

* More version updates...
  • Loading branch information
coatless committed Apr 24, 2024
1 parent ff00074 commit df250cc
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@ on:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
workflow_dispatch: {}

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
R: [ 'release', 'next' ]
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
name: R ${{ matrix.R }} sample
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
r-version: ${{ matrix.R }}

- uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Features

- Updated to support R 4.4.0 on macOS.

## Deployment

- GitHub Actions now tests the package on `release` and `next` versions of
macOS R's version.

# macrtools 0.0.3

Expand Down
6 changes: 3 additions & 3 deletions R/gfortran.R
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ gfortran_install = function(password = getOption("macrtools.password"), verbose

gfortran_status = FALSE

if(is_r_version("4.3")) {
if(is_r_version("4.3") || is_r_version("4.4")) {
gfortran_status = install_gfortran_12_2_universal(
password = entered_password_gfortran,
verbose = verbose)
Expand Down Expand Up @@ -219,7 +219,7 @@ gfortran_install = function(password = getOption("macrtools.password"), verbose
version_number = paste(R.version$major, R.version$minor, sep = ".")
cat(
paste0(
"The macrtools package supports gfortran installations for R 4.0.* - R 4.3.*.\nThe installed version of R (", version_number, ") is not yet supported!\n"
"The macrtools package supports gfortran installations for R 4.0.* - R 4.4.*.\nThe installed version of R (", version_number, ") is not yet supported!\n"
)
)
return(invisible(FALSE))
Expand Down Expand Up @@ -320,7 +320,7 @@ gfortran_update = function(password = getOption("macrtools.password"), verbose =
assert_mac()
assert_aarch64()
assert(is_gfortran_installed(), "On gfortran")
assert(is_r_version("4.2") || is_r_version("4.3"), "On R 4.2 or above")
assert(is_r_version("4.2") || is_r_version("4.3") || is_r_version("4.4"), "On R 4.2 or above")

# Figure out installation directory
install_dir = install_location()
Expand Down
6 changes: 3 additions & 3 deletions R/installers.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ install_strip_level = function(arch = system_arch()) {
}

recipe_binary_install_strip_level = function(arch = system_arch()) {
if (is_r_version("4.3")) {
if (is_r_version("4.3") || is_r_version("4.4")) {
switch(
arch,
"arm64" = 3,
Expand Down Expand Up @@ -42,7 +42,7 @@ install_location = function(arch = system_arch()) {
}

recipe_binary_install_location = function(arch = system_arch()) {
if (is_r_version("4.3")) {
if (is_r_version("4.3") || is_r_version("4.4")) {
switch(
arch,
"arm64" = install_directory_arm64(),
Expand All @@ -58,7 +58,7 @@ recipe_binary_install_location = function(arch = system_arch()) {
}

gfortran_install_location = function(arch = system_arch()) {
if (is_r_version("4.3")) {
if (is_r_version("4.3") || is_r_version("4.4")) {
"/opt"
} else if (is_r_version("4.0") | is_r_version("4.1") | is_r_version("4.2")) {
install_location()
Expand Down

0 comments on commit df250cc

Please sign in to comment.