Skip to content

Commit 6a6e48a

Browse files
authored
Merge pull request #77 from zivy/updateCircleCI
Address problem with rig download path.
2 parents e7e031d + 3ac7b52 commit 6a6e48a

File tree

3 files changed

+26
-17
lines changed

3 files changed

+26
-17
lines changed

.circleci/config.yml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,44 @@ jobs:
2828
type: string
2929
executor: << parameters.os >>
3030
environment:
31-
R_LIBS: ~/Rlibs
3231
ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS: 2
3332
steps:
3433
- checkout
34+
- run:
35+
name: Set environment
36+
command: |
37+
echo "export R_LIBS=$HOME/Rlibs" >> $BASH_ENV
3538
- run:
3639
name: Install R << parameters.r-version >>
3740
command: |
41+
R_VERSION="<< parameters.r-version >>"
3842
# Install rig, R Installation Manager (https://github.com/r-lib/rig) to control installed R version
3943
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 >>
44+
brew tap r-lib/rig
45+
brew install --cask rig
46+
rig add $R_VERSION
47+
# on macOS the R package is installed into a MAJOR.MINOR directory
48+
# the PATCH is ignored (only one patch version supported) the
49+
# architecture is added as a suffix (arm64, x86_64) to allow for
50+
# installations to coexist
51+
rig default "${R_VERSION%.*}-arm64"
4552
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 >>
53+
`which sudo` curl -L https://rig.r-pkg.org/deb/rig.gpg -o /etc/apt/trusted.gpg.d/rig.gpg
54+
`which sudo` sh -c 'echo "deb http://rig.r-pkg.org/deb rig main" > /etc/apt/sources.list.d/rig.list'
55+
`which sudo` apt update
56+
`which sudo` apt install r-rig
57+
sudo rig add $R_VERSION
58+
sudo rig default $R_VERSION
5259
fi
5360
- run:
5461
name: System Dependencies
5562
command: |
5663
if [ "$RUNNER_OS" == "linux" ]; then
5764
sudo apt-get -y update
58-
sudo apt-get install -y libcurl4-openssl-dev libssh2-1-dev libharfbuzz-dev libfribidi-dev gh
65+
sudo apt-get install -y cmake libcurl4-openssl-dev libssh2-1-dev libharfbuzz-dev libfribidi-dev gh
5966
sudo rm -rf /var/lib/apt/lists/*
67+
elif [ "$RUNNER_OS" == "macos" ]; then
68+
brew install cmake
6069
fi
6170
- run:
6271
name: Configuration Information
@@ -75,7 +84,7 @@ jobs:
7584
no_output_timeout: 30m
7685
command: |
7786
set -x
78-
R -e "remotes::install_git(c('.'), lib=c('${R_LIBS}'), configure.vars=c('MAKEJ=2'))"
87+
R -e "remotes::install_git(c('.'), lib=c('${R_LIBS}'), configure.vars=c('MAKEJ=3'))"
7988
8089
workflows:
8190
r-build-test:
@@ -84,7 +93,7 @@ workflows:
8493
- r-build:
8594
matrix:
8695
parameters:
87-
r-version: ['4.4.1']
96+
r-version: ['4.3.1', '4.4.1']
8897
os: ["macos-arm"]
8998
filters:
9099
branches:

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
R: [ '4.3.1', '4.4.1' ]
20-
os: [ 'macos-15-intel', 'macos-latest', 'ubuntu-latest' ]
20+
os: [ 'macos-15-intel', 'ubuntu-latest' ]
2121
runs-on: ${{ matrix.os }}
2222
name: ${{ matrix.R }} ${{ matrix.os }} build
2323
env:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SimpleITKRInstaller
33

44
![Build Status](https://github.com/SimpleITK/SimpleITKRInstaller/actions/workflows/main.yml/badge.svg)
5-
5+
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/SimpleITK/SimpleITKRInstaller/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/SimpleITK/SimpleITKRInstaller/tree/main)
66

77
A [remotes](https://github.com/r-lib/remotes) based installer for SimpleITK in [R](https://www.r-project.org/).
88

0 commit comments

Comments
 (0)