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

GHA: Clean up custom doxygen #2201

Merged
merged 1 commit into from
Nov 16, 2023
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
20 changes: 20 additions & 0 deletions .github/actions/setup-doxygen/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Set up doxygen
description: |
Download, build, and install doxygen.

runs:
using: "composite"
steps:
- name: Install apt dependencies for doxygen
run: |
sudo apt-get update \
&& sudo apt-get install -y \
bison \
ragel \
graphviz \
texlive-latex-extra
shell: bash

- name: Download and build doxygen
run: sudo scripts/downloadAndBuildDoxygen.sh
shell: bash
27 changes: 6 additions & 21 deletions .github/workflows/test_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ on:
jobs:
doxygen:
name: Test Doxygen

runs-on: ubuntu-22.04

strategy:
Expand All @@ -32,26 +31,14 @@ jobs:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y \
bison \
ragel \
graphviz \
texlive-latex-extra

- name: Build doxygen
run: |
sudo scripts/downloadAndBuildDoxygen.sh
- name: Set up doxygen
uses: ./.github/actions/setup-doxygen

- name: Run doxygen
run: |
scripts/run-doxygen.sh
run: scripts/run-doxygen.sh

sphinx:
name: Test Sphinx

runs-on: ubuntu-22.04

strategy:
Expand All @@ -70,9 +57,8 @@ jobs:
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
- run: echo "SWIG=${AMICI_DIR}/ThirdParty/swig-4.1.1/install/bin/swig" >> $GITHUB_ENV

- name: Build doxygen
run: |
sudo scripts/downloadAndBuildDoxygen.sh
- name: Set up doxygen
uses: ./.github/actions/setup-doxygen

# install amici dependencies
- name: apt
Expand All @@ -90,5 +76,4 @@ jobs:
sudo scripts/downloadAndBuildSwig.sh

- name: sphinx
run: |
scripts/run-sphinx.sh
run: scripts/run-sphinx.sh
9 changes: 6 additions & 3 deletions scripts/downloadAndBuildDoxygen.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
#!/usr/bin/env bash
# Download and build Doxygen (in case apt or homebrew version is buggy again)
set -e
set -euo pipefail

SCRIPT_PATH=$(dirname "$BASH_SOURCE")
AMICI_PATH=$(cd "$SCRIPT_PATH"/.. && pwd)

DOXYGEN_DIR="${AMICI_PATH}"/ThirdParty/doxygen
cd "${AMICI_PATH}"/ThirdParty
if [[ ! -d ${DOXYGEN_DIR} ]]; then
# git clone --depth 1 https://github.com/doxygen/doxygen.git "${DOXYGEN_DIR}"
git clone --single-branch --branch Release_1_9_7 --depth 1 https://github.com/doxygen/doxygen.git "${DOXYGEN_DIR}"
git clone --single-branch \
--branch Release_1_9_7 \
--depth 1 \
-c advice.detachedHead=false \
https://github.com/doxygen/doxygen.git "${DOXYGEN_DIR}"
fi

cd "${DOXYGEN_DIR}"
Expand Down