From 79f098c79ed48fda93b3219724fab94f12997cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9drik=20Fuoco?= Date: Thu, 19 Oct 2023 14:18:21 -0400 Subject: [PATCH] Tentative fix for the doxygen installation in the CI (Windows) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cédrik Fuoco --- .github/workflows/dependencies_latest.yml | 5 ++++- share/ci/scripts/windows/install_docs_env.sh | 3 ++- share/ci/scripts/windows/install_doxygen.sh | 20 ++++++++++++++------ 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dependencies_latest.yml b/.github/workflows/dependencies_latest.yml index fe729a4fec..0b59bd8774 100644 --- a/.github/workflows/dependencies_latest.yml +++ b/.github/workflows/dependencies_latest.yml @@ -292,7 +292,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Install docs env - run: share/ci/scripts/windows/install_docs_env.sh + run: | + DOXYGEN_PATH=$GITHUB_WORKSPACE/doxygen + share/ci/scripts/windows/install_docs_env.sh "$DOXYGEN_PATH" + echo "$DOXYGEN_PATH" >> $GITHUB_PATH shell: bash if: matrix.build-docs == 'ON' - name: Install tests env diff --git a/share/ci/scripts/windows/install_docs_env.sh b/share/ci/scripts/windows/install_docs_env.sh index 30662eeb99..db18dd2fb4 100755 --- a/share/ci/scripts/windows/install_docs_env.sh +++ b/share/ci/scripts/windows/install_docs_env.sh @@ -5,6 +5,7 @@ set -ex HERE=$(dirname $0) +DOXYGEN_LOCATION="$1" -bash $HERE/install_doxygen.sh latest +bash $HERE/install_doxygen.sh "$DOXYGEN_LOCATION" pip install -r $HERE/../../../../docs/requirements.txt diff --git a/share/ci/scripts/windows/install_doxygen.sh b/share/ci/scripts/windows/install_doxygen.sh index 5bbbded090..a08783f765 100755 --- a/share/ci/scripts/windows/install_doxygen.sh +++ b/share/ci/scripts/windows/install_doxygen.sh @@ -4,10 +4,18 @@ set -ex -DOXYGEN_VERSION="$1" +DOXYGEN_LOCATION="$1" -if [ "$DOXYGEN_VERSION" == "latest" ]; then - choco install doxygen.install -else - choco install doxygen.install --version=${DOXYGEN_VERSION} -fi +# Utility to parse JSON object. +choco install jq + +# Get the URL of the latest zip package for Doxygen. +url=$(curl -s 'https://api.github.com/repos/doxygen/doxygen/releases/latest' | jq -r '.assets[] | select(.name | test("doxygen-.*windows.x64.bin.zip")) | .browser_download_url') + +# Download the zip. +mkdir $DOXYGEN_LOCATION +cd $DOXYGEN_LOCATION +powershell 'iwr -URI '$url' -OutFile doxygen.zip' + +# Unzip the file into $DOXYGEN_LOCATION. +unzip -o doxygen.zip \ No newline at end of file