Skip to content

Commit c5d2c6d

Browse files
committed
GH-CI: try to fix allegedly missing deflate library on macOS
Change-Id: Iae4ad6d272d39d0caebd8173794b3b203c1075c0
1 parent 9572706 commit c5d2c6d

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
matrix:
1313
python-version: ['3.11', '3.13']
1414
r-version: [release]
15-
os: [macOS-latest, ubuntu-latest]
15+
os: [macos-15, ubuntu-latest]
1616
steps:
1717
- uses: actions/checkout@v4
1818
- name: Set up Python ${{ matrix.python-version }}
@@ -26,7 +26,19 @@ jobs:
2626
r-version: ${{ matrix.r-version }}
2727
use-public-rspm: true
2828
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
2940
- name: Patch GHA issue with macos - Missing C library
41+
if: startsWith(matrix.os, 'macos')
3042
shell: bash
3143
run: |
3244
LIB_ARCHIVES=(\
@@ -38,7 +50,10 @@ jobs:
3850
curl -LO https://mac.r-project.org/bin/darwin20/arm64/"${name}"
3951
sudo tar xJf "${name}" -C /
4052
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
4257
- name: Set up package maintainers R on Linux
4358
run: |
4459
sudo apt-get update -y
@@ -63,11 +78,13 @@ jobs:
6378
path: ${{ env.R_LIBS_USER }}
6479
key: ${{ runner.os }}-r-${{ matrix.config.r-version }}-${{ hashFiles('DESCRIPTION') }}
6580
if: runner.os != 'Linux'
66-
- name: Install dependencies
67-
run: |
68-
python -m pip install --upgrade pip
69-
pip install deflate wheel
7081
- 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'
7188
run: |
7289
pip install rpy2
7390
pip install .

0 commit comments

Comments
 (0)