Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ jobs:
R_VERSION="<< parameters.r-version >>"
# Install rig, R Installation Manager (https://github.com/r-lib/rig) to control installed R version
if [ "$RUNNER_OS" == "macos" ]; then
brew install --cask r-lib/rig/rig
# Install specific version of rig (0.8.0) directly from GitHub releases
curl -L -o /tmp/rig.pkg https://github.com/r-lib/rig/releases/download/v0.8.0/rig-0.8.0-macOS-arm64.pkg
ls -lh /tmp/rig.pkg # Verify file exists and has reasonable size
sudo installer -pkg /tmp/rig.pkg -target /
rig add $R_VERSION
# on macOS the R package is installed into a MAJOR.MINOR directory
# the PATCH is ignored (only one patch version supported) the
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ jobs:
PKG_VERSION=$(Rscript -e "cat(read.dcf('DESCRIPTION', 'Version')[1])")

if [[ "$RUNNER_OS" == "macOS" ]]; then
PKG_NAME="SimpleITK_${PKG_VERSION}_R${R_VERSION_SHORT}_macos-x86_64.tgz"
# Detect architecture: arm64 or x86_64
ARCH=$(uname -m)
if [[ "$ARCH" == "arm64" || "$ARCH" == "aarch64" ]]; then
PKG_NAME="SimpleITK_${PKG_VERSION}_R${R_VERSION_SHORT}_macos-arm64.tgz"
else
PKG_NAME="SimpleITK_${PKG_VERSION}_R${R_VERSION_SHORT}_macos-x86_64.tgz"
fi
elif [[ "$RUNNER_OS" == "Linux" ]]; then
PKG_NAME="SimpleITK_${PKG_VERSION}_R${R_VERSION_SHORT}_linux-x86_64.tar.gz"
elif [[ "$RUNNER_OS" == "Windows" ]]; then
Expand Down