From 9c4cd3d174082f54e2f43736fc9195cb7b217b3f Mon Sep 17 00:00:00 2001 From: tqtg Date: Tue, 15 Apr 2025 05:31:16 +0000 Subject: [PATCH 1/2] Build with ubuntu-22.04 for compatible with Google Colab --- .github/workflows/python-package.yml | 13 +++++++++---- .github/workflows/python-publish.yml | 6 +++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 78866c547..43fd35773 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + os: [windows-latest, ubuntu-22.04, macos-latest] python-version: ["3.9", "3.10", "3.11", "3.12"] env: LIMIT_NUMPY_VERSION: 2.0.0 @@ -54,15 +54,20 @@ jobs: python${{ matrix.python-version }} -c "import sys; print(sys.version)" pip --version + - name: Display GCC versions + if: matrix.os == 'ubuntu-22.04' + run: | + ls /lib/x86_64-linux-gnu/libstdc* + strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX + - name: Upgrade pip wheel setuptools run: python${{ matrix.python-version }} -m pip install wheel setuptools pip --upgrade - name: Install other dependencies - run: python${{ matrix.python-version }} -m pip install Cython pytest pytest-cov flake8 + run: python${{ matrix.python-version }} -m pip install Cython pytest pytest-cov flake8 "numpy>${{ env.LIMIT_NUMPY_VERSION }}" scipy - - name: Install other dependencies + - name: Build extensions and install test dependencies run: | - python${{ matrix.python-version }} -m pip install Cython pytest pytest-cov flake8 "numpy>${{ env.LIMIT_NUMPY_VERSION }}" scipy python${{ matrix.python-version }} setup.py build_ext -j${{ steps.cpu-cores.outputs.count }} python${{ matrix.python-version }} -m pip install -e .[tests] diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 5daa3c0f6..3b5d3d855 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + os: [windows-latest, ubuntu-22.04, macos-latest] python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 @@ -71,7 +71,7 @@ jobs: run: python${{ matrix.python-version }} setup.py bdist_wheel - name: Rename Linux wheels to supported platform of PyPI - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-22.04' run: for f in dist/*.whl; do mv "$f" "$(echo "$f" | sed s/linux/manylinux1/)"; done - name: Publish wheels to GitHub artifacts @@ -82,7 +82,7 @@ jobs: publish-pypi: needs: [build-wheels] - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 From bcf114e7702394fb41a13143af4801f63fcef86f Mon Sep 17 00:00:00 2001 From: tqtg Date: Tue, 15 Apr 2025 05:45:53 +0000 Subject: [PATCH 2/2] Display GLIBCXX for both package and publish actions --- .github/workflows/python-package.yml | 2 +- .github/workflows/python-publish.yml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 43fd35773..2357894aa 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -54,7 +54,7 @@ jobs: python${{ matrix.python-version }} -c "import sys; print(sys.version)" pip --version - - name: Display GCC versions + - name: Display GLIBCXX versions if: matrix.os == 'ubuntu-22.04' run: | ls /lib/x86_64-linux-gnu/libstdc* diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 3b5d3d855..9fded091b 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -53,6 +53,12 @@ jobs: run: | python${{ matrix.python-version }} -c "import sys; print(sys.version)" pip --version + + - name: Display GLIBCXX versions + if: matrix.os == 'ubuntu-22.04' + run: | + ls /lib/x86_64-linux-gnu/libstdc* + strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX - name: Upgrade pip wheel setuptools run: python${{ matrix.python-version }} -m pip install wheel setuptools pip --upgrade @@ -100,6 +106,11 @@ jobs: - name: Display Python version run: python -c "import sys; print(sys.version)" + - name: Display GLIBCXX versions + run: | + ls /lib/x86_64-linux-gnu/libstdc* + strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX + - name: Install numpy, scipy run: | python -m pip install "numpy>${{ env.LIMIT_NUMPY_VERSION }}" scipy