Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build_docs scripts improvements: macos-14 and windows-2022 #74

Merged
merged 2 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@ jobs:
- os: macos-12
skiplist: contract
flags: "--boostrelease"
- os: macos-14
skiplist: auto_index contract
- os: macos-14
skiplist: contract
flags: "--boostrelease"

timeout-minutes: 720
runs-on: ${{matrix.os}}
Expand Down
1 change: 1 addition & 0 deletions build_docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ cd _path_to_boost_library_
windowsdocs.ps1
```

windowsdocs.ps1 requires a version of Visual Studio C++ to be available. Optionally, see the scripts here in the [other/](other/) directory such as `windows-2022-clang.ps1` for a method to install that.
 
 
Further discussion about a small number of issues affecting certain libraries is continued in [compatibility.md](compatibility.md)
50 changes: 35 additions & 15 deletions build_docs/macosdocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ shopt -s dotglob

scriptname="macosdocs.sh"

if [[ "$(uname -p)" =~ "arm" ]]; then
echo "Running on arm processor"
homebrew_base_path="/opt/homebrew"
else
echo "Not running on arm processor"
homebrew_base_path="/usr/local"
fi

# set defaults:
boostrelease=""
BOOSTROOTRELPATH=".."
pythonvirtenvpath="${HOME}/venvboostdocs"

# git and getopt are required. If they are not installed, moving that part of the installation process
# to an earlier part of the script:
Expand All @@ -30,16 +39,16 @@ then
fi

# check apple silicon.
if ! command -v /usr/local/opt/gnu-getopt/bin/getopt &> /dev/null
if ! command -v ${homebrew_base_path}/opt/gnu-getopt/bin/getopt &> /dev/null
then
echo "Installing gnu-getopt"
brew install gnu-getopt
fi
export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"
export PATH="${homebrew_base_path}/opt/gnu-getopt/bin:$PATH"

# READ IN COMMAND-LINE OPTIONS

TEMP=`/usr/local/opt/gnu-getopt/bin/getopt -o t:,h::,q:: --long type:,help::,skip-boost::,skip-packages::,quick::,boostrelease::,boostrootsubdir:: -- "$@"`
TEMP=`${homebrew_base_path}/opt/gnu-getopt/bin/getopt -o t:,h::,q:: --long type:,help::,skip-boost::,skip-packages::,quick::,boostrelease::,boostrootsubdir:: -- "$@"`
eval set -- "$TEMP"

# extract options and their arguments into variables.
Expand Down Expand Up @@ -186,6 +195,12 @@ if [ "$skippackagesoption" != "yes" ]; then
brew install docbook-xsl

if [ "$typeoption" = "main" ]; then

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

brew install ghostscript
brew install texlive
brew install graphviz
Expand All @@ -195,23 +210,23 @@ 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
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 All @@ -234,8 +249,13 @@ if [ "$skippackagesoption" != "yes" ]; then

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

# check this on apple silicon:
export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
export PATH="${homebrew_base_path}/opt/gnu-sed/libexec/gnubin:$PATH"

cd $BOOST_SRC_FOLDER

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions build_docs/other/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

## Miscellanous files

- The 2020 folder contains an earlier copy of the build_docs scripts.

- windows-2022-clang.ps1 is a powershell script to install Visual Studio C++ on Windows 2022.


26 changes: 26 additions & 0 deletions build_docs/other/windows-2022-clang.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))

echo "You may need to close and re-open your shell window."

choco install -y visualstudio2022buildtools --parameters \"--add Microsoft.VisualStudio.Component.VC.Llvm.Clang --add Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Llvm.Clang --add Microsoft.VisualStudio.Component.VC.CMake.Project\"
# choco install -y 7zip.install --version 22.1
# choco install -y cmake.install --installargs '\"ADD_CMAKE_TO_PATH=System\"' --version 3.27.9
# choco install -y curl --version 8.0.1
choco install -y dotnetfx --version 4.8.0.20220524
# choco install -y git.install --version 2.40.1
# choco install -y hashdeep --version 4.4
# choco install -y jq --version 1.6
# choco install -y llvm --version 16.0.3
choco install -y microsoft-build-tools --version 15.0.26320.2
# choco install -y mingw --version 12.2.0.03042023
# choco install -y notepadplusplus --version 8.5.2
# choco install -y notepadplusplus.install --version 8.5.2
# choco install -y rsync --version 6.2.8
# choco install -y ruby --version 3.1.3.1
choco install -y vcredist2017 --version 14.16.27033
# choco install -y Wget --version 1.21.3
choco install -y windows-sdk-10.1 --version 10.1.18362.1
# choco install -y winscp --version 5.21.8
# choco install -y winscp.install --version 5.21.8
choco upgrade visualstudio2022-workload-vctools --package-parameters "--add Microsoft.VisualStudio.Component.VC.14.34.17.4.x86.x64" "--add Microsoft.VisualStudio.Component.VC.14.29.16.11.x86.x64" "--add Microsoft.VisualStudio.Component.VC.v141.x86.x64" "--add Microsoft.VisualStudio.Component.VC.140" -y
18 changes: 15 additions & 3 deletions build_docs/windowsdocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ param (
)

$scriptname="windowsdocs.ps1"
$pythonvirtenvpath="${HOME}\venvboostdocs"

# Set-PSDebug -Trace 1

Expand Down Expand Up @@ -287,6 +288,12 @@ if ( -Not ${skip-packages} ) {

if ($typeoption -eq "main") {
$ghostversion="9.56.1"

if (!(Test-Path "${pythonvirtenvpath}\Scripts\activate")) {
python -m venv ${pythonvirtenvpath}
}
"${pythonvirtenvpath}\Scripts\activate"

choco install -y --no-progress ghostscript --version $ghostversion
choco install -y --no-progress texlive
choco install -y --no-progress graphviz
Expand Down Expand Up @@ -325,9 +332,9 @@ if ( -Not ${skip-packages} ) {

$file1="C:\Program Files\gs\gs9.56.1\bin\gswin32c.exe"
$file2="C:\Program Files\gs\gs9.56.1\bin\gswin64c.exe"
if (-not(Test-Path -Path $file1 -PathType Leaf)) {
if (-not(Test-Path -Path $file1 -PathType Leaf)) {
New-Item -ItemType SymbolicLink -Path $file1 -Target $file2
}
}

# 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 @@ -383,6 +390,12 @@ if ( -Not ${skip-packages} ) {

}

# In the above 'packages' section a python virtenv was created. Activate it, if that has not been done already.

if ( Test-Path "${pythonvirtenvpath}\Scripts\activate" ) {
"${pythonvirtenvpath}\Scripts\activate"
}

# re-adding the path fix from above, even if skip-packages was set.
$newpathitem="C:\Program Files\Git\usr\bin"
if( (Test-Path -Path $newpathitem) -and -Not ( $env:Path -like "*$newpathitem*"))
Expand Down Expand Up @@ -647,4 +660,3 @@ else {
}

popd

Loading