File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141 R_VERSION="<< parameters.r-version >>"
4242 # Install rig, R Installation Manager (https://github.com/r-lib/rig) to control installed R version
4343 if [ "$RUNNER_OS" == "macos" ]; then
44- brew install --cask r-lib/rig/rig
44+ # Install specific version of rig (0.8.0) directly from GitHub releases
45+ curl -L -o /tmp/rig.pkg https://github.com/r-lib/rig/releases/download/v0.8.0/rig-0.8.0-macOS-arm64.pkg
46+ ls -lh /tmp/rig.pkg # Verify file exists and has reasonable size
47+ sudo installer -pkg /tmp/rig.pkg -target /
4548 rig add $R_VERSION
4649 # on macOS the R package is installed into a MAJOR.MINOR directory
4750 # the PATCH is ignored (only one patch version supported) the
Original file line number Diff line number Diff line change 9696 PKG_VERSION=$(Rscript -e "cat(read.dcf('DESCRIPTION', 'Version')[1])")
9797
9898 if [[ "$RUNNER_OS" == "macOS" ]]; then
99- PKG_NAME="SimpleITK_${PKG_VERSION}_R${R_VERSION_SHORT}_macos-x86_64.tgz"
99+ # Detect architecture: arm64 or x86_64
100+ ARCH=$(uname -m)
101+ if [[ "$ARCH" == "arm64" || "$ARCH" == "aarch64" ]]; then
102+ PKG_NAME="SimpleITK_${PKG_VERSION}_R${R_VERSION_SHORT}_macos-arm64.tgz"
103+ else
104+ PKG_NAME="SimpleITK_${PKG_VERSION}_R${R_VERSION_SHORT}_macos-x86_64.tgz"
105+ fi
100106 elif [[ "$RUNNER_OS" == "Linux" ]]; then
101107 PKG_NAME="SimpleITK_${PKG_VERSION}_R${R_VERSION_SHORT}_linux-x86_64.tar.gz"
102108 elif [[ "$RUNNER_OS" == "Windows" ]]; then
You can’t perform that action at this time.
0 commit comments