Skip to content

Commit

Permalink
[ci] fix python for new macos images
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-tierny committed Dec 17, 2024
1 parent 5fa37c5 commit 5987a0b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 11 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/headless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,15 @@ jobs:
- uses: actions/checkout@v4
name: Checkout TTK-ParaView source code

- name: Remove hosted Python
run: |
#sudo rm -rf /Library/Frameworks/Python.framework/
#sudo rm -rf /usr/local/Frameworks/Python.framework/
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install macOS dependencies
run: |
# ParaView dependencies
#brew reinstall python
brew install --cask xquartz
brew install ninja
brew install ninja open-mpi
- name: Create & configure ParaView build directory
run: |
Expand All @@ -112,6 +110,22 @@ jobs:
cd build
cpack -G TGZ
- name: Install ParaView
run: |
cd build
sudo cmake --build . --target install
# pvpython does not embed the correct PYTHONPATH
echo "PYTHONPATH=/usr/local/lib/python3.12/site-packages:$PYTHONPATH" >> $GITHUB_ENV
- name: Test Python imports
run: |
python3 -m vtk
python3 -m paraview.simple
pvpython -m vtk
pvpython -m paraview.simple
env:
DYLD_LIBRARY_PATH: /usr/local/lib

- name: Upload compressed binaries
uses: actions/upload-artifact@v4
with:
Expand Down
24 changes: 19 additions & 5 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,13 @@ jobs:
- uses: actions/checkout@v4
name: Checkout TTK-ParaView source code

- name: Remove hosted Python
run: |
sudo rm -rf /Library/Frameworks/Python.framework/
sudo rm -rf /usr/local/Frameworks/Python.framework
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install macOS dependencies
run: |
# ParaView dependencies
brew reinstall python
brew install --cask xquartz
brew install mesa glew qt@5 ninja
Expand All @@ -112,6 +110,22 @@ jobs:
cd build
cpack -G TGZ
- name: Install ParaView
run: |
cd build
sudo cmake --build . --target install
# pvpython does not embed the correct PYTHONPATH
echo "PYTHONPATH=/usr/local/lib/python3.12/site-packages:$PYTHONPATH" >> $GITHUB_ENV
- name: Test Python imports
run: |
python3 -m vtk
python3 -m paraview.simple
pvpython -m vtk
pvpython -m paraview.simple
env:
DYLD_LIBRARY_PATH: /usr/local/lib

- name: Upload compressed binaries
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 5987a0b

Please sign in to comment.