Change python version to 3.8 and manually link SP3. #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish documentation on Github Pages | |
on: | |
push: | |
branches: [gh-pages] | |
# Cancel any in-progress job or run | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency | |
concurrency: | |
group: gh-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
docs: | |
runs-on: ubuntu-20.04 | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Download SOFA | |
run: | | |
wget https://github.com/sofa-framework/sofa/releases/download/v22.12.00/SOFA_v22.12.00_Linux.zip | |
unzip SOFA_v22.12.00_Linux.zip | |
rm SOFA_v22.12.00_Linux.zip | |
- name: Preinstall PyOpenGL (https://github.com/mcfletch/pyopengl/issues/74) | |
run: | | |
pip install PyOpenGL | |
- name: Remove PyOpenGL from setup.py | |
run: | | |
mv setup.py original_setup.py | |
sed '/PyOpenGL/d' original_setup.py > setup.py | |
mv setup.py original_setup.py | |
sed '/python_requires/d' original_setup.py > setup.py | |
mv setup.py original_setup.py | |
sed '/assert/d' original_setup.py > setup.py | |
- name: Install dependencies | |
run: | | |
export SOFA_ROOT=$(pwd)/SOFA_v22.12.00_Linux | |
export SOFAPYTHON3_ROOT=$SOFA_ROOT/plugins/SofaPython3 | |
export SOFAPYTHON3_LIBS=$SOFAPYTHON3_ROOT/lib/python3/site-packages | |
export PYTHON_PKG_PATH=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])') | |
ln -s $SOFAPYTHON3_LIBS/Sofa $PYTHON_PKG_PATH/Sofa | |
ln -s $SOFAPYTHON3_LIBS/SofaRuntime $PYTHON_PKG_PATH/SofaRuntime | |
ln -s $SOFAPYTHON3_LIBS/SofaTypes $PYTHON_PKG_PATH/SofaTypes | |
ln -s $SOFAPYTHON3_LIBS/splib $PYTHON_PKG_PATH/splib | |
python3 -m pip install --upgrade pip | |
python3 -m pip install . | |
- id: deployment | |
uses: sphinx-notes/pages@v3 | |
with: | |
documentation_path: docs/source | |
cache: true | |
python_version: 3.8 |