Skip to content

Commit

Permalink
Refactor run script so that error is not raised when doxygen doesn't …
Browse files Browse the repository at this point in the history
…exist and --docs not specified

Re-enable explicit installation of msys2 packages for mingw windows job
Only run step to build docs on unix builds (and not ubuntu if doxygen installed via apt because the version is 1.9.1)
  • Loading branch information
langmm committed Jan 10, 2024
1 parent 891dc1a commit c2431cd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ jobs:
shell: bash -l {0}
run: |
mamba install m2w64-gcc m2w64-gcc-fortran m2w64-toolchain_win-64 libpython -c msys2 -y # winpthreads
# mamba install m2w64-gcc-libs m2w64-gcc-libs-core m2w64-gcc-libgfortran m2w64-libwinpthread-git msys2-conda-epoch -c msys2 -y
mamba install m2w64-gcc-libs m2w64-gcc-libs-core m2w64-gcc-libgfortran m2w64-libwinpthread-git msys2-conda-epoch -c msys2 -y
- name: Install MinGW on windows for Fortran (msvc)
if: matrix.os == 'windows-latest' && matrix.python-install == 'conda' && matrix.windows-compiler == 'msvc'
shell: bash -l {0}
Expand Down Expand Up @@ -588,9 +588,10 @@ jobs:
./run_tests.sh --rebuild --speed --config Release ${{ env.CMAKE_ARGS_BASE }} ${{ env.CMAKE_ARGS_NO_PYTHON }} --verbose
###################################
# Speed tests
# Docs tests
###################################
- name: Build docs
if: matrix.os != 'windows-latest' && (matrix.os == 'macos-latest' || matrix.python-install == 'conda')
shell: bash -l {0}
run: |
./run_tests.sh --docs
Expand Down
24 changes: 13 additions & 11 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -376,16 +376,18 @@ if [ -n "$DO_SYMBOLS" ]; then
fi
fi

path_to_doxygen=$(which doxygen)
if [ -n "$DO_DOCS" ] && [ -x "$path_to_doxygen" ]; then
echo "BUILDING DOCS"
if [ ! -d "build" ]; then
mkdir build
if [ -n "$DO_DOCS" ]; then
path_to_doxygen=$(which doxygen)
if [ -x "$path_to_doxygen" ]; then
echo "BUILDING DOCS"
if [ ! -d "build" ]; then
mkdir build
fi
cd build
cmake .. $CMAKE_FLAGS -DYGG_BUILD_DOCS=ON -DBUILD_CPP_LIBRARY=OFF -DBUILD_FORTRAN_LIBRARY=OFF
cmake --build . $CONFIG_FLAGS --target docs
# Need install here to ensure that cmake config files are in place
cmake --install . --prefix "$INSTALL_DIR" $CONFIG_FLAGS
cd ..
fi
cd build
cmake .. $CMAKE_FLAGS -DYGG_BUILD_DOCS=ON -DBUILD_CPP_LIBRARY=OFF -DBUILD_FORTRAN_LIBRARY=OFF
cmake --build . $CONFIG_FLAGS --target docs
# Need install here to ensure that cmake config files are in place
cmake --install . --prefix "$INSTALL_DIR" $CONFIG_FLAGS
cd ..
fi

0 comments on commit c2431cd

Please sign in to comment.