Skip to content

Commit

Permalink
Another attempt.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluescarni committed Dec 16, 2024
1 parent 2f84337 commit 4f47f31
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Make this workflow depend on the other one.
workflow_run:
workflows:
- "GitHub CI"
types:
- success

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
Expand All @@ -39,10 +32,8 @@ jobs:
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: docs
- name: Build docs
run: bash tools/gha_conda_docs.sh
- name: Upload docs
uses: actions/upload-pages-artifact@v3
with:
Expand Down
58 changes: 58 additions & 0 deletions tools/gha_conda_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/usr/bin/env bash

# Echo each command
set -x

# Exit on error.
set -e

# Core deps.
sudo apt-get install wget

# Install conda+deps.
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O miniconda.sh
export deps_dir=$HOME/local
export PATH="$HOME/miniconda/bin:$PATH"
bash miniconda.sh -b -p $HOME/miniconda
conda create -y -p $deps_dir c-compiler cxx-compiler cmake \
llvmdev tbb-devel tbb libboost-devel mppp sleef xtensor \
xtensor-blas blas blas-devel fmt spdlog ninja \
'sphinxcontrib-bibtex=2.6.*' 'sphinx=7.*' 'sphinx-book-theme=1.*'
source activate $deps_dir

# Create the build dir and cd into it.
mkdir build
cd build

# Clear the compilation flags set up by conda.
unset CXXFLAGS
unset CFLAGS

# Configure.
cmake ../ -G Ninja \
-DCMAKE_PREFIX_PATH=$deps_dir \
-DCMAKE_BUILD_TYPE=Debug \
-DHEYOKA_BUILD_TESTS=yes \
-DHEYOKA_BUILD_TUTORIALS=ON \
-DHEYOKA_WITH_MPPP=yes \
-DHEYOKA_WITH_SLEEF=yes \
-DCMAKE_CXX_FLAGS_DEBUG="-g -Og"

# Build.
ninja -v -j4

# Run the tests.
ctest -VV -j4

# Build the docs.
cd ../doc
export SPHINX_OUTPUT=`make html linkcheck 2>&1 >/dev/null`;
if [[ "${SPHINX_OUTPUT}" != "" ]]; then
echo "Sphinx encountered some problem:";
echo "${SPHINX_OUTPUT}";
exit 1;
fi
echo "Sphinx ran successfully";

set +e
set +x

0 comments on commit 4f47f31

Please sign in to comment.