Skip to content

Commit

Permalink
simplify sphinx build script
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickvossler18 committed Jul 14, 2024
1 parent bf4933d commit 0c30d76
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,27 @@ on:
branches:
- main


jobs:
build:
runs-on: ubuntu-latest
env:
PMIP_CBC_LIBRARY: "/home/runner/build/dist/lib/libCbc.so"
steps:
- uses: actions/checkout@v4
# - name: Compile CBC binary
# run : |
# sudo apt-get install gcc g++ gfortran libgfortran-9-dev liblapack-dev libamd2 libcholmod3 libmetis-dev libsuitesparse-dev libnauty2-dev git
# mkdir -p ~/build
# cd ~/build
# wget -nH https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
# bash coinbrew fetch Cbc@master --no-prompt --skip-update
# bash coinbrew build Cbc@stable/2.10 --no-prompt --tests=none
- name: Install Python 3
uses: actions/setup-python@v5
with:
python-version: '3.9.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install .[docs,test]
- name: Build package
run: python -m build
- name: Build HTML
uses: ammaraskar/sphinx-action@master
with:
pre-build-command: "apt-get update -y --allow-releaseinfo-change && apt-get install -y git pandoc latexmk texlive-latex-recommended texlive-latex-extra dvipng texlive-fonts-recommended && pip install sphinx==7.1.2"
run: |
apt-get update -y --allow-releaseinfo-change && apt-get install -y git pandoc latexmk texlive-latex-recommended texlive-latex-extra dvipng texlive-fonts-recommended
cd docs
make html
- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
Expand All @@ -39,4 +36,4 @@ jobs:
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
publish_dir: docs/_build/html

0 comments on commit 0c30d76

Please sign in to comment.