Skip to content

Commit

Permalink
try to fix linux installation error
Browse files Browse the repository at this point in the history
  • Loading branch information
Harrinive committed May 1, 2024
1 parent afcc0bb commit 58d43c8
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
name: python-package-distributions
path: dist/


test-installation:
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -49,17 +50,24 @@ jobs:
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libegl1-mesa
sudo apt-get install -y libegl1-mesa # missing libEGL.so.1
sudo apt-get install -y xvfb # GUI backend for matplotlib (Ubuntu doesn't have a display)
- name: Install dependencies and QFit
run: |
pip install --upgrade pip
pip install .
- name: Test installation
- name: Test installation on Linux
if: startsWith(matrix.os, 'ubuntu')
run: |
python -c "from qfit import Fit; print('Installation successful')"
xvfb-run --auto-servernum python -c "from qfit import Fit; print('Installation successful')"
- name: Test installation on macOS and Windows
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows')
run: python -c "from qfit import Fit; print('Installation successful')"


publish-to-pypi:
name: >-
Publish to PyPI
Expand All @@ -85,6 +93,7 @@ jobs:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}


github-release:
name: >-
Sign with Sigstore and upload them to GitHub Release
Expand Down Expand Up @@ -127,6 +136,7 @@ jobs:
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
publish-to-testpypi:
name: Publish to TestPyPI
needs:
Expand Down

0 comments on commit 58d43c8

Please sign in to comment.