Skip to content

Commit 9a4abcf

Browse files
authored
Build with ubuntu-22.04 for compatibility with Google Colab (#667)
1 parent b85c88a commit 9a4abcf

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

.github/workflows/python-package.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
os: [windows-latest, ubuntu-latest, macos-latest]
19+
os: [windows-latest, ubuntu-22.04, macos-latest]
2020
python-version: ["3.9", "3.10", "3.11", "3.12"]
2121
env:
2222
LIMIT_NUMPY_VERSION: 2.0.0
@@ -54,15 +54,20 @@ jobs:
5454
python${{ matrix.python-version }} -c "import sys; print(sys.version)"
5555
pip --version
5656
57+
- name: Display GLIBCXX versions
58+
if: matrix.os == 'ubuntu-22.04'
59+
run: |
60+
ls /lib/x86_64-linux-gnu/libstdc*
61+
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
62+
5763
- name: Upgrade pip wheel setuptools
5864
run: python${{ matrix.python-version }} -m pip install wheel setuptools pip --upgrade
5965

6066
- name: Install other dependencies
61-
run: python${{ matrix.python-version }} -m pip install Cython pytest pytest-cov flake8
67+
run: python${{ matrix.python-version }} -m pip install Cython pytest pytest-cov flake8 "numpy>${{ env.LIMIT_NUMPY_VERSION }}" scipy
6268

63-
- name: Install other dependencies
69+
- name: Build extensions and install test dependencies
6470
run: |
65-
python${{ matrix.python-version }} -m pip install Cython pytest pytest-cov flake8 "numpy>${{ env.LIMIT_NUMPY_VERSION }}" scipy
6671
python${{ matrix.python-version }} setup.py build_ext -j${{ steps.cpu-cores.outputs.count }}
6772
python${{ matrix.python-version }} -m pip install -e .[tests]
6873

.github/workflows/python-publish.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
os: [windows-latest, ubuntu-latest, macos-latest]
25+
os: [windows-latest, ubuntu-22.04, macos-latest]
2626
python-version: ["3.9", "3.10", "3.11", "3.12"]
2727
steps:
2828
- uses: actions/checkout@v4
@@ -53,6 +53,12 @@ jobs:
5353
run: |
5454
python${{ matrix.python-version }} -c "import sys; print(sys.version)"
5555
pip --version
56+
57+
- name: Display GLIBCXX versions
58+
if: matrix.os == 'ubuntu-22.04'
59+
run: |
60+
ls /lib/x86_64-linux-gnu/libstdc*
61+
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
5662
5763
- name: Upgrade pip wheel setuptools
5864
run: python${{ matrix.python-version }} -m pip install wheel setuptools pip --upgrade
@@ -71,7 +77,7 @@ jobs:
7177
run: python${{ matrix.python-version }} setup.py bdist_wheel
7278

7379
- name: Rename Linux wheels to supported platform of PyPI
74-
if: matrix.os == 'ubuntu-latest'
80+
if: matrix.os == 'ubuntu-22.04'
7581
run: for f in dist/*.whl; do mv "$f" "$(echo "$f" | sed s/linux/manylinux1/)"; done
7682

7783
- name: Publish wheels to GitHub artifacts
@@ -82,7 +88,7 @@ jobs:
8288

8389
publish-pypi:
8490
needs: [build-wheels]
85-
runs-on: ubuntu-latest
91+
runs-on: ubuntu-22.04
8692
steps:
8793
- uses: actions/checkout@v4
8894

@@ -100,6 +106,11 @@ jobs:
100106
- name: Display Python version
101107
run: python -c "import sys; print(sys.version)"
102108

109+
- name: Display GLIBCXX versions
110+
run: |
111+
ls /lib/x86_64-linux-gnu/libstdc*
112+
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
113+
103114
- name: Install numpy, scipy
104115
run: |
105116
python -m pip install "numpy>${{ env.LIMIT_NUMPY_VERSION }}" scipy

0 commit comments

Comments
 (0)