GH-CI: try to fix allegedly missing deflate library on macOS
Change-Id: Iae4ad6d272d39d0caebd8173794b3b203c1075c0
diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml
index 8efae9e..4687022 100644
--- a/.github/workflows/pythonpackage.yml
+++ b/.github/workflows/pythonpackage.yml
@@ -12,7 +12,7 @@
matrix:
python-version: ['3.11', '3.13']
r-version: [release]
- os: [macOS-latest, ubuntu-latest]
+ os: [macos-15, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
@@ -26,7 +26,19 @@
r-version: ${{ matrix.r-version }}
use-public-rspm: true
cache-version: 2
+ - name: Set env commands (POSIX)
+ if: "!startsWith(matrix.os, 'windows')"
+ run: |
+ echo "VENV_ACTIVATE=source pyenv_base/bin/activate" >> $GITHUB_ENV
+ echo "R_LIBRARY=export LD_LIBRARY_PATH=$(python -m rpy2.situation LD_LIBRARY_PATH):${LD_LIBRARY_PATH}" >> $GITHUB_ENV
+ - name: Set virtualenv activation command (Windows)
+ if: startsWith(matrix.os, 'windows')
+ shell: bash
+ run: |
+ echo "VENV_ACTIVATE=pyenv_base\Scripts\activate" >> $GITHUB_ENV
+ echo "R_LIBRARY=''" >> $GITHUB_ENV
- name: Patch GHA issue with macos - Missing C library
+ if: startsWith(matrix.os, 'macos')
shell: bash
run: |
LIB_ARCHIVES=(\
@@ -38,7 +50,10 @@
curl -LO https://mac.r-project.org/bin/darwin20/arm64/"${name}"
sudo tar xJf "${name}" -C /
done
- if: runner.os == 'macOS'
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ python -m pip install setuptools build
- name: Set up package maintainers R on Linux
run: |
sudo apt-get update -y
@@ -63,11 +78,13 @@
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-${{ matrix.config.r-version }}-${{ hashFiles('DESCRIPTION') }}
if: runner.os != 'Linux'
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install deflate wheel
- name: Install package
+ if: runner.os != 'Windows'
+ run: |
+ pip install rpy2
+ pip install .
+ - name: Install package on Windows
+ if: runner.os == 'Windows'
run: |
pip install rpy2
pip install .