Skip to content

Commit

Permalink
build_docs: python virt env in linux
Browse files Browse the repository at this point in the history
  • Loading branch information
sdarwin committed Jun 18, 2024
1 parent 38ed054 commit 7798fe8
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 19 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
container: ubuntu:24.04
packages: python-is-python3
skiplist: auto_index
- os: ubuntu-latest
container: ubuntu:22.04
packages: python2
Expand All @@ -38,6 +42,11 @@ jobs:
container: ubuntu:20.04
packages: python
skiplist: auto_index
- os: ubuntu-latest
container: ubuntu:24.04
packages: python-is-python3
# skiplist:
flags: "--boostrelease"
- os: ubuntu-latest
container: ubuntu:22.04
packages: python2
Expand Down Expand Up @@ -143,11 +152,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-11
skiplist: auto_index contract
- os: macos-11
skiplist: contract
flags: "--boostrelease"
# - os: macos-11
# skiplist: auto_index contract
# - os: macos-11
# skiplist: contract
# flags: "--boostrelease"
- os: macos-12
skiplist: auto_index contract
- os: macos-12
Expand Down
37 changes: 25 additions & 12 deletions build_docs/linuxdocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ scriptname="linuxdocs.sh"
# set defaults:
boostrelease=""
BOOSTROOTRELPATH=".."
pythonvirtenvpath="${HOME}/venvboostdocs"

# READ IN COMMAND-LINE OPTIONS

Expand Down Expand Up @@ -165,37 +166,44 @@ if [ "$skippackagesoption" != "yes" ]; then
# already done:
# sudo apt-get update

sudo apt-get install -y build-essential cmake curl default-jre-headless python3 rsync unzip wget
sudo apt-get install -y build-essential cmake curl default-jre-headless python3 python3-venv rsync unzip wget

if [ "$typeoption" = "cppalv1" ]; then
sudo apt-get install -y bison docbook docbook-xml docbook-xsl flex libfl-dev libsaxonhe-java xsltproc
fi
if [ "$typeoption" = "main" ]; then
sudo apt-get install -y python3-pip ruby ruby-dev
sudo apt-get install -y bison docbook docbook-xml docbook-xsl docutils-doc docutils-common flex ghostscript graphviz libfl-dev libsaxonhe-java python3-docutils texlive texlive-latex-extra xsltproc
sudo apt-get install -y bison docbook docbook-xml docbook-xsl docutils-doc docutils-common flex ghostscript graphviz libfl-dev libsaxonhe-java texlive texlive-latex-extra xsltproc

if [ ! -f ${pythonvirtenvpath}/bin/activate ]; then
python3 -m venv ${pythonvirtenvpath}
fi
source ${pythonvirtenvpath}/bin/activate

# the next two gems are for asciidoctor-pdf
sudo gem install public_suffix --version 4.0.7 # 4.0.7 from 2022 still supports ruby 2.5. Continue to use until ~2024.
sudo gem install css_parser --version 1.12.0 # 1.12.0 from 2022 still supports ruby 2.5. Continue to use until ~2024.
sudo gem install asciidoctor --version 2.0.17
sudo gem install asciidoctor-pdf --version 2.3.4
sudo gem install asciidoctor-diagram --version 2.2.14
sudo gem install asciidoctor-multipage --version 0.0.18
sudo pip3 install docutils
pip3 install setuptools
pip3 install docutils
# which library is using rapidxml
# wget -O rapidxml.zip http://sourceforge.net/projects/rapidxml/files/latest/download
# unzip -n -d rapidxml rapidxml.zip
pip3 install --user https://github.com/bfgroup/jam_pygments/archive/master.zip
pip3 install --user Jinja2==3.1.2
pip3 install --user MarkupSafe==2.1.1
pip3 install https://github.com/bfgroup/jam_pygments/archive/master.zip
pip3 install Jinja2==3.1.2
pip3 install MarkupSafe==2.1.1
sudo gem install pygments.rb --version 2.3.0
pip3 install --user Pygments==2.13.0
pip3 install Pygments==2.13.0
sudo gem install rouge --version 4.0.0
pip3 install --user Sphinx==5.2.1
pip3 install --user git+https://github.com/pfultz2/sphinx-boost@8ad7d424c6b613864976546d801439c34a27e3f6
pip3 install Sphinx==5.2.1
pip3 install git+https://github.com/pfultz2/sphinx-boost@8ad7d424c6b613864976546d801439c34a27e3f6
# from dockerfile:
pip3 install --user myst-parser==0.18.1
pip3 install --user future==0.18.2
pip3 install --user six==1.14.0
pip3 install myst-parser==0.18.1
pip3 install future==0.18.2
pip3 install six==1.14.0

# Locking the version numbers in place offers a better guarantee of a known, good build.
# At the same time, it creates a perpetual outstanding task, to upgrade the gem and pip versions
Expand Down Expand Up @@ -225,6 +233,11 @@ if [ "$skippackagesoption" != "yes" ]; then
sudo cp saxon9he.jar /usr/share/java/Saxon-HE.jar
fi

# In the above 'packages' section a python virtenv was created. Activate it, if that has not been done already.
if [ -f ${pythonvirtenvpath}/bin/activate ]; then
source ${pythonvirtenvpath}/bin/activate
fi

cd $BOOST_SRC_FOLDER

getlibrarypath () {
Expand Down
7 changes: 5 additions & 2 deletions build_docs/macosdocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,10 @@ if [ "$skippackagesoption" != "yes" ]; then

brew install doxygen
brew install wget
brew tap adoptopenjdk/openjdk
brew install --cask adoptopenjdk11
# deprecated in 2021
# brew tap adoptopenjdk/openjdk
# brew install --cask adoptopenjdk11
brew install --cask temurin
brew install gnu-sed
brew install docbook
brew install docbook-xsl
Expand All @@ -193,6 +195,7 @@ if [ "$skippackagesoption" != "yes" ]; then
sudo gem install asciidoctor-pdf --version 2.3.4
sudo gem install asciidoctor-diagram --version 2.2.14
sudo gem install asciidoctor-multipage --version 0.0.18
pip3 install setuptools --user
pip3 install docutils --user
# which library is using rapidxml
# wget -O rapidxml.zip http://sourceforge.net/projects/rapidxml/files/latest/download
Expand Down

0 comments on commit 7798fe8

Please sign in to comment.