Skip to content

Commit eedf3a9

Browse files
committed
Address problem with rig installation.
Follow the official installation instructions.
1 parent e7e031d commit eedf3a9

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

.circleci/config.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,41 @@ jobs:
2828
type: string
2929
executor: << parameters.os >>
3030
environment:
31-
R_LIBS: ~/Rlibs
31+
R_LIBS: ${HOME%/}/Rlibs
3232
ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS: 2
3333
steps:
3434
- checkout
3535
- run:
3636
name: Install R << parameters.r-version >>
3737
command: |
38+
R_VERSION="<< parameters.r-version >>"
3839
# Install rig, R Installation Manager (https://github.com/r-lib/rig) to control installed R version
3940
if [ "$RUNNER_OS" == "macos" ]; then
40-
curl -L https://github.com/r-lib/rig/releases/download/latest/rig-macos-latest.pkg -o rig.pkg
41-
sudo installer -pkg rig.pkg -target /
42-
rm rig.pkg
43-
rig add << parameters.r-version >>
44-
rig default << parameters.r-version >>
41+
brew tap r-lib/rig
42+
brew install --cask rig
43+
rig add $R_VERSION
44+
# on macOS the R package is installed into a MAJOR.MINOR directory
45+
# the PATCH is ignored (only one patch version supported) the
46+
# architecture is added as a suffix (arm64, x86_64) to allow for
47+
# installations to coexist
48+
rig default "${R_VERSION%.*}-arm64"
4549
elif [ "$RUNNER_OS" == "linux" ]; then
46-
curl -L https://github.com/r-lib/rig/releases/download/latest/rig-linux-latest.tar.gz -o rig.tar.gz
47-
tar xzf rig.tar.gz
48-
sudo mv rig /usr/local/bin/
49-
rm rig.tar.gz
50-
sudo rig add << parameters.r-version >>
51-
sudo rig default << parameters.r-version >>
50+
`which sudo` curl -L https://rig.r-pkg.org/deb/rig.gpg -o /etc/apt/trusted.gpg.d/rig.gpg
51+
`which sudo` sh -c 'echo "deb http://rig.r-pkg.org/deb rig main" > /etc/apt/sources.list.d/rig.list'
52+
`which sudo` apt update
53+
`which sudo` apt install r-rig
54+
sudo rig add $R_VERSION
55+
sudo rig default $R_VERSION
5256
fi
5357
- run:
5458
name: System Dependencies
5559
command: |
5660
if [ "$RUNNER_OS" == "linux" ]; then
5761
sudo apt-get -y update
58-
sudo apt-get install -y libcurl4-openssl-dev libssh2-1-dev libharfbuzz-dev libfribidi-dev gh
62+
sudo apt-get install -y cmake libcurl4-openssl-dev libssh2-1-dev libharfbuzz-dev libfribidi-dev gh
5963
sudo rm -rf /var/lib/apt/lists/*
64+
elif [ "$RUNNER_OS" == "macos" ]; then
65+
brew install cmake
6066
fi
6167
- run:
6268
name: Configuration Information

0 commit comments

Comments
 (0)