12
12
matrix :
13
13
python-version : ['3.11', '3.13']
14
14
r-version : [release]
15
- os : [macOS-latest , ubuntu-latest]
15
+ os : [macos-15 , ubuntu-latest]
16
16
steps :
17
17
- uses : actions/checkout@v4
18
18
- name : Set up Python ${{ matrix.python-version }}
26
26
r-version : ${{ matrix.r-version }}
27
27
use-public-rspm : true
28
28
cache-version : 2
29
+ - name : Set env commands (POSIX)
30
+ if : " !startsWith(matrix.os, 'windows')"
31
+ run : |
32
+ echo "VENV_ACTIVATE=source pyenv_base/bin/activate" >> $GITHUB_ENV
33
+ echo "R_LIBRARY=export LD_LIBRARY_PATH=$(python -m rpy2.situation LD_LIBRARY_PATH):${LD_LIBRARY_PATH}" >> $GITHUB_ENV
34
+ - name : Set virtualenv activation command (Windows)
35
+ if : startsWith(matrix.os, 'windows')
36
+ shell : bash
37
+ run : |
38
+ echo "VENV_ACTIVATE=pyenv_base\Scripts\activate" >> $GITHUB_ENV
39
+ echo "R_LIBRARY=''" >> $GITHUB_ENV
29
40
- name : Patch GHA issue with macos - Missing C library
41
+ if : startsWith(matrix.os, 'macos')
30
42
shell : bash
31
43
run : |
32
44
LIB_ARCHIVES=(\
38
50
curl -LO https://mac.r-project.org/bin/darwin20/arm64/"${name}"
39
51
sudo tar xJf "${name}" -C /
40
52
done
41
- if : runner.os == 'macOS'
53
+ - name : Install dependencies
54
+ run : |
55
+ python -m pip install --upgrade pip
56
+ python -m pip install setuptools build
42
57
- name : Set up package maintainers R on Linux
43
58
run : |
44
59
sudo apt-get update -y
@@ -63,11 +78,13 @@ jobs:
63
78
path : ${{ env.R_LIBS_USER }}
64
79
key : ${{ runner.os }}-r-${{ matrix.config.r-version }}-${{ hashFiles('DESCRIPTION') }}
65
80
if : runner.os != 'Linux'
66
- - name : Install dependencies
67
- run : |
68
- python -m pip install --upgrade pip
69
- pip install deflate wheel
70
81
- name : Install package
82
+ if : runner.os != 'Windows'
83
+ run : |
84
+ pip install rpy2
85
+ pip install .
86
+ - name : Install package on Windows
87
+ if : runner.os == 'Windows'
71
88
run : |
72
89
pip install rpy2
73
90
pip install .
0 commit comments